OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3830 | 3830 |
3831 void JSBuiltinsObject::set_javascript_builtin_code(Builtins::JavaScript id, | 3831 void JSBuiltinsObject::set_javascript_builtin_code(Builtins::JavaScript id, |
3832 Code* value) { | 3832 Code* value) { |
3833 ASSERT(id < kJSBuiltinsCount); // id is unsigned. | 3833 ASSERT(id < kJSBuiltinsCount); // id is unsigned. |
3834 WRITE_FIELD(this, OffsetOfCodeWithId(id), value); | 3834 WRITE_FIELD(this, OffsetOfCodeWithId(id), value); |
3835 ASSERT(!HEAP->InNewSpace(value)); | 3835 ASSERT(!HEAP->InNewSpace(value)); |
3836 } | 3836 } |
3837 | 3837 |
3838 | 3838 |
3839 ACCESSORS(JSProxy, handler, Object, kHandlerOffset) | 3839 ACCESSORS(JSProxy, handler, Object, kHandlerOffset) |
3840 ACCESSORS(JSProxy, padding, Object, kPaddingOffset) | 3840 ACCESSORS(JSFunctionProxy, call_trap, Object, kCallTrapOffset) |
| 3841 ACCESSORS(JSFunctionProxy, construct_trap, Object, kConstructTrapOffset) |
| 3842 |
| 3843 |
| 3844 void JSProxy::InitializeBody(int object_size, Object* value) { |
| 3845 ASSERT(!value->IsHeapObject() || !GetHeap()->InNewSpace(value)); |
| 3846 for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) { |
| 3847 WRITE_FIELD(this, offset, value); |
| 3848 } |
| 3849 } |
3841 | 3850 |
3842 | 3851 |
3843 ACCESSORS(JSWeakMap, table, ObjectHashTable, kTableOffset) | 3852 ACCESSORS(JSWeakMap, table, ObjectHashTable, kTableOffset) |
3844 ACCESSORS_GCSAFE(JSWeakMap, next, Object, kNextOffset) | 3853 ACCESSORS_GCSAFE(JSWeakMap, next, Object, kNextOffset) |
3845 | 3854 |
3846 | 3855 |
3847 ObjectHashTable* JSWeakMap::unchecked_table() { | 3856 ObjectHashTable* JSWeakMap::unchecked_table() { |
3848 return reinterpret_cast<ObjectHashTable*>(READ_FIELD(this, kTableOffset)); | 3857 return reinterpret_cast<ObjectHashTable*>(READ_FIELD(this, kTableOffset)); |
3849 } | 3858 } |
3850 | 3859 |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4606 #undef WRITE_INT_FIELD | 4615 #undef WRITE_INT_FIELD |
4607 #undef READ_SHORT_FIELD | 4616 #undef READ_SHORT_FIELD |
4608 #undef WRITE_SHORT_FIELD | 4617 #undef WRITE_SHORT_FIELD |
4609 #undef READ_BYTE_FIELD | 4618 #undef READ_BYTE_FIELD |
4610 #undef WRITE_BYTE_FIELD | 4619 #undef WRITE_BYTE_FIELD |
4611 | 4620 |
4612 | 4621 |
4613 } } // namespace v8::internal | 4622 } } // namespace v8::internal |
4614 | 4623 |
4615 #endif // V8_OBJECTS_INL_H_ | 4624 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |