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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 bool function_in_register_a1 = true; 177 bool function_in_register_a1 = true;
178 178
179 // Possibly allocate a local context. 179 // Possibly allocate a local context.
180 if (info->scope()->NeedsContext()) { 180 if (info->scope()->NeedsContext()) {
181 Comment cmnt(masm_, "[ Allocate context"); 181 Comment cmnt(masm_, "[ Allocate context");
182 // Argument to NewContext is the function, which is still in a1. 182 // Argument to NewContext is the function, which is still in a1.
183 bool need_write_barrier = true; 183 bool need_write_barrier = true;
184 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 184 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
185 if (info->scope()->is_script_scope()) { 185 if (info->scope()->is_script_scope()) {
186 __ push(a1); 186 __ push(a1);
187 __ Push(info->scope()->GetScopeInfo(info->isolate())); 187 __ Push(info->scope()->scope_info());
188 __ CallRuntime(Runtime::kNewScriptContext); 188 __ CallRuntime(Runtime::kNewScriptContext);
189 PrepareForBailoutForId(BailoutId::ScriptContext(), 189 PrepareForBailoutForId(BailoutId::ScriptContext(),
190 BailoutState::TOS_REGISTER); 190 BailoutState::TOS_REGISTER);
191 // The new target value is not used, clobbering is safe. 191 // The new target value is not used, clobbering is safe.
192 DCHECK_NULL(info->scope()->new_target_var()); 192 DCHECK_NULL(info->scope()->new_target_var());
193 } else { 193 } else {
194 if (info->scope()->new_target_var() != nullptr) { 194 if (info->scope()->new_target_var() != nullptr) {
195 __ push(a3); // Preserve new target. 195 __ push(a3); // Preserve new target.
196 } 196 }
197 FastNewFunctionContextStub stub(isolate()); 197 FastNewFunctionContextStub stub(isolate());
(...skipping 3559 matching lines...) Expand 10 before | Expand all | Expand 10 after
3757 reinterpret_cast<uint32_t>( 3757 reinterpret_cast<uint32_t>(
3758 isolate->builtins()->OnStackReplacement()->entry())); 3758 isolate->builtins()->OnStackReplacement()->entry()));
3759 return ON_STACK_REPLACEMENT; 3759 return ON_STACK_REPLACEMENT;
3760 } 3760 }
3761 3761
3762 3762
3763 } // namespace internal 3763 } // namespace internal
3764 } // namespace v8 3764 } // namespace v8
3765 3765
3766 #endif // V8_TARGET_ARCH_MIPS 3766 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698