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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.cc

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Changes from review Created 4 years 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/x64/lithium-codegen-x64.cc ('k') | src/debug/debug-scopes.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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 bool need_write_barrier = true; 139 bool need_write_barrier = true;
140 // Argument to NewContext is the function, which is still in edi. 140 // Argument to NewContext is the function, which is still in edi.
141 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; 141 int slots = info_->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS;
142 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt; 142 Safepoint::DeoptMode deopt_mode = Safepoint::kNoLazyDeopt;
143 if (info()->scope()->is_script_scope()) { 143 if (info()->scope()->is_script_scope()) {
144 __ push(edi); 144 __ push(edi);
145 __ Push(info()->scope()->scope_info()); 145 __ Push(info()->scope()->scope_info());
146 __ CallRuntime(Runtime::kNewScriptContext); 146 __ CallRuntime(Runtime::kNewScriptContext);
147 deopt_mode = Safepoint::kLazyDeopt; 147 deopt_mode = Safepoint::kLazyDeopt;
148 } else { 148 } else {
149 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 149 if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
150 FastNewFunctionContextStub stub(isolate()); 150 FastNewFunctionContextStub stub(isolate(),
151 info()->scope()->scope_type());
151 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), 152 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
152 Immediate(slots)); 153 Immediate(slots));
153 __ CallStub(&stub); 154 __ CallStub(&stub);
154 // Result of FastNewFunctionContextStub is always in new space. 155 // Result of FastNewFunctionContextStub is always in new space.
155 need_write_barrier = false; 156 need_write_barrier = false;
156 } else { 157 } else {
157 __ push(edi); 158 __ push(edi);
159 __ Push(Smi::FromInt(info()->scope()->scope_type()));
158 __ CallRuntime(Runtime::kNewFunctionContext); 160 __ CallRuntime(Runtime::kNewFunctionContext);
159 } 161 }
160 } 162 }
161 RecordSafepoint(deopt_mode); 163 RecordSafepoint(deopt_mode);
162 164
163 // Context is returned in eax. It replaces the context passed to us. 165 // Context is returned in eax. It replaces the context passed to us.
164 // It's saved in the stack and kept live in esi. 166 // It's saved in the stack and kept live in esi.
165 __ mov(esi, eax); 167 __ mov(esi, eax);
166 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); 168 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax);
167 169
(...skipping 5480 matching lines...) Expand 10 before | Expand all | Expand 10 after
5648 __ bind(deferred->exit()); 5650 __ bind(deferred->exit());
5649 __ bind(&done); 5651 __ bind(&done);
5650 } 5652 }
5651 5653
5652 #undef __ 5654 #undef __
5653 5655
5654 } // namespace internal 5656 } // namespace internal
5655 } // namespace v8 5657 } // namespace v8
5656 5658
5657 #endif // V8_TARGET_ARCH_X87 5659 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/debug/debug-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698