Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: src/objects-debug.cc

Issue 1176263004: Introduce a base pointer field in FixedTypedArrayBase and teach GC about it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 TYPED_ARRAYS(EXTERNAL_ARRAY_VERIFY) 235 TYPED_ARRAYS(EXTERNAL_ARRAY_VERIFY)
236 #undef EXTERNAL_ARRAY_VERIFY 236 #undef EXTERNAL_ARRAY_VERIFY
237 237
238 238
239 template <class Traits> 239 template <class Traits>
240 void FixedTypedArray<Traits>::FixedTypedArrayVerify() { 240 void FixedTypedArray<Traits>::FixedTypedArrayVerify() {
241 CHECK(IsHeapObject() && 241 CHECK(IsHeapObject() &&
242 HeapObject::cast(this)->map()->instance_type() == 242 HeapObject::cast(this)->map()->instance_type() ==
243 Traits::kInstanceType); 243 Traits::kInstanceType);
244 CHECK(base_pointer() == this);
244 } 245 }
245 246
246 247
247 bool JSObject::ElementsAreSafeToExamine() { 248 bool JSObject::ElementsAreSafeToExamine() {
248 // If a GC was caused while constructing this object, the elements 249 // If a GC was caused while constructing this object, the elements
249 // pointer may point to a one pointer filler map. 250 // pointer may point to a one pointer filler map.
250 return reinterpret_cast<Map*>(elements()) != 251 return reinterpret_cast<Map*>(elements()) !=
251 GetHeap()->one_pointer_filler_map(); 252 GetHeap()->one_pointer_filler_map();
252 } 253 }
253 254
(...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 : it.rinfo()->target_object(); 1272 : it.rinfo()->target_object();
1272 CHECK(!CanLeak(target, heap, skip_weak_cell)); 1273 CHECK(!CanLeak(target, heap, skip_weak_cell));
1273 } 1274 }
1274 } 1275 }
1275 1276
1276 1277
1277 #endif // DEBUG 1278 #endif // DEBUG
1278 1279
1279 } // namespace internal 1280 } // namespace internal
1280 } // namespace v8 1281 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698