| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return representation().IsDouble() ? kDoubleSize / kPointerSize : 1; | 68 return representation().IsDouble() ? kDoubleSize / kPointerSize : 1; |
| 69 } | 69 } |
| 70 | 70 |
| 71 TYPE_CHECKER(BreakPointInfo, TUPLE2_TYPE) | 71 TYPE_CHECKER(BreakPointInfo, TUPLE2_TYPE) |
| 72 TYPE_CHECKER(ByteArray, BYTE_ARRAY_TYPE) | 72 TYPE_CHECKER(ByteArray, BYTE_ARRAY_TYPE) |
| 73 TYPE_CHECKER(BytecodeArray, BYTECODE_ARRAY_TYPE) | 73 TYPE_CHECKER(BytecodeArray, BYTECODE_ARRAY_TYPE) |
| 74 TYPE_CHECKER(CallHandlerInfo, TUPLE2_TYPE) | 74 TYPE_CHECKER(CallHandlerInfo, TUPLE2_TYPE) |
| 75 TYPE_CHECKER(Cell, CELL_TYPE) | 75 TYPE_CHECKER(Cell, CELL_TYPE) |
| 76 TYPE_CHECKER(Code, CODE_TYPE) | 76 TYPE_CHECKER(Code, CODE_TYPE) |
| 77 TYPE_CHECKER(ConstantElementsPair, TUPLE2_TYPE) | 77 TYPE_CHECKER(ConstantElementsPair, TUPLE2_TYPE) |
| 78 TYPE_CHECKER(CoverageInfo, FIXED_ARRAY_TYPE) |
| 78 TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE) | 79 TYPE_CHECKER(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE) |
| 79 TYPE_CHECKER(Foreign, FOREIGN_TYPE) | 80 TYPE_CHECKER(Foreign, FOREIGN_TYPE) |
| 80 TYPE_CHECKER(FreeSpace, FREE_SPACE_TYPE) | 81 TYPE_CHECKER(FreeSpace, FREE_SPACE_TYPE) |
| 81 TYPE_CHECKER(HeapNumber, HEAP_NUMBER_TYPE) | 82 TYPE_CHECKER(HeapNumber, HEAP_NUMBER_TYPE) |
| 82 TYPE_CHECKER(JSArgumentsObject, JS_ARGUMENTS_TYPE) | 83 TYPE_CHECKER(JSArgumentsObject, JS_ARGUMENTS_TYPE) |
| 83 TYPE_CHECKER(JSArray, JS_ARRAY_TYPE) | 84 TYPE_CHECKER(JSArray, JS_ARRAY_TYPE) |
| 84 TYPE_CHECKER(JSArrayBuffer, JS_ARRAY_BUFFER_TYPE) | 85 TYPE_CHECKER(JSArrayBuffer, JS_ARRAY_BUFFER_TYPE) |
| 85 TYPE_CHECKER(JSAsyncGeneratorObject, JS_ASYNC_GENERATOR_OBJECT_TYPE) | 86 TYPE_CHECKER(JSAsyncGeneratorObject, JS_ASYNC_GENERATOR_OBJECT_TYPE) |
| 86 TYPE_CHECKER(JSBoundFunction, JS_BOUND_FUNCTION_TYPE) | 87 TYPE_CHECKER(JSBoundFunction, JS_BOUND_FUNCTION_TYPE) |
| 87 TYPE_CHECKER(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE) | 88 TYPE_CHECKER(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE) |
| (...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 if (JSObject::cast(prototype)->elements() != empty) return false; | 1202 if (JSObject::cast(prototype)->elements() != empty) return false; |
| 1202 prototype = HeapObject::cast(map->prototype()); | 1203 prototype = HeapObject::cast(map->prototype()); |
| 1203 } | 1204 } |
| 1204 return true; | 1205 return true; |
| 1205 } | 1206 } |
| 1206 | 1207 |
| 1207 Object** HeapObject::RawField(HeapObject* obj, int byte_offset) { | 1208 Object** HeapObject::RawField(HeapObject* obj, int byte_offset) { |
| 1208 return reinterpret_cast<Object**>(FIELD_ADDR(obj, byte_offset)); | 1209 return reinterpret_cast<Object**>(FIELD_ADDR(obj, byte_offset)); |
| 1209 } | 1210 } |
| 1210 | 1211 |
| 1212 int Smi::ToInt(Object* o) { return Smi::cast(o)->value(); } |
| 1211 | 1213 |
| 1212 MapWord MapWord::FromMap(const Map* map) { | 1214 MapWord MapWord::FromMap(const Map* map) { |
| 1213 return MapWord(reinterpret_cast<uintptr_t>(map)); | 1215 return MapWord(reinterpret_cast<uintptr_t>(map)); |
| 1214 } | 1216 } |
| 1215 | 1217 |
| 1216 | 1218 |
| 1217 Map* MapWord::ToMap() { | 1219 Map* MapWord::ToMap() { |
| 1218 return reinterpret_cast<Map*>(value_); | 1220 return reinterpret_cast<Map*>(value_); |
| 1219 } | 1221 } |
| 1220 | 1222 |
| (...skipping 6214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7435 | 7437 |
| 7436 ACCESSORS(JSStringIterator, string, String, kStringOffset) | 7438 ACCESSORS(JSStringIterator, string, String, kStringOffset) |
| 7437 SMI_ACCESSORS(JSStringIterator, index, kNextIndexOffset) | 7439 SMI_ACCESSORS(JSStringIterator, index, kNextIndexOffset) |
| 7438 | 7440 |
| 7439 } // namespace internal | 7441 } // namespace internal |
| 7440 } // namespace v8 | 7442 } // namespace v8 |
| 7441 | 7443 |
| 7442 #include "src/objects/object-macros-undef.h" | 7444 #include "src/objects/object-macros-undef.h" |
| 7443 | 7445 |
| 7444 #endif // V8_OBJECTS_INL_H_ | 7446 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |