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

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

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (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 | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/ia32/code-stubs-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 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 PretenureFlag pretenure, 3477 PretenureFlag pretenure,
3478 AllocationSite* allocation_site) { 3478 AllocationSite* allocation_site) {
3479 DCHECK(constructor->has_initial_map()); 3479 DCHECK(constructor->has_initial_map());
3480 3480
3481 // Allocate the object based on the constructors initial map. 3481 // Allocate the object based on the constructors initial map.
3482 AllocationResult allocation = AllocateJSObjectFromMap( 3482 AllocationResult allocation = AllocateJSObjectFromMap(
3483 constructor->initial_map(), pretenure, allocation_site); 3483 constructor->initial_map(), pretenure, allocation_site);
3484 #ifdef DEBUG 3484 #ifdef DEBUG
3485 // Make sure result is NOT a global object if valid. 3485 // Make sure result is NOT a global object if valid.
3486 HeapObject* obj = nullptr; 3486 HeapObject* obj = nullptr;
3487 DCHECK(!allocation.To(&obj) || !obj->IsGlobalObject()); 3487 DCHECK(!allocation.To(&obj) || !obj->IsJSGlobalObject());
3488 #endif 3488 #endif
3489 return allocation; 3489 return allocation;
3490 } 3490 }
3491 3491
3492 3492
3493 AllocationResult Heap::CopyJSObject(JSObject* source, AllocationSite* site) { 3493 AllocationResult Heap::CopyJSObject(JSObject* source, AllocationSite* site) {
3494 // Make the clone. 3494 // Make the clone.
3495 Map* map = source->map(); 3495 Map* map = source->map();
3496 3496
3497 // We can only clone normal objects or arrays. Copying anything else 3497 // We can only clone normal objects or arrays. Copying anything else
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after
6171 } 6171 }
6172 6172
6173 6173
6174 // static 6174 // static
6175 int Heap::GetStaticVisitorIdForMap(Map* map) { 6175 int Heap::GetStaticVisitorIdForMap(Map* map) {
6176 return StaticVisitorBase::GetVisitorId(map); 6176 return StaticVisitorBase::GetVisitorId(map);
6177 } 6177 }
6178 6178
6179 } // namespace internal 6179 } // namespace internal
6180 } // namespace v8 6180 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698