Reviewers: William Hesse,
Description:
Fix reliability crash caused by wrong assert.
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.
Please review this at http://codereview.chromium.org/652044
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/frame-element.h
M src/jump-target-inl.h
M src/jump-target.cc
Index: src/jump-target-inl.h
===================================================================
--- src/jump-target-inl.h (revision 3925)
+++ src/jump-target-inl.h (working copy)
@@ -42,7 +42,7 @@
} 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: src/jump-target.cc
===================================================================
--- src/jump-target.cc (revision 3925)
+++ src/jump-target.cc (working copy)
@@ -105,7 +105,6 @@
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 @@
// 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);
}
Index: src/frame-element.h
===================================================================
--- src/frame-element.h (revision 3925)
+++ src/frame-element.h (working copy)
@@ -65,6 +65,9 @@
}
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);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev