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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 2281073002: Create ScopeInfos while analyzing the Scope chain (Closed)
Patch Set: rebase Created 4 years, 3 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/debug/debug-scopes.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 bool function_in_register_r1 = true; 167 bool function_in_register_r1 = true;
168 168
169 // Possibly allocate a local context. 169 // Possibly allocate a local context.
170 if (info->scope()->NeedsContext()) { 170 if (info->scope()->NeedsContext()) {
171 // Argument to NewContext is the function, which is still in r1. 171 // Argument to NewContext is the function, which is still in r1.
172 Comment cmnt(masm_, "[ Allocate context"); 172 Comment cmnt(masm_, "[ Allocate context");
173 bool need_write_barrier = true; 173 bool need_write_barrier = true;
174 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 174 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
175 if (info->scope()->is_script_scope()) { 175 if (info->scope()->is_script_scope()) {
176 __ push(r1); 176 __ push(r1);
177 __ Push(info->scope()->GetScopeInfo(info->isolate())); 177 __ Push(info->scope()->scope_info());
178 __ CallRuntime(Runtime::kNewScriptContext); 178 __ CallRuntime(Runtime::kNewScriptContext);
179 PrepareForBailoutForId(BailoutId::ScriptContext(), 179 PrepareForBailoutForId(BailoutId::ScriptContext(),
180 BailoutState::TOS_REGISTER); 180 BailoutState::TOS_REGISTER);
181 // The new target value is not used, clobbering is safe. 181 // The new target value is not used, clobbering is safe.
182 DCHECK_NULL(info->scope()->new_target_var()); 182 DCHECK_NULL(info->scope()->new_target_var());
183 } else { 183 } else {
184 if (info->scope()->new_target_var() != nullptr) { 184 if (info->scope()->new_target_var() != nullptr) {
185 __ push(r3); // Preserve new target. 185 __ push(r3); // Preserve new target.
186 } 186 }
187 FastNewFunctionContextStub stub(isolate()); 187 FastNewFunctionContextStub stub(isolate());
(...skipping 3628 matching lines...) Expand 10 before | Expand all | Expand 10 after
3816 DCHECK(interrupt_address == 3816 DCHECK(interrupt_address ==
3817 isolate->builtins()->OnStackReplacement()->entry()); 3817 isolate->builtins()->OnStackReplacement()->entry());
3818 return ON_STACK_REPLACEMENT; 3818 return ON_STACK_REPLACEMENT;
3819 } 3819 }
3820 3820
3821 3821
3822 } // namespace internal 3822 } // namespace internal
3823 } // namespace v8 3823 } // namespace v8
3824 3824
3825 #endif // V8_TARGET_ARCH_ARM 3825 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698