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

Unified Diff: src/codegen-ia32.cc

Issue 20453: ARM side of load optimization in the presence of eval. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codegen-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 1298)
+++ src/codegen-ia32.cc (working copy)
@@ -455,16 +455,17 @@
Label* slow) {
ASSERT(slot->type() == Slot::CONTEXT);
int index = slot->index();
- __ mov(tmp, Operand(esi));
+ Register context = esi;
for (Scope* s = scope(); s != slot->var()->scope(); s = s->outer_scope()) {
if (s->num_heap_slots() > 0) {
if (s->calls_eval()) {
// Check that extension is NULL.
- __ cmp(ContextOperand(tmp, Context::EXTENSION_INDEX), Immediate(0));
+ __ cmp(ContextOperand(context, Context::EXTENSION_INDEX), Immediate(0));
__ j(not_equal, slow, not_taken);
}
- __ mov(tmp, ContextOperand(tmp, Context::CLOSURE_INDEX));
+ __ mov(tmp, ContextOperand(context, Context::CLOSURE_INDEX));
__ mov(tmp, FieldOperand(tmp, JSFunction::kContextOffset));
+ context = tmp;
}
}
// Check that last extension is NULL.
@@ -2412,17 +2413,18 @@
Label* slow) {
// Check that no extension objects have been created by calls to
// eval from the current scope to the global scope.
- __ mov(tmp, Operand(esi));
+ Register context = esi;
for (Scope* s = scope(); s != NULL; s = s->outer_scope()) {
if (s->num_heap_slots() > 0) {
if (s->calls_eval()) {
// Check that extension is NULL.
- __ cmp(ContextOperand(tmp, Context::EXTENSION_INDEX), Immediate(0));
+ __ cmp(ContextOperand(context, Context::EXTENSION_INDEX), Immediate(0));
__ j(not_equal, slow, not_taken);
}
// Load next context in chain.
- __ mov(tmp, ContextOperand(tmp, Context::CLOSURE_INDEX));
+ __ mov(tmp, ContextOperand(context, Context::CLOSURE_INDEX));
__ mov(tmp, FieldOperand(tmp, JSFunction::kContextOffset));
+ context = tmp;
}
// If no outer scope calls eval, we do not need to check more
// context extensions.
« no previous file with comments | « src/codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698