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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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 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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 // Possibly allocate a local context. 166 // Possibly allocate a local context.
167 if (info_->scope()->NeedsContext()) { 167 if (info_->scope()->NeedsContext()) {
168 Comment(";;; Allocate local context"); 168 Comment(";;; Allocate local context");
169 bool need_write_barrier = true; 169 bool need_write_barrier = true;
170 // Argument to NewContext is the function, which is still in edi. 170 // Argument to NewContext is the function, which is still in edi.
171 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 171 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
172 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 172 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
173 if (info()->scope()->is_script_scope()) { 173 if (info()->scope()->is_script_scope()) {
174 __ push(edi); 174 __ push(edi);
175 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 175 __ Push(info()->scope()->scope_info());
176 __ CallRuntime(Runtime::kNewScriptContext); 176 __ CallRuntime(Runtime::kNewScriptContext);
177 deopt_mode = Safepoint::kLazyDeopt; 177 deopt_mode = Safepoint::kLazyDeopt;
178 } else { 178 } else {
179 FastNewFunctionContextStub stub(isolate()); 179 FastNewFunctionContextStub stub(isolate());
180 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), 180 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
181 Immediate(slots)); 181 Immediate(slots));
182 __ CallStub(&stub); 182 __ CallStub(&stub);
183 // Result of FastNewFunctionContextStub is always in new space. 183 // Result of FastNewFunctionContextStub is always in new space.
184 need_write_barrier = false; 184 need_write_barrier = false;
185 } 185 }
(...skipping 5095 matching lines...) Expand 10 before | Expand all | Expand 10 after
5281 __ bind(deferred->exit()); 5281 __ bind(deferred->exit());
5282 __ bind(&done); 5282 __ bind(&done);
5283 } 5283 }
5284 5284
5285 #undef __ 5285 #undef __
5286 5286
5287 } // namespace internal 5287 } // namespace internal
5288 } // namespace v8 5288 } // namespace v8
5289 5289
5290 #endif // V8_TARGET_ARCH_IA32 5290 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698