Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index 6b1cfb3c330f1d22c31793d0b4b807d2f0b537e4..87d94c8b61630e923e63878b4d3a0fb1aa7fe8eb 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -648,6 +648,7 @@ bool Object::IsNumber() const { |
| TYPE_CHECKER(ByteArray, BYTE_ARRAY_TYPE) |
| +TYPE_CHECKER(BytecodeArray, BYTECODE_ARRAY_TYPE) |
| TYPE_CHECKER(FreeSpace, FREE_SPACE_TYPE) |
| @@ -2950,6 +2951,7 @@ void SeededNumberDictionary::set_requires_slow_elements() { |
| CAST_ACCESSOR(AccessorInfo) |
| CAST_ACCESSOR(ArrayList) |
| CAST_ACCESSOR(ByteArray) |
| +CAST_ACCESSOR(BytecodeArray) |
| CAST_ACCESSOR(Cell) |
| CAST_ACCESSOR(Code) |
| CAST_ACCESSOR(CodeCacheHashTable) |
| @@ -3651,6 +3653,31 @@ Address ByteArray::GetDataStartAddress() { |
| } |
| +int BytecodeArray::frame_size() { |
| + return READ_INT_FIELD(this, kFrameSizeOffset); |
|
rmcilroy
2015/07/20 11:39:46
These should be stored as SMI values. Could you ju
oth
2015/07/20 13:47:30
Done.
|
| +} |
| + |
| + |
| +void BytecodeArray::set_frame_size(int value) { |
| + WRITE_INT_FIELD(this, kFrameSizeOffset, value); |
| +} |
| + |
| + |
| +int BytecodeArray::number_of_locals() { |
| + return READ_INT_FIELD(this, kNumberOfLocalsOffset); |
| +} |
| + |
| + |
| +void BytecodeArray::set_number_of_locals(int value) { |
| + WRITE_INT_FIELD(this, kNumberOfLocalsOffset, value); |
| +} |
| + |
| + |
| +Address BytecodeArray::GetFirstBytecodeAddress() { |
| + return reinterpret_cast<Address>(this) - kHeapObjectTag + kHeaderSize; |
| +} |
| + |
| + |
| uint8_t* ExternalUint8ClampedArray::external_uint8_clamped_pointer() { |
| return reinterpret_cast<uint8_t*>(external_pointer()); |
| } |
| @@ -4126,6 +4153,9 @@ int HeapObject::SizeFromMap(Map* map) { |
| if (instance_type == BYTE_ARRAY_TYPE) { |
| return reinterpret_cast<ByteArray*>(this)->ByteArraySize(); |
| } |
| + if (instance_type == BYTECODE_ARRAY_TYPE) { |
| + return reinterpret_cast<BytecodeArray*>(this)->BytecodeArraySize(); |
| + } |
| if (instance_type == FREE_SPACE_TYPE) { |
| return reinterpret_cast<FreeSpace*>(this)->nobarrier_size(); |
| } |
| @@ -5190,6 +5220,8 @@ ACCESSORS(SharedFunctionInfo, optimized_code_map, Object, |
| ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset) |
| ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector, |
| kFeedbackVectorOffset) |
| +ACCESSORS(SharedFunctionInfo, bytecode_array, BytecodeArray, |
| + kBytecodeArrayOffset) |
| #if TRACE_MAPS |
| SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset) |
| #endif |