Reviewers: William Hesse,

Description:
Experimental: lazier spilling when visiting declarations.  We still
just always spill on declarations, but no longer in the case that we
don't emit any (other) code.

Please review this at http://codereview.chromium.org/12825

SVN Base: http://v8.googlecode.com/svn/branches/experimental/toiger/

Affected files:
   M     src/codegen-ia32.cc


Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 876)
+++ src/codegen-ia32.cc (working copy)
@@ -1299,8 +1299,6 @@


  void CodeGenerator::VisitDeclaration(Declaration* node) {
-  frame_->SpillAll();
-
    Comment cmnt(masm_, "[ Declaration");
    Variable* var = node->proxy()->var();
    ASSERT(var != NULL);  // must have been resolved
@@ -1314,6 +1312,7 @@
      // during variable resolution and must have mode DYNAMIC.
      ASSERT(var->mode() == Variable::DYNAMIC);
      // For now, just do a runtime call.
+    frame_->SpillAll();
      frame_->EmitPush(esi);
      frame_->EmitPush(Immediate(var->name()));
      // Declaration nodes are always introduced in one of two modes.
@@ -1348,6 +1347,7 @@
    }

    if (val != NULL) {
+    frame_->SpillAll();
      // Set initial value.
      Reference target(this, node->proxy());
      ASSERT(target.is_slot());



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to