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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 __ ld(temp, ContextMemOperand(current, Context::EXTENSION_INDEX)); 1188 __ ld(temp, ContextMemOperand(current, Context::EXTENSION_INDEX));
1189 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow); 1189 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow);
1190 } 1190 }
1191 // Load next context in chain. 1191 // Load next context in chain.
1192 __ ld(next, ContextMemOperand(current, Context::PREVIOUS_INDEX)); 1192 __ ld(next, ContextMemOperand(current, Context::PREVIOUS_INDEX));
1193 // Walk the rest of the chain without clobbering cp. 1193 // Walk the rest of the chain without clobbering cp.
1194 current = next; 1194 current = next;
1195 } 1195 }
1196 // If no outer scope calls eval, we do not need to check more 1196 // If no outer scope calls eval, we do not need to check more
1197 // context extensions. 1197 // context extensions.
1198 if (!s->outer_scope_calls_sloppy_eval() || s->is_eval_scope()) break; 1198 if (!s->outer_scope_calls_sloppy_eval()) break;
1199 s = s->outer_scope(); 1199 s = s->outer_scope();
1200 } 1200 }
1201 1201
1202 if (s->is_eval_scope()) {
1203 Label loop, fast;
1204 if (!current.is(next)) {
1205 __ Move(next, current);
1206 }
1207 __ bind(&loop);
1208 // Terminate at native context.
1209 __ ld(temp, FieldMemOperand(next, HeapObject::kMapOffset));
1210 __ LoadRoot(a4, Heap::kNativeContextMapRootIndex);
1211 __ Branch(&fast, eq, temp, Operand(a4));
1212 // Check that extension is "the hole".
1213 __ ld(temp, ContextMemOperand(next, Context::EXTENSION_INDEX));
1214 __ JumpIfNotRoot(temp, Heap::kTheHoleValueRootIndex, slow);
1215 // Load next context in chain.
1216 __ ld(next, ContextMemOperand(next, Context::PREVIOUS_INDEX));
1217 __ Branch(&loop);
1218 __ bind(&fast);
1219 }
1220
1221 // All extension objects were empty and it is safe to use a normal global 1202 // All extension objects were empty and it is safe to use a normal global
1222 // load machinery. 1203 // load machinery.
1223 EmitGlobalVariableLoad(proxy, typeof_mode); 1204 EmitGlobalVariableLoad(proxy, typeof_mode);
1224 } 1205 }
1225 1206
1226 1207
1227 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var, 1208 MemOperand FullCodeGenerator::ContextSlotOperandCheckExtensions(Variable* var,
1228 Label* slow) { 1209 Label* slow) {
1229 DCHECK(var->IsContextSlot()); 1210 DCHECK(var->IsContextSlot());
1230 Register context = cp; 1211 Register context = cp;
(...skipping 2556 matching lines...) Expand 10 before | Expand all | Expand 10 after
3787 reinterpret_cast<uint64_t>( 3768 reinterpret_cast<uint64_t>(
3788 isolate->builtins()->OnStackReplacement()->entry())); 3769 isolate->builtins()->OnStackReplacement()->entry()));
3789 return ON_STACK_REPLACEMENT; 3770 return ON_STACK_REPLACEMENT;
3790 } 3771 }
3791 3772
3792 3773
3793 } // namespace internal 3774 } // namespace internal
3794 } // namespace v8 3775 } // namespace v8
3795 3776
3796 #endif // V8_TARGET_ARCH_MIPS64 3777 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698