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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 573009: Change LoadIC interface on ia32 to take arguments in registers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/full-codegen.cc ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc (revision 3838)
+++ src/ia32/codegen-ia32.cc (working copy)
@@ -2327,6 +2327,7 @@
// Load applicand.apply onto the stack. This will usually
// give us a megamorphic load site. Not super, but it works.
Load(applicand);
+ frame()->Dup();
Handle<String> name = Factory::LookupAsciiSymbol("apply");
frame()->Push(name);
Result answer = frame()->CallLoadIC(RelocInfo::CODE_TARGET);
@@ -4197,8 +4198,6 @@
// property case was inlined. Ensure that there is not a test eax
// instruction here.
__ nop();
- // Discard the global object. The result is in answer.
- frame_->Drop();
return answer;
}
@@ -6276,7 +6275,7 @@
// Emit a LoadIC call to get the value from receiver and leave it in
-// dst. The receiver register is restored after the call.
+// dst.
class DeferredReferenceGetNamedValue: public DeferredCode {
public:
DeferredReferenceGetNamedValue(Register dst,
@@ -6299,7 +6298,9 @@
void DeferredReferenceGetNamedValue::Generate() {
- __ push(receiver_);
+ if (!receiver_.is(eax)) {
+ __ mov(eax, receiver_);
+ }
__ Set(ecx, Immediate(name_));
Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
__ call(ic, RelocInfo::CODE_TARGET);
@@ -6316,7 +6317,6 @@
__ IncrementCounter(&Counters::named_load_inline_miss, 1);
if (!dst_.is(eax)) __ mov(dst_, eax);
- __ pop(receiver_);
}
@@ -6570,6 +6570,9 @@
Slot* slot = expression_->AsVariableProxy()->AsVariable()->slot();
ASSERT(slot != NULL);
cgen_->LoadFromSlotCheckForArguments(slot, NOT_INSIDE_TYPEOF);
+ if (!persist_after_get_) {
+ cgen_->UnloadReference(this);
+ }
break;
}
@@ -6578,6 +6581,9 @@
bool is_global = var != NULL;
ASSERT(!is_global || var->is_global());
+ if (persist_after_get_) {
+ cgen_->frame()->Dup();
+ }
// Do not inline the inobject property case for loads from the global
// object. Also do not inline for unoptimized code. This saves time
// in the code generator. Unoptimized code is toplevel code or code
@@ -6636,9 +6642,11 @@
__ IncrementCounter(&Counters::named_load_inline, 1);
deferred->BindExit();
- cgen_->frame()->Push(&receiver);
cgen_->frame()->Push(&value);
}
+ if (!persist_after_get_) {
+ set_unloaded();
+ }
break;
}
@@ -6648,16 +6656,15 @@
ASSERT(!is_global || var->is_global());
Result value = cgen_->EmitKeyedLoad(is_global);
cgen_->frame()->Push(&value);
+ if (!persist_after_get_) {
+ cgen_->UnloadReference(this);
+ }
break;
}
- default:
+ default:
UNREACHABLE();
}
-
- if (!persist_after_get_) {
- cgen_->UnloadReference(this);
- }
}
« no previous file with comments | « src/full-codegen.cc ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698