Revision: 2660
Author: [email protected]
Date: Tue Aug 11 04:47:41 2009
Log: Change the location set size from kPointerSize to kBitsPerPointer.
This was leftover from an old code review and not yet submitted.

Review URL: http://codereview.chromium.org/164315
http://code.google.com/p/v8/source/detail?r=2660

Modified:
  /branches/bleeding_edge/src/cfg.cc
  /branches/bleeding_edge/src/cfg.h

=======================================
--- /branches/bleeding_edge/src/cfg.cc  Mon Aug 10 06:00:05 2009
+++ /branches/bleeding_edge/src/cfg.cc  Tue Aug 11 04:47:41 2009
@@ -60,10 +60,10 @@
    if (fun->scope()->num_heap_slots() > 0) {
      BAILOUT("function has context slots");
    }
-  if (fun->scope()->num_stack_slots() > kPointerSize) {
+  if (fun->scope()->num_stack_slots() > kBitsPerPointer) {
      BAILOUT("function has too many locals");
    }
-  if (fun->scope()->num_parameters() > kPointerSize - 1) {
+  if (fun->scope()->num_parameters() > kBitsPerPointer - 1) {
      BAILOUT("function has too many parameters");
    }
    if (fun->scope()->arguments() != NULL) {
@@ -320,6 +320,7 @@
    if (lhs->AsProperty() != NULL) {
      BAILOUT("unsupported property assignment");
    }
+
    Variable* var = lhs->AsVariableProxy()->AsVariable();
    if (var == NULL) {
      BAILOUT("unsupported invalid left-hand side");
@@ -333,6 +334,7 @@
      BAILOUT("unsupported slot lhs (not a parameter or local)");
    }

+  // Parameter and local slot assignments.
    ExpressionCfgBuilder builder;
    SlotLocation* loc = new SlotLocation(slot->type(), slot->index());
    builder.Build(expr->value(), loc);
@@ -361,11 +363,11 @@
    ExpressionCfgBuilder object, key;
    object.Build(expr->obj(), NULL);
    if (object.graph() == NULL) {
-    BAILOUT("unsupported object subexpression in propref");
+    BAILOUT("unsupported object subexpression in propload");
    }
    key.Build(expr->key(), NULL);
    if (key.graph() == NULL) {
-    BAILOUT("unsupported key subexpression in propref");
+    BAILOUT("unsupported key subexpression in propload");
    }

    if (destination_ == NULL) destination_ = new TempLocation();
=======================================
--- /branches/bleeding_edge/src/cfg.h   Mon Aug 10 06:00:05 2009
+++ /branches/bleeding_edge/src/cfg.h   Tue Aug 11 04:47:41 2009
@@ -415,7 +415,7 @@

  // Base class of instructions that have two input operands.
  class TwoOperandInstruction : public Instruction {
- protected:
+ public:
    // Support for fast-compilation mode:
    virtual void Compile(MacroAssembler* masm) = 0;
    void FastAllocate(TempLocation* temp);
@@ -768,11 +768,11 @@
    void AddElement(SlotLocation* location) {
      if (location->type() == Slot::PARAMETER) {
        // Parameter indexes begin with -1 ('this').
-      ASSERT(location->index() < kPointerSize - 1);
+      ASSERT(location->index() < kBitsPerPointer - 1);
        parameters_ |= (1 << (location->index() + 1));
      } else {
        ASSERT(location->type() == Slot::LOCAL);
-      ASSERT(location->index() < kPointerSize);
+      ASSERT(location->index() < kBitsPerPointer);
        locals_ |= (1 << location->index());
      }
    }
@@ -785,11 +785,11 @@

    bool Contains(SlotLocation* location) {
      if (location->type() == Slot::PARAMETER) {
-      ASSERT(location->index() < kPointerSize - 1);
+      ASSERT(location->index() < kBitsPerPointer - 1);
        return (parameters_ & (1 << (location->index() + 1)));
      } else {
        ASSERT(location->type() == Slot::LOCAL);
-      ASSERT(location->index() < kPointerSize);
+      ASSERT(location->index() < kBitsPerPointer);
        return (locals_ & (1 << location->index()));
      }
    }
@@ -834,7 +834,7 @@
  #undef DECLARE_VISIT

   private:
-  // State for the visitor.  Input parameters:
+  // State for the visitor.  Input parameter:
    Location* destination_;

    // Output parameters:

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to