OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 void JSObject::initialize_elements() { | 1055 void JSObject::initialize_elements() { |
1056 ASSERT(!Heap::InNewSpace(Heap::empty_fixed_array())); | 1056 ASSERT(!Heap::InNewSpace(Heap::empty_fixed_array())); |
1057 WRITE_FIELD(this, kElementsOffset, Heap::empty_fixed_array()); | 1057 WRITE_FIELD(this, kElementsOffset, Heap::empty_fixed_array()); |
1058 } | 1058 } |
1059 | 1059 |
1060 | 1060 |
1061 ACCESSORS(Oddball, to_string, String, kToStringOffset) | 1061 ACCESSORS(Oddball, to_string, String, kToStringOffset) |
1062 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) | 1062 ACCESSORS(Oddball, to_number, Object, kToNumberOffset) |
1063 | 1063 |
1064 | 1064 |
1065 ACCESSORS(JSGlobalPropertyCell, value, Object, kValueOffset) | 1065 Object* JSGlobalPropertyCell::value() { |
| 1066 return READ_FIELD(this, kValueOffset); |
| 1067 } |
| 1068 |
| 1069 |
| 1070 void JSGlobalPropertyCell::set_value(Object* val, WriteBarrierMode ignored) { |
| 1071 // The write barrier is not used for global property cells. |
| 1072 WRITE_FIELD(this, kValueOffset, val); |
| 1073 } |
| 1074 |
1066 | 1075 |
1067 int JSObject::GetHeaderSize() { | 1076 int JSObject::GetHeaderSize() { |
1068 switch (map()->instance_type()) { | 1077 switch (map()->instance_type()) { |
1069 case JS_GLOBAL_PROXY_TYPE: | 1078 case JS_GLOBAL_PROXY_TYPE: |
1070 return JSGlobalProxy::kSize; | 1079 return JSGlobalProxy::kSize; |
1071 case JS_GLOBAL_OBJECT_TYPE: | 1080 case JS_GLOBAL_OBJECT_TYPE: |
1072 return JSGlobalObject::kSize; | 1081 return JSGlobalObject::kSize; |
1073 case JS_BUILTINS_OBJECT_TYPE: | 1082 case JS_BUILTINS_OBJECT_TYPE: |
1074 return JSBuiltinsObject::kSize; | 1083 return JSBuiltinsObject::kSize; |
1075 case JS_FUNCTION_TYPE: | 1084 case JS_FUNCTION_TYPE: |
(...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2698 #undef WRITE_INT_FIELD | 2707 #undef WRITE_INT_FIELD |
2699 #undef READ_SHORT_FIELD | 2708 #undef READ_SHORT_FIELD |
2700 #undef WRITE_SHORT_FIELD | 2709 #undef WRITE_SHORT_FIELD |
2701 #undef READ_BYTE_FIELD | 2710 #undef READ_BYTE_FIELD |
2702 #undef WRITE_BYTE_FIELD | 2711 #undef WRITE_BYTE_FIELD |
2703 | 2712 |
2704 | 2713 |
2705 } } // namespace v8::internal | 2714 } } // namespace v8::internal |
2706 | 2715 |
2707 #endif // V8_OBJECTS_INL_H_ | 2716 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |