tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

KnownClass.h (879B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 * vim: set ts=8 sts=2 et sw=2 tw=80:
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef jit_KnownClass_h
      8 #define jit_KnownClass_h
      9 
     10 #include "jspubtd.h"
     11 
     12 namespace js {
     13 namespace jit {
     14 
     15 class MDefinition;
     16 
     17 // Users of this enum often can't handle Proxy and Wrapper classes,
     18 // as well as non-Function callables.
     19 enum class KnownClass {
     20  PlainObject,
     21  Array,
     22  Function,
     23  RegExp,
     24  ArrayIterator,
     25  StringIterator,
     26  RegExpStringIterator,
     27  None
     28 };
     29 
     30 KnownClass GetObjectKnownClass(const MDefinition* def);
     31 const JSClass* GetObjectKnownJSClass(const MDefinition* def);
     32 
     33 }  // namespace jit
     34 }  // namespace js
     35 
     36 #endif  // jit_KnownClass_h