diff options
Diffstat (limited to 'deps/v8/src/objects/code.h')
-rw-r--r-- | deps/v8/src/objects/code.h | 50 |
1 files changed, 13 insertions, 37 deletions
diff --git a/deps/v8/src/objects/code.h b/deps/v8/src/objects/code.h index a950261103..2f85d4ac7b 100644 --- a/deps/v8/src/objects/code.h +++ b/deps/v8/src/objects/code.h @@ -476,7 +476,7 @@ class Code::OptimizedCodeIterator { Code Next(); private: - Context next_context_; + NativeContext next_context_; Code current_code_; Isolate* isolate_; @@ -741,15 +741,15 @@ class BytecodeArray : public FixedArrayBase { inline Address GetFirstBytecodeAddress(); // Accessors for frame size. - inline int frame_size() const; - inline void set_frame_size(int frame_size); + inline int32_t frame_size() const; + inline void set_frame_size(int32_t frame_size); // Accessor for register count (derived from frame_size). inline int register_count() const; // Accessors for parameter count (including implicit 'this' receiver). - inline int parameter_count() const; - inline void set_parameter_count(int number_of_parameters); + inline int32_t parameter_count() const; + inline void set_parameter_count(int32_t number_of_parameters); // Register used to pass the incoming new.target or generator object from the // fucntion call. @@ -828,28 +828,15 @@ class BytecodeArray : public FixedArrayBase { // Compares only the bytecode array but not any of the header fields. bool IsBytecodeEqual(const BytecodeArray other) const; -// Layout description. -#define BYTECODE_ARRAY_FIELDS(V) \ - /* Pointer fields. */ \ - V(kConstantPoolOffset, kTaggedSize) \ - V(kHandlerTableOffset, kTaggedSize) \ - V(kSourcePositionTableOffset, kTaggedSize) \ - V(kFrameSizeOffset, kIntSize) \ - V(kParameterSizeOffset, kIntSize) \ - V(kIncomingNewTargetOrGeneratorRegisterOffset, kIntSize) \ - V(kOSRNestingLevelOffset, kCharSize) \ - V(kBytecodeAgeOffset, kCharSize) \ - /* Total size. */ \ - V(kHeaderSize, 0) - + // Layout description. DEFINE_FIELD_OFFSET_CONSTANTS(FixedArrayBase::kHeaderSize, - BYTECODE_ARRAY_FIELDS) -#undef BYTECODE_ARRAY_FIELDS + TORQUE_GENERATED_BYTECODE_ARRAY_FIELDS) + static constexpr int kHeaderSize = kSize; // InterpreterEntryTrampoline expects these fields to be next to each other // and writes a 16-bit value to reset them. STATIC_ASSERT(BytecodeArray::kBytecodeAgeOffset == - kOSRNestingLevelOffset + kCharSize); + kOsrNestingLevelOffset + kCharSize); // Maximal memory consumption for a single BytecodeArray. static const int kMaxSize = 512 * MB; @@ -948,22 +935,11 @@ class DeoptimizationData : public FixedArray { OBJECT_CONSTRUCTORS(DeoptimizationData, FixedArray); }; -class SourcePositionTableWithFrameCache : public Struct { +class SourcePositionTableWithFrameCache + : public TorqueGeneratedSourcePositionTableWithFrameCache< + SourcePositionTableWithFrameCache, Struct> { public: - DECL_ACCESSORS(source_position_table, ByteArray) - DECL_ACCESSORS(stack_frame_cache, SimpleNumberDictionary) - - DECL_CAST(SourcePositionTableWithFrameCache) - - DECL_PRINTER(SourcePositionTableWithFrameCache) - DECL_VERIFIER(SourcePositionTableWithFrameCache) - - // Layout description. - DEFINE_FIELD_OFFSET_CONSTANTS( - Struct::kHeaderSize, - TORQUE_GENERATED_SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_FIELDS) - - OBJECT_CONSTRUCTORS(SourcePositionTableWithFrameCache, Struct); + TQ_OBJECT_CONSTRUCTORS(SourcePositionTableWithFrameCache) }; } // namespace internal |