Reviewers: danno,

Description:
Install guards for new invariants required for parallel compilation.


BUG=
TEST=


Please review this at https://chromiumcodereview.appspot.com/10700185/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/hydrogen.cc
  M src/lithium.cc


Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 7e5509634a53b2dfd371e5a610a4553505aaedec..42d0fd89021787fda1d30328ad5fb4b36421f9a3 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -1711,15 +1711,12 @@ class HGlobalValueNumberer BASE_EMBEDDED {
         block_side_effects_(graph->blocks()->length(), graph->zone()),
         loop_side_effects_(graph->blocks()->length(), graph->zone()),
         visited_on_paths_(graph->zone(), graph->blocks()->length()) {
-    ASSERT(info->isolate()->heap()->allow_allocation(false));
+    ASSERT(!info->isolate()->heap()->IsAllocationAllowed());
     block_side_effects_.AddBlock(GVNFlagSet(), graph_->blocks()->length(),
                                  graph_->zone());
     loop_side_effects_.AddBlock(GVNFlagSet(), graph_->blocks()->length(),
                                 graph_->zone());
   }
-  ~HGlobalValueNumberer() {
-    ASSERT(!info_->isolate()->heap()->allow_allocation(true));
-  }

   // Returns true if values with side effects are removed.
   bool Analyze();
@@ -3085,6 +3082,9 @@ HGraph* HGraphBuilder::CreateGraph() {
 }

 bool HGraph::Optimize(SmartArrayPointer<char>* bailout_reason) {
+  NoHandleAllocation no_handles;
+  AssertNoAllocation no_gc;
+
   *bailout_reason = SmartArrayPointer<char>();
   OrderBlocks();
   AssignDominators();
@@ -3482,7 +3482,6 @@ void HGraph::EliminateRedundantBoundsChecks(HBasicBlock* bb,

 void HGraph::EliminateRedundantBoundsChecks() {
   HPhase phase("H_Eliminate bounds checks", this);
-  AssertNoAllocation no_gc;
   BoundsCheckTable checks_table(zone());
   EliminateRedundantBoundsChecks(entry_block(), &checks_table);
 }
Index: src/lithium.cc
diff --git a/src/lithium.cc b/src/lithium.cc
index 4cfb5838ceb0b9443e9d71a9952f997144fd9b88..5b93f0af2eff2ab16190b9567645be5be45eb3a5 100644
--- a/src/lithium.cc
+++ b/src/lithium.cc
@@ -391,6 +391,9 @@ Representation LChunk::LookupLiteralRepresentation(


 LChunk* LChunk::NewChunk(HGraph* graph) {
+  NoHandleAllocation no_handles;
+  AssertNoAllocation no_gc;
+
   int values = graph->GetMaximumValueID();
   if (values > LUnallocated::kMaxVirtualRegisters) {
     if (FLAG_trace_bailout) {


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

Reply via email to