| 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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 Heap* HeapObject::GetHeap() { | 1069 Heap* HeapObject::GetHeap() { |
| 1070 // During GC, the map pointer in HeapObject is used in various ways that | 1070 // During GC, the map pointer in HeapObject is used in various ways that |
| 1071 // prevent us from retrieving Heap from the map. | 1071 // prevent us from retrieving Heap from the map. |
| 1072 // Assert that we are not in GC, implement GC code in a way that it doesn't | 1072 // Assert that we are not in GC, implement GC code in a way that it doesn't |
| 1073 // pull heap from the map. | 1073 // pull heap from the map. |
| 1074 ASSERT(HEAP->is_safe_to_read_maps()); | 1074 ASSERT(HEAP->is_safe_to_read_maps()); |
| 1075 return map()->heap(); | 1075 return map()->heap(); |
| 1076 } | 1076 } |
| 1077 | 1077 |
| 1078 | 1078 |
| 1079 Isolate* HeapObject::GetIsolate() { |
| 1080 Isolate* i = GetHeap()->isolate(); |
| 1081 ASSERT(i == Isolate::Current()); |
| 1082 return i; |
| 1083 } |
| 1084 |
| 1085 |
| 1079 Map* HeapObject::map() { | 1086 Map* HeapObject::map() { |
| 1080 return map_word().ToMap(); | 1087 return map_word().ToMap(); |
| 1081 } | 1088 } |
| 1082 | 1089 |
| 1083 | 1090 |
| 1084 void HeapObject::set_map(Map* value) { | 1091 void HeapObject::set_map(Map* value) { |
| 1085 set_map_word(MapWord::FromMap(value)); | 1092 set_map_word(MapWord::FromMap(value)); |
| 1086 } | 1093 } |
| 1087 | 1094 |
| 1088 | 1095 |
| (...skipping 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3560 #undef WRITE_INT_FIELD | 3567 #undef WRITE_INT_FIELD |
| 3561 #undef READ_SHORT_FIELD | 3568 #undef READ_SHORT_FIELD |
| 3562 #undef WRITE_SHORT_FIELD | 3569 #undef WRITE_SHORT_FIELD |
| 3563 #undef READ_BYTE_FIELD | 3570 #undef READ_BYTE_FIELD |
| 3564 #undef WRITE_BYTE_FIELD | 3571 #undef WRITE_BYTE_FIELD |
| 3565 | 3572 |
| 3566 | 3573 |
| 3567 } } // namespace v8::internal | 3574 } } // namespace v8::internal |
| 3568 | 3575 |
| 3569 #endif // V8_OBJECTS_INL_H_ | 3576 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |