OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 246 matching lines...) Loading... |
257 | 257 |
258 template <class Traits> | 258 template <class Traits> |
259 void FixedTypedArray<Traits>::FixedTypedArrayVerify() { | 259 void FixedTypedArray<Traits>::FixedTypedArrayVerify() { |
260 CHECK(IsHeapObject() && | 260 CHECK(IsHeapObject() && |
261 HeapObject::cast(this)->map()->instance_type() == | 261 HeapObject::cast(this)->map()->instance_type() == |
262 Traits::kInstanceType); | 262 Traits::kInstanceType); |
263 } | 263 } |
264 | 264 |
265 | 265 |
266 bool JSObject::ElementsAreSafeToExamine() { | 266 bool JSObject::ElementsAreSafeToExamine() { |
267 return (FLAG_use_gvn && FLAG_use_allocation_folding) || | 267 // If a GC was caused while constructing this object, the elements |
268 reinterpret_cast<Map*>(elements()) != | 268 // pointer may point to a one pointer filler map. |
| 269 return reinterpret_cast<Map*>(elements()) != |
269 GetHeap()->one_pointer_filler_map(); | 270 GetHeap()->one_pointer_filler_map(); |
270 } | 271 } |
271 | 272 |
272 | 273 |
273 void JSObject::JSObjectVerify() { | 274 void JSObject::JSObjectVerify() { |
274 VerifyHeapPointer(properties()); | 275 VerifyHeapPointer(properties()); |
275 VerifyHeapPointer(elements()); | 276 VerifyHeapPointer(elements()); |
276 | 277 |
277 if (GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS) { | 278 if (GetElementsKind() == NON_STRICT_ARGUMENTS_ELEMENTS) { |
278 CHECK(this->elements()->IsFixedArray()); | 279 CHECK(this->elements()->IsFixedArray()); |
(...skipping 871 matching lines...) Loading... |
1150 for (int i = 0; i < number_of_transitions(); ++i) { | 1151 for (int i = 0; i < number_of_transitions(); ++i) { |
1151 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1152 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1152 } | 1153 } |
1153 return true; | 1154 return true; |
1154 } | 1155 } |
1155 | 1156 |
1156 | 1157 |
1157 #endif // DEBUG | 1158 #endif // DEBUG |
1158 | 1159 |
1159 } } // namespace v8::internal | 1160 } } // namespace v8::internal |
OLD | NEW |