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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()->scope_info()); 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 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 179 if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
180 FastNewFunctionContextStub stub(isolate()); 180 FastNewFunctionContextStub stub(isolate(),
181 info()->scope()->scope_type());
181 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), 182 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
182 Immediate(slots)); 183 Immediate(slots));
183 __ CallStub(&stub); 184 __ CallStub(&stub);
184 // Result of FastNewFunctionContextStub is always in new space. 185 // Result of FastNewFunctionContextStub is always in new space.
185 need_write_barrier = false; 186 need_write_barrier = false;
186 } else { 187 } else {
187 __ push(edi); 188 __ Push(edi);
189 __ Push(Smi::FromInt(info()->scope()->scope_type()));
188 __ CallRuntime(Runtime::kNewFunctionContext); 190 __ CallRuntime(Runtime::kNewFunctionContext);
189 } 191 }
190 } 192 }
191 RecordSafepoint(deopt_mode); 193 RecordSafepoint(deopt_mode);
192 194
193 // Context is returned in eax. It replaces the context passed to us. 195 // Context is returned in eax. It replaces the context passed to us.
194 // It's saved in the stack and kept live in esi. 196 // It's saved in the stack and kept live in esi.
195 __ mov(esi, eax); 197 __ mov(esi, eax);
196 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax); 198 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), eax);
197 199
(...skipping 4950 matching lines...) Expand 10 before | Expand all | Expand 10 after
5148 __ bind(deferred->exit()); 5150 __ bind(deferred->exit());
5149 __ bind(&done); 5151 __ bind(&done);
5150 } 5152 }
5151 5153
5152 #undef __ 5154 #undef __
5153 5155
5154 } // namespace internal 5156 } // namespace internal
5155 } // namespace v8 5157 } // namespace v8
5156 5158
5157 #endif // V8_TARGET_ARCH_IA32 5159 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698