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

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

Issue 1923253002: [generators] Create the fixed array holding the registers only once. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 7 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/heap/heap.h ('k') | src/interpreter/interpreter.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 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 ALLOCATE_MAP(FOREIGN_TYPE, Foreign::kSize, foreign) 2283 ALLOCATE_MAP(FOREIGN_TYPE, Foreign::kSize, foreign)
2284 2284
2285 ALLOCATE_PRIMITIVE_MAP(ODDBALL_TYPE, Oddball::kSize, boolean, 2285 ALLOCATE_PRIMITIVE_MAP(ODDBALL_TYPE, Oddball::kSize, boolean,
2286 Context::BOOLEAN_FUNCTION_INDEX); 2286 Context::BOOLEAN_FUNCTION_INDEX);
2287 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, uninitialized); 2287 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, uninitialized);
2288 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, arguments_marker); 2288 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, arguments_marker);
2289 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, no_interceptor_result_sentinel); 2289 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, no_interceptor_result_sentinel);
2290 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, exception); 2290 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, exception);
2291 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, termination_exception); 2291 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, termination_exception);
2292 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, optimized_out); 2292 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, optimized_out);
2293 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, stale_register);
2293 2294
2294 for (unsigned i = 0; i < arraysize(string_type_table); i++) { 2295 for (unsigned i = 0; i < arraysize(string_type_table); i++) {
2295 const StringTypeTable& entry = string_type_table[i]; 2296 const StringTypeTable& entry = string_type_table[i];
2296 { 2297 {
2297 AllocationResult allocation = AllocateMap(entry.type, entry.size); 2298 AllocationResult allocation = AllocateMap(entry.type, entry.size);
2298 if (!allocation.To(&obj)) return false; 2299 if (!allocation.To(&obj)) return false;
2299 } 2300 }
2300 Map* map = Map::cast(obj); 2301 Map* map = Map::cast(obj);
2301 map->SetConstructorFunctionIndex(Context::STRING_FUNCTION_INDEX); 2302 map->SetConstructorFunctionIndex(Context::STRING_FUNCTION_INDEX);
2302 // Mark cons string maps as unstable, because their objects can change 2303 // Mark cons string maps as unstable, because their objects can change
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 2658
2658 set_exception(*factory->NewOddball(factory->exception_map(), "exception", 2659 set_exception(*factory->NewOddball(factory->exception_map(), "exception",
2659 handle(Smi::FromInt(-5), isolate()), false, 2660 handle(Smi::FromInt(-5), isolate()), false,
2660 "undefined", Oddball::kException)); 2661 "undefined", Oddball::kException));
2661 2662
2662 set_optimized_out( 2663 set_optimized_out(
2663 *factory->NewOddball(factory->optimized_out_map(), "optimized_out", 2664 *factory->NewOddball(factory->optimized_out_map(), "optimized_out",
2664 handle(Smi::FromInt(-6), isolate()), false, 2665 handle(Smi::FromInt(-6), isolate()), false,
2665 "undefined", Oddball::kOptimizedOut)); 2666 "undefined", Oddball::kOptimizedOut));
2666 2667
2668 set_stale_register(
2669 *factory->NewOddball(factory->stale_register_map(), "stale_register",
2670 handle(Smi::FromInt(-7), isolate()), false,
2671 "undefined", Oddball::kStaleRegister));
2672
2667 for (unsigned i = 0; i < arraysize(constant_string_table); i++) { 2673 for (unsigned i = 0; i < arraysize(constant_string_table); i++) {
2668 Handle<String> str = 2674 Handle<String> str =
2669 factory->InternalizeUtf8String(constant_string_table[i].contents); 2675 factory->InternalizeUtf8String(constant_string_table[i].contents);
2670 roots_[constant_string_table[i].index] = *str; 2676 roots_[constant_string_table[i].index] = *str;
2671 } 2677 }
2672 2678
2673 // Create the code_stubs dictionary. The initial size is set to avoid 2679 // Create the code_stubs dictionary. The initial size is set to avoid
2674 // expanding the dictionary during bootstrapping. 2680 // expanding the dictionary during bootstrapping.
2675 set_code_stubs(*UnseededNumberDictionary::New(isolate(), 128)); 2681 set_code_stubs(*UnseededNumberDictionary::New(isolate(), 128));
2676 2682
(...skipping 3746 matching lines...) Expand 10 before | Expand all | Expand 10 after
6423 } 6429 }
6424 6430
6425 6431
6426 // static 6432 // static
6427 int Heap::GetStaticVisitorIdForMap(Map* map) { 6433 int Heap::GetStaticVisitorIdForMap(Map* map) {
6428 return StaticVisitorBase::GetVisitorId(map); 6434 return StaticVisitorBase::GetVisitorId(map);
6429 } 6435 }
6430 6436
6431 } // namespace internal 6437 } // namespace internal
6432 } // namespace v8 6438 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698