Fix reliability crash caused by wrong assert.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 22 Feb 2010 15:42:23 +0000 (15:42 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 22 Feb 2010 15:42:23 +0000 (15:42 +0000)
These two asserts in ComputeEntryFrame are wrong since the
virtual frame already knows how to deal with the number type
information of copy elements: We do not store type
information with copy elements. Instead the backing element
contains the type information.

Review URL: http://codereview.chromium.org/652044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/frame-element.h
src/jump-target-inl.h
src/jump-target.cc

index 4b372802d61992597e671ad9b61b8e2711309798..5762814ff2744a20bd20b0c836d7167e92a359ec 100644 (file)
@@ -65,6 +65,9 @@ class FrameElement BASE_EMBEDDED {
   }
 
   inline void set_number_info(NumberInfo::Type info) {
+    // Copied elements do not have number info. Instead
+    // we have to inspect their backing element in the frame.
+    ASSERT(!is_copy());
     value_ = value_ & ~NumberInfoField::mask();
     value_ = value_ | NumberInfoField::encode(info);
   }
index dcd615eefc500c42afa97e2c22a0cf93767f6ab9..3cd9a8bde7b0033b76c101cec73ea17f5a65dee1 100644 (file)
@@ -42,7 +42,7 @@ void JumpTarget::InitializeEntryElement(int index, FrameElement* target) {
   } else if (target->is_copy()) {
     entry_frame_->elements_[target->index()].set_copied();
   }
-  if (direction_ == BIDIRECTIONAL) {
+  if (direction_ == BIDIRECTIONAL && !target->is_copy()) {
     entry_frame_->elements_[index].set_number_info(NumberInfo::kUnknown);
   }
 }
index 66764e6a700f72f59e447a693482e6f7dd481873..bce379a92482486c53154d263acb7a1bf9806663 100644 (file)
@@ -105,7 +105,6 @@ void JumpTarget::ComputeEntryFrame() {
         FrameElement* other = &reaching_frames_[j]->elements_[i];
         if (element != NULL && !element->is_copy()) {
           ASSERT(other != NULL);
-          ASSERT(!other->is_copy());
           // We overwrite the number information of one of the incoming frames.
           // This is safe because we only use the frame for emitting merge code.
           // The number information of incoming frames is not used anymore.
@@ -128,7 +127,6 @@ void JumpTarget::ComputeEntryFrame() {
     // elements as copied exactly when they have a copy.  Undetermined
     // elements are initially recorded as if in memory.
     if (target != NULL) {
-      ASSERT(!target->is_copy());  // These initial elements are never copies.
       entry_frame_->elements_[index] = *target;
       InitializeEntryElement(index, target);
     }