Revision: 24175
Author:   [email protected]
Date:     Wed Sep 24 10:17:24 2014 UTC
Log: MIPS: Refactor bailout reasons and disable optimization in more cases.

Port r24161 (008f335)

BUG=
[email protected]

Review URL: https://codereview.chromium.org/593313004
https://code.google.com/p/v8/source/detail?r=24175

Modified:
 /branches/bleeding_edge/src/mips/lithium-mips.cc
 /branches/bleeding_edge/src/mips/lithium-mips.h
 /branches/bleeding_edge/src/mips64/lithium-mips64.cc
 /branches/bleeding_edge/src/mips64/lithium-mips64.h

=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Tue Sep 16 09:47:45 2014 UTC +++ /branches/bleeding_edge/src/mips/lithium-mips.cc Wed Sep 24 10:17:24 2014 UTC
@@ -428,12 +428,6 @@
   status_ = DONE;
   return chunk_;
 }
-
-
-void LChunkBuilder::Abort(BailoutReason reason) {
-  info()->set_bailout_reason(reason);
-  status_ = ABORTED;
-}


 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
@@ -2425,7 +2419,7 @@
   } else {
     spill_index = env_index - instr->environment()->first_local_index();
     if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
-      Abort(kTooManySpillSlotsNeededForOSR);
+      Retry(kTooManySpillSlotsNeededForOSR);
       spill_index = 0;
     }
   }
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.h Mon Sep 8 17:20:49 2014 UTC +++ /branches/bleeding_edge/src/mips/lithium-mips.h Wed Sep 24 10:17:24 2014 UTC
@@ -2718,17 +2718,11 @@
 class LChunkBuilder FINAL : public LChunkBuilderBase {
  public:
LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
-      : LChunkBuilderBase(graph->zone()),
-        chunk_(NULL),
-        info_(info),
-        graph_(graph),
-        status_(UNUSED),
+      : LChunkBuilderBase(info, graph),
         current_instruction_(NULL),
         current_block_(NULL),
         next_block_(NULL),
-        allocator_(allocator) { }
-
-  Isolate* isolate() const { return graph_->isolate(); }
+        allocator_(allocator) {}

   // Build the sequence for the graph.
   LPlatformChunk* Build();
@@ -2762,24 +2756,6 @@
   LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);

  private:
-  enum Status {
-    UNUSED,
-    BUILDING,
-    DONE,
-    ABORTED
-  };
-
-  LPlatformChunk* chunk() const { return chunk_; }
-  CompilationInfo* info() const { return info_; }
-  HGraph* graph() const { return graph_; }
-
-  bool is_unused() const { return status_ == UNUSED; }
-  bool is_building() const { return status_ == BUILDING; }
-  bool is_done() const { return status_ == DONE; }
-  bool is_aborted() const { return status_ == ABORTED; }
-
-  void Abort(BailoutReason reason);
-
   // Methods for getting operands for Use / Define / Temp.
   LUnallocated* ToUnallocated(Register reg);
   LUnallocated* ToUnallocated(DoubleRegister reg);
@@ -2865,10 +2841,6 @@
   LInstruction* DoArithmeticT(Token::Value op,
                               HBinaryOperation* instr);

-  LPlatformChunk* chunk_;
-  CompilationInfo* info_;
-  HGraph* const graph_;
-  Status status_;
   HInstruction* current_instruction_;
   HBasicBlock* current_block_;
   HBasicBlock* next_block_;
=======================================
--- /branches/bleeding_edge/src/mips64/lithium-mips64.cc Tue Sep 16 09:47:45 2014 UTC +++ /branches/bleeding_edge/src/mips64/lithium-mips64.cc Wed Sep 24 10:17:24 2014 UTC
@@ -428,12 +428,6 @@
   status_ = DONE;
   return chunk_;
 }
-
-
-void LChunkBuilder::Abort(BailoutReason reason) {
-  info()->set_bailout_reason(reason);
-  status_ = ABORTED;
-}


 LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
@@ -2425,7 +2419,7 @@
   } else {
     spill_index = env_index - instr->environment()->first_local_index();
     if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
-      Abort(kTooManySpillSlotsNeededForOSR);
+      Retry(kTooManySpillSlotsNeededForOSR);
       spill_index = 0;
     }
   }
=======================================
--- /branches/bleeding_edge/src/mips64/lithium-mips64.h Mon Sep 8 17:20:49 2014 UTC +++ /branches/bleeding_edge/src/mips64/lithium-mips64.h Wed Sep 24 10:17:24 2014 UTC
@@ -2702,17 +2702,11 @@
 class LChunkBuilder FINAL : public LChunkBuilderBase {
  public:
LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
-      : LChunkBuilderBase(graph->zone()),
-        chunk_(NULL),
-        info_(info),
-        graph_(graph),
-        status_(UNUSED),
+      : LChunkBuilderBase(info, graph),
         current_instruction_(NULL),
         current_block_(NULL),
         next_block_(NULL),
-        allocator_(allocator) { }
-
-  Isolate* isolate() const { return graph_->isolate(); }
+        allocator_(allocator) {}

   // Build the sequence for the graph.
   LPlatformChunk* Build();
@@ -2746,24 +2740,6 @@
   LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);

  private:
-  enum Status {
-    UNUSED,
-    BUILDING,
-    DONE,
-    ABORTED
-  };
-
-  LPlatformChunk* chunk() const { return chunk_; }
-  CompilationInfo* info() const { return info_; }
-  HGraph* graph() const { return graph_; }
-
-  bool is_unused() const { return status_ == UNUSED; }
-  bool is_building() const { return status_ == BUILDING; }
-  bool is_done() const { return status_ == DONE; }
-  bool is_aborted() const { return status_ == ABORTED; }
-
-  void Abort(BailoutReason reason);
-
   // Methods for getting operands for Use / Define / Temp.
   LUnallocated* ToUnallocated(Register reg);
   LUnallocated* ToUnallocated(DoubleRegister reg);
@@ -2849,10 +2825,6 @@
   LInstruction* DoArithmeticT(Token::Value op,
                               HBinaryOperation* instr);

-  LPlatformChunk* chunk_;
-  CompilationInfo* info_;
-  HGraph* const graph_;
-  Status status_;
   HInstruction* current_instruction_;
   HBasicBlock* current_block_;
   HBasicBlock* next_block_;

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to