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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | 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_X87 5 #if V8_TARGET_ARCH_X87
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 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 Heap::kTheHoleValueRootIndex, slow); 1109 Heap::kTheHoleValueRootIndex, slow);
1110 } 1110 }
1111 // Load next context in chain. 1111 // Load next context in chain.
1112 __ mov(temp, ContextOperand(context, Context::PREVIOUS_INDEX)); 1112 __ mov(temp, ContextOperand(context, Context::PREVIOUS_INDEX));
1113 // Walk the rest of the chain without clobbering esi. 1113 // Walk the rest of the chain without clobbering esi.
1114 context = temp; 1114 context = temp;
1115 } 1115 }
1116 // If no outer scope calls eval, we do not need to check more 1116 // If no outer scope calls eval, we do not need to check more
1117 // context extensions. If we have reached an eval scope, we check 1117 // context extensions. If we have reached an eval scope, we check
1118 // all extensions from this point. 1118 // all extensions from this point.
1119 if (!s->outer_scope_calls_sloppy_eval() || s->is_eval_scope()) break; 1119 if (!s->outer_scope_calls_sloppy_eval()) break;
1120 s = s->outer_scope(); 1120 s = s->outer_scope();
1121 } 1121 }
1122 1122
1123 if (s != NULL && s->is_eval_scope()) {
1124 // Loop up the context chain. There is no frame effect so it is
1125 // safe to use raw labels here.
1126 Label next, fast;
1127 if (!context.is(temp)) {
1128 __ mov(temp, context);
1129 }
1130 __ bind(&next);
1131 // Terminate at native context.
1132 __ cmp(FieldOperand(temp, HeapObject::kMapOffset),
1133 Immediate(isolate()->factory()->native_context_map()));
1134 __ j(equal, &fast, Label::kNear);
1135 // Check that extension is "the hole".
1136 __ JumpIfNotRoot(ContextOperand(temp, Context::EXTENSION_INDEX),
1137 Heap::kTheHoleValueRootIndex, slow);
1138 // Load next context in chain.
1139 __ mov(temp, ContextOperand(temp, Context::PREVIOUS_INDEX));
1140 __ jmp(&next);
1141 __ bind(&fast);
1142 }
1143
1144 // All extension objects were empty and it is safe to use a normal global 1123 // All extension objects were empty and it is safe to use a normal global
1145 // load machinery. 1124 // load machinery.
1146 EmitGlobalVariableLoad(proxy, typeof_mode); 1125 EmitGlobalVariableLoad(proxy, typeof_mode);
1147 } 1126 }
1148 1127
1149 1128
1150 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, 1129 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var,
1151 Label* slow) { 1130 Label* slow) {
1152 DCHECK(var->IsContextSlot()); 1131 DCHECK(var->IsContextSlot());
1153 Register context = esi; 1132 Register context = esi;
(...skipping 2510 matching lines...) Expand 10 before | Expand all | Expand 10 after
3664 isolate->builtins()->OnStackReplacement()->entry(), 3643 isolate->builtins()->OnStackReplacement()->entry(),
3665 Assembler::target_address_at(call_target_address, unoptimized_code)); 3644 Assembler::target_address_at(call_target_address, unoptimized_code));
3666 return ON_STACK_REPLACEMENT; 3645 return ON_STACK_REPLACEMENT;
3667 } 3646 }
3668 3647
3669 3648
3670 } // namespace internal 3649 } // namespace internal
3671 } // namespace v8 3650 } // namespace v8
3672 3651
3673 #endif // V8_TARGET_ARCH_X87 3652 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698