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

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 2445703002: Don't call FastNewFunctionContextStub if context is bigger than kMaxRegularHeapObjectSize. (Closed)
Patch Set: Created 4 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') | test/mjsunit/regress/regress-655573.js » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-info.h" 10 #include "src/compilation-info.h"
(...skipping 2934 matching lines...) Expand 10 before | Expand all | Expand 10 after
2945 RegisterList args = register_allocator()->NewRegisterList(3); 2945 RegisterList args = register_allocator()->NewRegisterList(3);
2946 builder() 2946 builder()
2947 ->MoveRegister(builder()->Parameter(1), args[0]) 2947 ->MoveRegister(builder()->Parameter(1), args[0])
2948 .LoadAccumulatorWithRegister(Register::function_closure()) 2948 .LoadAccumulatorWithRegister(Register::function_closure())
2949 .StoreAccumulatorInRegister(args[1]) 2949 .StoreAccumulatorInRegister(args[1])
2950 .LoadLiteral(scope->scope_info()) 2950 .LoadLiteral(scope->scope_info())
2951 .StoreAccumulatorInRegister(args[2]) 2951 .StoreAccumulatorInRegister(args[2])
2952 .CallRuntime(Runtime::kPushModuleContext, args); 2952 .CallRuntime(Runtime::kPushModuleContext, args);
2953 } else { 2953 } else {
2954 int slot_count = scope->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 2954 int slot_count = scope->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
2955 builder()->CreateFunctionContext(slot_count); 2955 if (slot_count <= FastNewFunctionContextStub::kMaximumSlots) {
2956 builder()->CreateFunctionContext(slot_count);
2957 } else {
2958 builder()->CallRuntime(Runtime::kNewFunctionContext,
2959 Register::function_closure());
2960 }
2956 } 2961 }
2957 } 2962 }
2958 2963
2959 void BytecodeGenerator::BuildLocalActivationContextInitialization() { 2964 void BytecodeGenerator::BuildLocalActivationContextInitialization() {
2960 DeclarationScope* scope = this->scope(); 2965 DeclarationScope* scope = this->scope();
2961 2966
2962 if (scope->has_this_declaration() && scope->receiver()->IsContextSlot()) { 2967 if (scope->has_this_declaration() && scope->receiver()->IsContextSlot()) {
2963 Variable* variable = scope->receiver(); 2968 Variable* variable = scope->receiver();
2964 Register receiver(builder()->Parameter(0)); 2969 Register receiver(builder()->Parameter(0));
2965 // Context variable (at bottom of the context chain). 2970 // Context variable (at bottom of the context chain).
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
3204 } 3209 }
3205 3210
3206 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { 3211 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() {
3207 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict 3212 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict
3208 : Runtime::kStoreKeyedToSuper_Sloppy; 3213 : Runtime::kStoreKeyedToSuper_Sloppy;
3209 } 3214 }
3210 3215
3211 } // namespace interpreter 3216 } // namespace interpreter
3212 } // namespace internal 3217 } // namespace internal
3213 } // namespace v8 3218 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | test/mjsunit/regress/regress-655573.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698