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

Side by Side Diff: src/heap/heap.cc

Issue 1413033006: Reland "[es6] Better support for built-ins subclassing." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: We don't need TypedArray map smashing anymore Created 5 years, 1 month 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/crankshaft/hydrogen.cc ('k') | src/ia32/builtins-ia32.cc » ('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/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 3420 matching lines...) Expand 10 before | Expand all | Expand 10 after
3431 // We cannot always fill with one_pointer_filler_map because objects 3431 // We cannot always fill with one_pointer_filler_map because objects
3432 // created from API functions expect their internal fields to be initialized 3432 // created from API functions expect their internal fields to be initialized
3433 // with undefined_value. 3433 // with undefined_value.
3434 // Pre-allocated fields need to be initialized with undefined_value as well 3434 // Pre-allocated fields need to be initialized with undefined_value as well
3435 // so that object accesses before the constructor completes (e.g. in the 3435 // so that object accesses before the constructor completes (e.g. in the
3436 // debugger) will not cause a crash. 3436 // debugger) will not cause a crash.
3437 Object* constructor = map->GetConstructor(); 3437 Object* constructor = map->GetConstructor();
3438 if (constructor->IsJSFunction() && 3438 if (constructor->IsJSFunction() &&
3439 JSFunction::cast(constructor)->IsInobjectSlackTrackingInProgress()) { 3439 JSFunction::cast(constructor)->IsInobjectSlackTrackingInProgress()) {
3440 // We might want to shrink the object later. 3440 // We might want to shrink the object later.
3441 DCHECK(obj->GetInternalFieldCount() == 0); 3441 DCHECK_EQ(0, obj->GetInternalFieldCount());
3442 filler = Heap::one_pointer_filler_map(); 3442 filler = Heap::one_pointer_filler_map();
3443 } else { 3443 } else {
3444 filler = Heap::undefined_value(); 3444 filler = Heap::undefined_value();
3445 } 3445 }
3446 obj->InitializeBody(map, Heap::undefined_value(), filler); 3446 obj->InitializeBody(map, Heap::undefined_value(), filler);
3447 } 3447 }
3448 3448
3449 3449
3450 AllocationResult Heap::AllocateJSObjectFromMap( 3450 AllocationResult Heap::AllocateJSObjectFromMap(
3451 Map* map, PretenureFlag pretenure, AllocationSite* allocation_site) { 3451 Map* map, PretenureFlag pretenure, AllocationSite* allocation_site) {
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after
6172 } 6172 }
6173 6173
6174 6174
6175 // static 6175 // static
6176 int Heap::GetStaticVisitorIdForMap(Map* map) { 6176 int Heap::GetStaticVisitorIdForMap(Map* map) {
6177 return StaticVisitorBase::GetVisitorId(map); 6177 return StaticVisitorBase::GetVisitorId(map);
6178 } 6178 }
6179 6179
6180 } // namespace internal 6180 } // namespace internal
6181 } // namespace v8 6181 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698