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

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

Issue 1612323003: Introduce {FAST,SLOW}_STRING_WRAPPER_ELEMENTS (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: one more DCHECK fix Created 4 years, 10 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/factory.h ('k') | src/ic/ic.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/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 3499 matching lines...) Expand 10 before | Expand all | Expand 10 after
3510 FixedArray* properties = empty_fixed_array(); 3510 FixedArray* properties = empty_fixed_array();
3511 3511
3512 // Allocate the JSObject. 3512 // Allocate the JSObject.
3513 AllocationSpace space = SelectSpace(pretenure); 3513 AllocationSpace space = SelectSpace(pretenure);
3514 JSObject* js_obj = nullptr; 3514 JSObject* js_obj = nullptr;
3515 AllocationResult allocation = Allocate(map, space, allocation_site); 3515 AllocationResult allocation = Allocate(map, space, allocation_site);
3516 if (!allocation.To(&js_obj)) return allocation; 3516 if (!allocation.To(&js_obj)) return allocation;
3517 3517
3518 // Initialize the JSObject. 3518 // Initialize the JSObject.
3519 InitializeJSObjectFromMap(js_obj, properties, map); 3519 InitializeJSObjectFromMap(js_obj, properties, map);
3520 DCHECK(js_obj->HasFastElements() || js_obj->HasFixedTypedArrayElements()); 3520 DCHECK(js_obj->HasFastElements() || js_obj->HasFixedTypedArrayElements() ||
3521 js_obj->HasFastStringWrapperElements());
3521 return js_obj; 3522 return js_obj;
3522 } 3523 }
3523 3524
3524 3525
3525 AllocationResult Heap::AllocateJSObject(JSFunction* constructor, 3526 AllocationResult Heap::AllocateJSObject(JSFunction* constructor,
3526 PretenureFlag pretenure, 3527 PretenureFlag pretenure,
3527 AllocationSite* allocation_site) { 3528 AllocationSite* allocation_site) {
3528 DCHECK(constructor->has_initial_map()); 3529 DCHECK(constructor->has_initial_map());
3529 3530
3530 // Allocate the object based on the constructors initial map. 3531 // Allocate the object based on the constructors initial map.
(...skipping 2690 matching lines...) Expand 10 before | Expand all | Expand 10 after
6221 } 6222 }
6222 6223
6223 6224
6224 // static 6225 // static
6225 int Heap::GetStaticVisitorIdForMap(Map* map) { 6226 int Heap::GetStaticVisitorIdForMap(Map* map) {
6226 return StaticVisitorBase::GetVisitorId(map); 6227 return StaticVisitorBase::GetVisitorId(map);
6227 } 6228 }
6228 6229
6229 } // namespace internal 6230 } // namespace internal
6230 } // namespace v8 6231 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698