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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.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/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 Comment(";;; Allocate local context"); 171 Comment(";;; Allocate local context");
172 bool need_write_barrier = true; 172 bool need_write_barrier = true;
173 // Argument to NewContext is the function, which is still in rdi. 173 // Argument to NewContext is the function, which is still in rdi.
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 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 175 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
176 if (info()->scope()->is_script_scope()) { 176 if (info()->scope()->is_script_scope()) {
177 __ Push(rdi); 177 __ Push(rdi);
178 __ Push(info()->scope()->GetScopeInfo(info()->isolate())); 178 __ Push(info()->scope()->scope_info());
179 __ CallRuntime(Runtime::kNewScriptContext); 179 __ CallRuntime(Runtime::kNewScriptContext);
180 deopt_mode = Safepoint::kLazyDeopt; 180 deopt_mode = Safepoint::kLazyDeopt;
181 } else { 181 } else {
182 FastNewFunctionContextStub stub(isolate()); 182 FastNewFunctionContextStub stub(isolate());
183 __ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots); 183 __ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots);
184 __ CallStub(&stub); 184 __ CallStub(&stub);
185 // Result of FastNewFunctionContextStub is always in new space. 185 // Result of FastNewFunctionContextStub is always in new space.
186 need_write_barrier = false; 186 need_write_barrier = false;
187 } 187 }
188 RecordSafepoint(deopt_mode); 188 RecordSafepoint(deopt_mode);
(...skipping 5375 matching lines...) Expand 10 before | Expand all | Expand 10 after
5564 __ bind(deferred->exit()); 5564 __ bind(deferred->exit());
5565 __ bind(&done); 5565 __ bind(&done);
5566 } 5566 }
5567 5567
5568 #undef __ 5568 #undef __
5569 5569
5570 } // namespace internal 5570 } // namespace internal
5571 } // namespace v8 5571 } // namespace v8
5572 5572
5573 #endif // V8_TARGET_ARCH_X64 5573 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698