Revision: 16848
Author: [email protected]
Date: Fri Sep 20 06:26:19 2013 UTC
Log: Implement IfNot() in terms of If(), and add missing
IfNot(HValue*) method.
[email protected]
Review URL: https://codereview.chromium.org/23710081
http://code.google.com/p/v8/source/detail?r=16848
Modified:
/branches/bleeding_edge/src/hydrogen.h
=======================================
--- /branches/bleeding_edge/src/hydrogen.h Thu Sep 19 18:19:24 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen.h Fri Sep 20 06:26:19 2013 UTC
@@ -1304,11 +1304,20 @@
AddCompare(compare);
return compare;
}
+
+ template<class Condition>
+ Condition* IfNot(HValue* p) {
+ Condition* compare = If<Condition>(p);
+ HBasicBlock* block0 = compare->SuccessorAt(0);
+ HBasicBlock* block1 = compare->SuccessorAt(1);
+ compare->SetSuccessorAt(0, block1);
+ compare->SetSuccessorAt(1, block0);
+ return compare;
+ }
template<class Condition, class P2>
Condition* IfNot(HValue* p1, P2 p2) {
- Condition* compare = builder()->New<Condition>(p1, p2);
- AddCompare(compare);
+ Condition* compare = If<Condition>(p1, p2);
HBasicBlock* block0 = compare->SuccessorAt(0);
HBasicBlock* block1 = compare->SuccessorAt(1);
compare->SetSuccessorAt(0, block1);
@@ -1318,8 +1327,7 @@
template<class Condition, class P2, class P3>
Condition* IfNot(HValue* p1, P2 p2, P3 p3) {
- Condition* compare = builder()->New<Condition>(p1, p2, p3);
- AddCompare(compare);
+ Condition* compare = If<Condition>(p1, p2, p3);
HBasicBlock* block0 = compare->SuccessorAt(0);
HBasicBlock* block1 = compare->SuccessorAt(1);
compare->SetSuccessorAt(0, block1);
--
--
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.