Reviewers: Jakob,
Description:
Fix assert triggered by constant folding.
Add<> asserts the return type, which might not be an HAdd in this case
because of constant folding.
BUG=
Please review this at https://codereview.chromium.org/23754002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen.cc
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
cf1b505b9ab4046a9280b98f12c6e09aa6e187ca..4fff895701dca8373272f333d8f8ef1dff3a8d6f
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -1537,14 +1537,15 @@ HLoadNamedField*
HGraphBuilder::AddLoadFixedArrayLength(HValue* object) {
HValue* HGraphBuilder::BuildNewElementsCapacity(HValue* old_capacity) {
- HValue* half_old_capacity = Add<HShr>(old_capacity,
graph_->GetConstant1());
+ HValue* half_old_capacity = AddUncasted<HShr>(old_capacity,
+ graph_->GetConstant1());
- HValue* new_capacity = Add<HAdd>(half_old_capacity, old_capacity);
+ HValue* new_capacity = AddUncasted<HAdd>(half_old_capacity,
old_capacity);
new_capacity->ClearFlag(HValue::kCanOverflow);
- HValue* min_growth = Add<HConstant>(16);
+ HValue* min_growth = AddUncasted<HConstant>(16);
- new_capacity = Add<HAdd>(new_capacity, min_growth);
+ new_capacity = AddUncasted<HAdd>(new_capacity, min_growth);
new_capacity->ClearFlag(HValue::kCanOverflow);
return new_capacity;
--
--
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/groups/opt_out.