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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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/full-codegen/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-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 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_X64 5 #if V8_TARGET_ARCH_X64
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(rdx); // Preserve new target. 188 __ Push(rdx); // 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 __ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots); 192 __ Set(FastNewFunctionContextDescriptor::SlotsRegister(), slots);
193 __ CallStub(&stub); 193 __ CallStub(&stub);
194 // Result of FastNewFunctionContextStub is always in new space. 194 // Result of FastNewFunctionContextStub is always in new space.
195 need_write_barrier = false; 195 need_write_barrier = false;
196 } else { 196 } else {
197 __ Push(rdi); 197 __ Push(rdi);
198 __ Push(Smi::FromInt(info->scope()->scope_type()));
198 __ CallRuntime(Runtime::kNewFunctionContext); 199 __ CallRuntime(Runtime::kNewFunctionContext);
199 } 200 }
200 if (info->scope()->new_target_var() != nullptr) { 201 if (info->scope()->new_target_var() != nullptr) {
201 __ Pop(rdx); // Restore new target. 202 __ Pop(rdx); // Restore new target.
202 } 203 }
203 } 204 }
204 function_in_register = false; 205 function_in_register = false;
205 // Context is returned in rax. It replaces the context passed to us. 206 // Context is returned in rax. It replaces the context passed to us.
206 // It's saved in the stack and kept live in rsi. 207 // It's saved in the stack and kept live in rsi.
207 __ movp(rsi, rax); 208 __ movp(rsi, rax);
(...skipping 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2770 DCHECK_EQ( 2771 DCHECK_EQ(
2771 isolate->builtins()->OnStackReplacement()->entry(), 2772 isolate->builtins()->OnStackReplacement()->entry(),
2772 Assembler::target_address_at(call_target_address, unoptimized_code)); 2773 Assembler::target_address_at(call_target_address, unoptimized_code));
2773 return ON_STACK_REPLACEMENT; 2774 return ON_STACK_REPLACEMENT;
2774 } 2775 }
2775 2776
2776 } // namespace internal 2777 } // namespace internal
2777 } // namespace v8 2778 } // namespace v8
2778 2779
2779 #endif // V8_TARGET_ARCH_X64 2780 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698