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

Side by Side Diff: src/full-codegen/ia32/full-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/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 __ Push(info->scope()->scope_info()); 180 __ Push(info->scope()->scope_info());
181 __ CallRuntime(Runtime::kNewScriptContext); 181 __ CallRuntime(Runtime::kNewScriptContext);
182 PrepareForBailoutForId(BailoutId::ScriptContext(), 182 PrepareForBailoutForId(BailoutId::ScriptContext(),
183 BailoutState::TOS_REGISTER); 183 BailoutState::TOS_REGISTER);
184 // The new target value is not used, clobbering is safe. 184 // The new target value is not used, clobbering is safe.
185 DCHECK_NULL(info->scope()->new_target_var()); 185 DCHECK_NULL(info->scope()->new_target_var());
186 } else { 186 } else {
187 if (info->scope()->new_target_var() != nullptr) { 187 if (info->scope()->new_target_var() != nullptr) {
188 __ push(edx); // Preserve new target. 188 __ push(edx); // Preserve new target.
189 } 189 }
190 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 190 if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
191 FastNewFunctionContextStub stub(isolate()); 191 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type());
192 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), 192 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
193 Immediate(slots)); 193 Immediate(slots));
194 __ CallStub(&stub); 194 __ CallStub(&stub);
195 // Result of FastNewFunctionContextStub is always in new space. 195 // Result of FastNewFunctionContextStub is always in new space.
196 need_write_barrier = false; 196 need_write_barrier = false;
197 } else { 197 } else {
198 __ push(edi); 198 __ push(edi);
199 __ Push(Smi::FromInt(info->scope()->scope_type()));
199 __ CallRuntime(Runtime::kNewFunctionContext); 200 __ CallRuntime(Runtime::kNewFunctionContext);
200 } 201 }
201 if (info->scope()->new_target_var() != nullptr) { 202 if (info->scope()->new_target_var() != nullptr) {
202 __ pop(edx); // Restore new target. 203 __ pop(edx); // Restore new target.
203 } 204 }
204 } 205 }
205 function_in_register = false; 206 function_in_register = false;
206 // Context is returned in eax. It replaces the context passed to us. 207 // Context is returned in eax. It replaces the context passed to us.
207 // It's saved in the stack and kept live in esi. 208 // It's saved in the stack and kept live in esi.
208 __ mov(esi, eax); 209 __ mov(esi, eax);
(...skipping 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after
2788 isolate->builtins()->OnStackReplacement()->entry(), 2789 isolate->builtins()->OnStackReplacement()->entry(),
2789 Assembler::target_address_at(call_target_address, unoptimized_code)); 2790 Assembler::target_address_at(call_target_address, unoptimized_code));
2790 return ON_STACK_REPLACEMENT; 2791 return ON_STACK_REPLACEMENT;
2791 } 2792 }
2792 2793
2793 2794
2794 } // namespace internal 2795 } // namespace internal
2795 } // namespace v8 2796 } // namespace v8
2796 2797
2797 #endif // V8_TARGET_ARCH_IA32 2798 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698