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

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

Issue 2281073002: Create ScopeInfos while analyzing the Scope chain (Closed)
Patch Set: updates 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 bool function_in_register_r4 = true; 173 bool function_in_register_r4 = true;
174 174
175 // Possibly allocate a local context. 175 // Possibly allocate a local context.
176 if (info->scope()->NeedsContext()) { 176 if (info->scope()->NeedsContext()) {
177 // Argument to NewContext is the function, which is still in r4. 177 // Argument to NewContext is the function, which is still in r4.
178 Comment cmnt(masm_, "[ Allocate context"); 178 Comment cmnt(masm_, "[ Allocate context");
179 bool need_write_barrier = true; 179 bool need_write_barrier = true;
180 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 180 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
181 if (info->scope()->is_script_scope()) { 181 if (info->scope()->is_script_scope()) {
182 __ push(r4); 182 __ push(r4);
183 __ Push(info->scope()->GetScopeInfo(info->isolate())); 183 __ Push(info->scope()->scope_info());
184 __ CallRuntime(Runtime::kNewScriptContext); 184 __ CallRuntime(Runtime::kNewScriptContext);
185 PrepareForBailoutForId(BailoutId::ScriptContext(), 185 PrepareForBailoutForId(BailoutId::ScriptContext(),
186 BailoutState::TOS_REGISTER); 186 BailoutState::TOS_REGISTER);
187 // The new target value is not used, clobbering is safe. 187 // The new target value is not used, clobbering is safe.
188 DCHECK_NULL(info->scope()->new_target_var()); 188 DCHECK_NULL(info->scope()->new_target_var());
189 } else { 189 } else {
190 if (info->scope()->new_target_var() != nullptr) { 190 if (info->scope()->new_target_var() != nullptr) {
191 __ push(r6); // Preserve new target. 191 __ push(r6); // Preserve new target.
192 } 192 }
193 FastNewFunctionContextStub stub(isolate()); 193 FastNewFunctionContextStub stub(isolate());
(...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after
3736 3736
3737 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3737 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3738 3738
3739 DCHECK(interrupt_address == 3739 DCHECK(interrupt_address ==
3740 isolate->builtins()->OnStackReplacement()->entry()); 3740 isolate->builtins()->OnStackReplacement()->entry());
3741 return ON_STACK_REPLACEMENT; 3741 return ON_STACK_REPLACEMENT;
3742 } 3742 }
3743 } // namespace internal 3743 } // namespace internal
3744 } // namespace v8 3744 } // namespace v8
3745 #endif // V8_TARGET_ARCH_PPC 3745 #endif // V8_TARGET_ARCH_PPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698