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

Unified Diff: src/codegen-ia32.cc

Issue 17003: Update UnloadReference to use new virtual frame. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 12 years 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 | « no previous file | 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 1019)
+++ src/codegen-ia32.cc (working copy)
@@ -544,14 +544,17 @@
void CodeGenerator::UnloadReference(Reference* ref) {
// Pop a reference from the stack while preserving TOS.
Comment cmnt(masm_, "[ UnloadReference");
+ Result top(this);
int size = ref->size();
if (size == 1) {
- frame_->EmitPop(eax);
- __ mov(frame_->Top(), eax);
+ top = frame_->Pop();
+ // Replace Drop(), Push() sequence with ReplaceTop().
+ frame_->Drop();
+ frame_->Push(&top);
} else if (size > 1) {
- frame_->EmitPop(eax);
+ top = frame_->Pop();
frame_->Drop(size);
- frame_->EmitPush(eax);
+ frame_->Push(&top);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698