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

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

Issue 1427483002: [es6] Better support for built-ins subclassing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/objects.h » ('j') | src/objects.cc » ('J')
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 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after
3428 // We cannot always fill with one_pointer_filler_map because objects 3428 // We cannot always fill with one_pointer_filler_map because objects
3429 // created from API functions expect their internal fields to be initialized 3429 // created from API functions expect their internal fields to be initialized
3430 // with undefined_value. 3430 // with undefined_value.
3431 // Pre-allocated fields need to be initialized with undefined_value as well 3431 // Pre-allocated fields need to be initialized with undefined_value as well
3432 // so that object accesses before the constructor completes (e.g. in the 3432 // so that object accesses before the constructor completes (e.g. in the
3433 // debugger) will not cause a crash. 3433 // debugger) will not cause a crash.
3434 Object* constructor = map->GetConstructor(); 3434 Object* constructor = map->GetConstructor();
3435 if (constructor->IsJSFunction() && 3435 if (constructor->IsJSFunction() &&
3436 JSFunction::cast(constructor)->IsInobjectSlackTrackingInProgress()) { 3436 JSFunction::cast(constructor)->IsInobjectSlackTrackingInProgress()) {
3437 // We might want to shrink the object later. 3437 // We might want to shrink the object later.
3438 DCHECK(obj->GetInternalFieldCount() == 0); 3438 DCHECK_EQ(0, obj->GetInternalFieldCount());
3439 filler = Heap::one_pointer_filler_map(); 3439 filler = Heap::one_pointer_filler_map();
3440 } else { 3440 } else {
3441 filler = Heap::undefined_value(); 3441 filler = Heap::undefined_value();
3442 } 3442 }
3443 obj->InitializeBody(map, Heap::undefined_value(), filler); 3443 obj->InitializeBody(map, Heap::undefined_value(), filler);
3444 } 3444 }
3445 3445
3446 3446
3447 AllocationResult Heap::AllocateJSObjectFromMap( 3447 AllocationResult Heap::AllocateJSObjectFromMap(
3448 Map* map, PretenureFlag pretenure, AllocationSite* allocation_site) { 3448 Map* map, PretenureFlag pretenure, AllocationSite* allocation_site) {
(...skipping 2671 matching lines...) Expand 10 before | Expand all | Expand 10 after
6120 } 6120 }
6121 6121
6122 6122
6123 // static 6123 // static
6124 int Heap::GetStaticVisitorIdForMap(Map* map) { 6124 int Heap::GetStaticVisitorIdForMap(Map* map) {
6125 return StaticVisitorBase::GetVisitorId(map); 6125 return StaticVisitorBase::GetVisitorId(map);
6126 } 6126 }
6127 6127
6128 } // namespace internal 6128 } // namespace internal
6129 } // namespace v8 6129 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698