| 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 6231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6242 set_literals_or_bindings(bindings); | 6242 set_literals_or_bindings(bindings); |
| 6243 } | 6243 } |
| 6244 | 6244 |
| 6245 | 6245 |
| 6246 int JSFunction::NumberOfLiterals() { | 6246 int JSFunction::NumberOfLiterals() { |
| 6247 DCHECK(!shared()->bound()); | 6247 DCHECK(!shared()->bound()); |
| 6248 return literals()->length(); | 6248 return literals()->length(); |
| 6249 } | 6249 } |
| 6250 | 6250 |
| 6251 | 6251 |
| 6252 Object* JSBuiltinsObject::javascript_builtin(Builtins::JavaScript id) { | |
| 6253 DCHECK(id < kJSBuiltinsCount); // id is unsigned. | |
| 6254 return READ_FIELD(this, OffsetOfFunctionWithId(id)); | |
| 6255 } | |
| 6256 | |
| 6257 | |
| 6258 void JSBuiltinsObject::set_javascript_builtin(Builtins::JavaScript id, | |
| 6259 Object* value) { | |
| 6260 DCHECK(id < kJSBuiltinsCount); // id is unsigned. | |
| 6261 WRITE_FIELD(this, OffsetOfFunctionWithId(id), value); | |
| 6262 WRITE_BARRIER(GetHeap(), this, OffsetOfFunctionWithId(id), value); | |
| 6263 } | |
| 6264 | |
| 6265 | |
| 6266 ACCESSORS(JSProxy, handler, Object, kHandlerOffset) | 6252 ACCESSORS(JSProxy, handler, Object, kHandlerOffset) |
| 6267 ACCESSORS(JSProxy, hash, Object, kHashOffset) | 6253 ACCESSORS(JSProxy, hash, Object, kHashOffset) |
| 6268 ACCESSORS(JSFunctionProxy, call_trap, Object, kCallTrapOffset) | 6254 ACCESSORS(JSFunctionProxy, call_trap, Object, kCallTrapOffset) |
| 6269 ACCESSORS(JSFunctionProxy, construct_trap, Object, kConstructTrapOffset) | 6255 ACCESSORS(JSFunctionProxy, construct_trap, Object, kConstructTrapOffset) |
| 6270 | 6256 |
| 6271 | 6257 |
| 6272 void JSProxy::InitializeBody(int object_size, Object* value) { | 6258 void JSProxy::InitializeBody(int object_size, Object* value) { |
| 6273 DCHECK(!value->IsHeapObject() || !GetHeap()->InNewSpace(value)); | 6259 DCHECK(!value->IsHeapObject() || !GetHeap()->InNewSpace(value)); |
| 6274 for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) { | 6260 for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) { |
| 6275 WRITE_FIELD(this, offset, value); | 6261 WRITE_FIELD(this, offset, value); |
| (...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7858 #undef READ_INT64_FIELD | 7844 #undef READ_INT64_FIELD |
| 7859 #undef WRITE_INT64_FIELD | 7845 #undef WRITE_INT64_FIELD |
| 7860 #undef READ_BYTE_FIELD | 7846 #undef READ_BYTE_FIELD |
| 7861 #undef WRITE_BYTE_FIELD | 7847 #undef WRITE_BYTE_FIELD |
| 7862 #undef NOBARRIER_READ_BYTE_FIELD | 7848 #undef NOBARRIER_READ_BYTE_FIELD |
| 7863 #undef NOBARRIER_WRITE_BYTE_FIELD | 7849 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7864 | 7850 |
| 7865 } } // namespace v8::internal | 7851 } } // namespace v8::internal |
| 7866 | 7852 |
| 7867 #endif // V8_OBJECTS_INL_H_ | 7853 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |