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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 __ Push(x1, x10); 194 __ Push(x1, x10);
195 __ CallRuntime(Runtime::kNewScriptContext); 195 __ CallRuntime(Runtime::kNewScriptContext);
196 PrepareForBailoutForId(BailoutId::ScriptContext(), 196 PrepareForBailoutForId(BailoutId::ScriptContext(),
197 BailoutState::TOS_REGISTER); 197 BailoutState::TOS_REGISTER);
198 // The new target value is not used, clobbering is safe. 198 // The new target value is not used, clobbering is safe.
199 DCHECK_NULL(info->scope()->new_target_var()); 199 DCHECK_NULL(info->scope()->new_target_var());
200 } else { 200 } else {
201 if (info->scope()->new_target_var() != nullptr) { 201 if (info->scope()->new_target_var() != nullptr) {
202 __ Push(x3); // Preserve new target. 202 __ Push(x3); // Preserve new target.
203 } 203 }
204 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 204 if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
205 FastNewFunctionContextStub stub(isolate()); 205 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type());
206 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots); 206 __ Mov(FastNewFunctionContextDescriptor::SlotsRegister(), slots);
207 __ CallStub(&stub); 207 __ CallStub(&stub);
208 // Result of FastNewFunctionContextStub is always in new space. 208 // Result of FastNewFunctionContextStub is always in new space.
209 need_write_barrier = false; 209 need_write_barrier = false;
210 } else { 210 } else {
211 __ Push(x1); 211 __ Push(x1);
212 __ Push(Smi::FromInt(info->scope()->scope_type()));
212 __ CallRuntime(Runtime::kNewFunctionContext); 213 __ CallRuntime(Runtime::kNewFunctionContext);
213 } 214 }
214 if (info->scope()->new_target_var() != nullptr) { 215 if (info->scope()->new_target_var() != nullptr) {
215 __ Pop(x3); // Restore new target. 216 __ Pop(x3); // Restore new target.
216 } 217 }
217 } 218 }
218 function_in_register_x1 = false; 219 function_in_register_x1 = false;
219 // Context is returned in x0. It replaces the context passed to us. 220 // Context is returned in x0. It replaces the context passed to us.
220 // It's saved in the stack and kept live in cp. 221 // It's saved in the stack and kept live in cp.
221 __ Mov(cp, x0); 222 __ Mov(cp, x0);
(...skipping 2696 matching lines...) Expand 10 before | Expand all | Expand 10 after
2918 } 2919 }
2919 2920
2920 return INTERRUPT; 2921 return INTERRUPT;
2921 } 2922 }
2922 2923
2923 2924
2924 } // namespace internal 2925 } // namespace internal
2925 } // namespace v8 2926 } // namespace v8
2926 2927
2927 #endif // V8_TARGET_ARCH_ARM64 2928 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698