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

Unified Diff: src/codegen-ia32.cc

Issue 16572: Adds Nip() function, makes UnloadReference() work without spilling (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 11 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 | « no previous file | src/virtual-frame-ia32.h » ('j') | 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 1040)
+++ src/codegen-ia32.cc (working copy)
@@ -549,17 +549,7 @@
void CodeGenerator::UnloadReference(Reference* ref) {
// Pop a reference from the stack while preserving TOS.
Comment cmnt(masm_, "[ UnloadReference");
- int size = ref->size();
- if (size == 1) {
- VirtualFrame::SpilledScope spilled_scope(this);
- frame_->EmitPop(eax);
- __ mov(frame_->Top(), eax);
- } else if (size > 1) {
- VirtualFrame::SpilledScope spilled_scope(this);
- frame_->EmitPop(eax);
- frame_->Drop(size);
- frame_->EmitPush(eax);
- }
+ frame_->Nip(ref->size());
}
@@ -3114,7 +3104,7 @@
var->mode() == Variable::CONST &&
node->op() != Token::INIT_VAR && node->op() != Token::INIT_CONST) {
// Assignment ignored - leave the value on the stack.
- } else {
+ } else {
CodeForSourcePosition(node->position());
if (node->op() == Token::INIT_CONST) {
// Dynamic constant initializations must use the function context
« no previous file with comments | « no previous file | src/virtual-frame-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698