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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/flag-definitions.h ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 __ Push(info->scope()->scope_info()); 191 __ Push(info->scope()->scope_info());
192 __ CallRuntime(Runtime::kNewScriptContext); 192 __ CallRuntime(Runtime::kNewScriptContext);
193 PrepareForBailoutForId(BailoutId::ScriptContext(), 193 PrepareForBailoutForId(BailoutId::ScriptContext(),
194 BailoutState::TOS_REGISTER); 194 BailoutState::TOS_REGISTER);
195 // The new target value is not used, clobbering is safe. 195 // The new target value is not used, clobbering is safe.
196 DCHECK_NULL(info->scope()->new_target_var()); 196 DCHECK_NULL(info->scope()->new_target_var());
197 } else { 197 } else {
198 if (info->scope()->new_target_var() != nullptr) { 198 if (info->scope()->new_target_var() != nullptr) {
199 __ push(r3); // Preserve new target. 199 __ push(r3); // Preserve new target.
200 } 200 }
201 if (slots <= FastNewFunctionContextStub::kMaximumSlots) { 201 if (slots <= FastNewFunctionContextStub::MaximumSlots()) {
202 FastNewFunctionContextStub stub(isolate()); 202 FastNewFunctionContextStub stub(isolate(), info->scope()->scope_type());
203 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), 203 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(),
204 Operand(slots)); 204 Operand(slots));
205 __ CallStub(&stub); 205 __ CallStub(&stub);
206 // Result of FastNewFunctionContextStub is always in new space. 206 // Result of FastNewFunctionContextStub is always in new space.
207 need_write_barrier = false; 207 need_write_barrier = false;
208 } else { 208 } else {
209 __ push(r1); 209 __ push(r1);
210 __ Push(Smi::FromInt(info->scope()->scope_type()));
210 __ CallRuntime(Runtime::kNewFunctionContext); 211 __ CallRuntime(Runtime::kNewFunctionContext);
211 } 212 }
212 if (info->scope()->new_target_var() != nullptr) { 213 if (info->scope()->new_target_var() != nullptr) {
213 __ pop(r3); // Preserve new target. 214 __ pop(r3); // Preserve new target.
214 } 215 }
215 } 216 }
216 function_in_register_r1 = false; 217 function_in_register_r1 = false;
217 // Context is returned in r0. It replaces the context passed to us. 218 // Context is returned in r0. It replaces the context passed to us.
218 // It's saved in the stack and kept live in cp. 219 // It's saved in the stack and kept live in cp.
219 __ mov(cp, r0); 220 __ mov(cp, r0);
(...skipping 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after
2919 DCHECK(interrupt_address == 2920 DCHECK(interrupt_address ==
2920 isolate->builtins()->OnStackReplacement()->entry()); 2921 isolate->builtins()->OnStackReplacement()->entry());
2921 return ON_STACK_REPLACEMENT; 2922 return ON_STACK_REPLACEMENT;
2922 } 2923 }
2923 2924
2924 2925
2925 } // namespace internal 2926 } // namespace internal
2926 } // namespace v8 2927 } // namespace v8
2927 2928
2928 #endif // V8_TARGET_ARCH_ARM 2929 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698