Author: [EMAIL PROTECTED]
Date: Mon Dec  1 07:06:44 2008
New Revision: 878

Modified:
    branches/experimental/toiger/src/codegen-ia32.cc

Log:
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.
Review URL: http://codereview.chromium.org/12825

Modified: branches/experimental/toiger/src/codegen-ia32.cc
==============================================================================
--- branches/experimental/toiger/src/codegen-ia32.cc    (original)
+++ branches/experimental/toiger/src/codegen-ia32.cc    Mon Dec  1 07:06:44  
2008
@@ -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
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to