diff options
Diffstat (limited to 'deps/v8/src/objects.h')
-rw-r--r-- | deps/v8/src/objects.h | 57 |
1 files changed, 14 insertions, 43 deletions
diff --git a/deps/v8/src/objects.h b/deps/v8/src/objects.h index 80d1fd47d0..ccd07ff1d7 100644 --- a/deps/v8/src/objects.h +++ b/deps/v8/src/objects.h @@ -59,7 +59,6 @@ // - JSWeakMap // - JSRegExp // - JSFunction -// - JSModule // - GlobalObject // - JSGlobalObject // - JSBuiltinsObject @@ -307,7 +306,6 @@ const int kVariableSizeSentinel = 0; V(JS_DATE_TYPE) \ V(JS_OBJECT_TYPE) \ V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ - V(JS_MODULE_TYPE) \ V(JS_GLOBAL_OBJECT_TYPE) \ V(JS_BUILTINS_OBJECT_TYPE) \ V(JS_GLOBAL_PROXY_TYPE) \ @@ -628,7 +626,6 @@ enum InstanceType { JS_DATE_TYPE, JS_OBJECT_TYPE, JS_CONTEXT_EXTENSION_OBJECT_TYPE, - JS_MODULE_TYPE, JS_GLOBAL_OBJECT_TYPE, JS_BUILTINS_OBJECT_TYPE, JS_GLOBAL_PROXY_TYPE, @@ -680,7 +677,6 @@ const int kExternalArrayTypeCount = STATIC_CHECK(JS_OBJECT_TYPE == Internals::kJSObjectType); STATIC_CHECK(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType); -STATIC_CHECK(ODDBALL_TYPE == Internals::kOddballType); STATIC_CHECK(FOREIGN_TYPE == Internals::kForeignType); @@ -807,7 +803,6 @@ class MaybeObject BASE_EMBEDDED { V(JSReceiver) \ V(JSObject) \ V(JSContextExtensionObject) \ - V(JSModule) \ V(Map) \ V(DescriptorArray) \ V(DeoptimizationInputData) \ @@ -817,7 +812,6 @@ class MaybeObject BASE_EMBEDDED { V(FixedDoubleArray) \ V(Context) \ V(GlobalContext) \ - V(ModuleContext) \ V(ScopeInfo) \ V(JSFunction) \ V(Code) \ @@ -2192,7 +2186,6 @@ class JSObject: public JSReceiver { Object* getter, Object* setter, PropertyAttributes attributes); - MUST_USE_RESULT MaybeObject* CreateAccessorPairFor(String* name); MUST_USE_RESULT MaybeObject* DefinePropertyAccessor( String* name, Object* getter, @@ -2474,7 +2467,7 @@ class DescriptorArray: public FixedArray { // Accessors for fetching instance descriptor at descriptor number. inline String* GetKey(int descriptor_number); inline Object* GetValue(int descriptor_number); - inline PropertyDetails GetDetails(int descriptor_number); + inline Smi* GetDetails(int descriptor_number); inline PropertyType GetType(int descriptor_number); inline int GetFieldIndex(int descriptor_number); inline JSFunction* GetConstantFunction(int descriptor_number); @@ -2483,6 +2476,7 @@ class DescriptorArray: public FixedArray { inline bool IsProperty(int descriptor_number); inline bool IsTransitionOnly(int descriptor_number); inline bool IsNullDescriptor(int descriptor_number); + inline bool IsDontEnum(int descriptor_number); class WhitenessWitness { public: @@ -2636,6 +2630,10 @@ class DescriptorArray: public FixedArray { return descriptor_number << 1; } + bool is_null_descriptor(int descriptor_number) { + return PropertyDetails(GetDetails(descriptor_number)).type() == + NULL_DESCRIPTOR; + } // Swap operation on FixedArray without using write barriers. static inline void NoIncrementalWriteBarrierSwap( FixedArray* array, int first, int second); @@ -3415,8 +3413,8 @@ class ScopeInfo : public FixedArray { // otherwise returns a value < 0. The name must be a symbol (canonicalized). int ParameterIndex(String* name); - // Lookup support for serialized scope info. Returns the function context - // slot index if the function name is present and context-allocated (named + // Lookup support for serialized scope info. Returns the + // function context slot index if the function name is present (named // function expressions, only), otherwise returns a value < 0. The name // must be a symbol (canonicalized). int FunctionContextSlotIndex(String* name, VariableMode* mode); @@ -4245,6 +4243,11 @@ class Code: public HeapObject { inline bool is_compiled_optimizable(); inline void set_compiled_optimizable(bool value); + // [has_self_optimization_header]: For FUNCTION kind, tells if it has + // a self-optimization header. + inline bool has_self_optimization_header(); + inline void set_self_optimization_header(bool value); + // [allow_osr_at_loop_nesting_level]: For FUNCTION kind, tells for // how long the function has been marked for OSR and therefore which // level of loop nesting we are willing to do on-stack replacement @@ -4471,6 +4474,7 @@ class Code: public HeapObject { public BitField<bool, 0, 1> {}; // NOLINT class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; class FullCodeFlagsIsCompiledOptimizable: public BitField<bool, 2, 1> {}; + class FullCodeFlagsHasSelfOptimizationHeader: public BitField<bool, 3, 1> {}; static const int kBinaryOpReturnTypeOffset = kBinaryOpTypeOffset + 1; @@ -5692,35 +5696,6 @@ class SharedFunctionInfo: public HeapObject { }; -// Representation for module instance objects. -class JSModule: public JSObject { - public: - // [context]: the context holding the module's locals, or undefined if none. - DECL_ACCESSORS(context, Object) - - // Casting. - static inline JSModule* cast(Object* obj); - - // Dispatched behavior. -#ifdef OBJECT_PRINT - inline void JSModulePrint() { - JSModulePrint(stdout); - } - void JSModulePrint(FILE* out); -#endif -#ifdef DEBUG - void JSModuleVerify(); -#endif - - // Layout description. - static const int kContextOffset = JSObject::kHeaderSize; - static const int kSize = kContextOffset + kPointerSize; - - private: - DISALLOW_IMPLICIT_CONSTRUCTORS(JSModule); -}; - - // JSFunction describes JavaScript functions. class JSFunction: public JSObject { public: @@ -7637,10 +7612,6 @@ class Oddball: public HeapObject { kToNumberOffset + kPointerSize, kSize> BodyDescriptor; - STATIC_CHECK(kKindOffset == Internals::kOddballKindOffset); - STATIC_CHECK(kNull == Internals::kNullOddballKind); - STATIC_CHECK(kUndefined == Internals::kUndefinedOddballKind); - private: DISALLOW_IMPLICIT_CONSTRUCTORS(Oddball); }; |