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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 2266843002: Drop is_eval_scope when checking how to access dynamic globals. It has no influence (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months 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/compiler/ast-graph-builder.cc ('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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 __ ldr(temp, ContextMemOperand(current, Context::EXTENSION_INDEX)); 1192 __ ldr(temp, ContextMemOperand(current, Context::EXTENSION_INDEX));
1193 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); 1193 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow);
1194 } 1194 }
1195 // Load next context in chain. 1195 // Load next context in chain.
1196 __ ldr(next, ContextMemOperand(current, Context::PREVIOUS_INDEX)); 1196 __ ldr(next, ContextMemOperand(current, Context::PREVIOUS_INDEX));
1197 // Walk the rest of the chain without clobbering cp. 1197 // Walk the rest of the chain without clobbering cp.
1198 current = next; 1198 current = next;
1199 } 1199 }
1200 // If no outer scope calls eval, we do not need to check more 1200 // If no outer scope calls eval, we do not need to check more
1201 // context extensions. 1201 // context extensions.
1202 if (!s->outer_scope_calls_sloppy_eval() || s->is_eval_scope()) break; 1202 if (!s->outer_scope_calls_sloppy_eval()) break;
1203 s = s->outer_scope(); 1203 s = s->outer_scope();
1204 } 1204 }
1205 1205
1206 if (s->is_eval_scope()) {
1207 Label loop, fast;
1208 if (!current.is(next)) {
1209 __ Move(next, current);
1210 }
1211 __ bind(&loop);
1212 // Terminate at native context.
1213 __ ldr(temp, FieldMemOperand(next, HeapObject::kMapOffset));
1214 __ LoadRoot(ip, Heap::kNativeContextMapRootIndex);
1215 __ cmp(temp, ip);
1216 __ b(eq, &fast);
1217 // Check that extension is "the hole".
1218 __ ldr(temp, ContextMemOperand(next, Context::EXTENSION_INDEX));
1219 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow);
1220 // Load next context in chain.
1221 __ ldr(next, ContextMemOperand(next, Context::PREVIOUS_INDEX));
1222 __ b(&loop);
1223 __ bind(&fast);
1224 }
1225
1226 // All extension objects were empty and it is safe to use a normal global 1206 // All extension objects were empty and it is safe to use a normal global
1227 // load machinery. 1207 // load machinery.
1228 EmitGlobalVariableLoad(proxy, typeof_mode); 1208 EmitGlobalVariableLoad(proxy, typeof_mode);
1229 } 1209 }
1230 1210
1231 1211
1232 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, 1212 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var,
1233 Label* slow) { 1213 Label* slow) {
1234 DCHECK(var->IsContextSlot()); 1214 DCHECK(var->IsContextSlot());
1235 Register context = cp; 1215 Register context = cp;
(...skipping 2604 matching lines...) Expand 10 before | Expand all | Expand 10 after
3840 DCHECK(interrupt_address == 3820 DCHECK(interrupt_address ==
3841 isolate->builtins()->OnStackReplacement()->entry()); 3821 isolate->builtins()->OnStackReplacement()->entry());
3842 return ON_STACK_REPLACEMENT; 3822 return ON_STACK_REPLACEMENT;
3843 } 3823 }
3844 3824
3845 3825
3846 } // namespace internal 3826 } // namespace internal
3847 } // namespace v8 3827 } // namespace v8
3848 3828
3849 #endif // V8_TARGET_ARCH_ARM 3829 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698