Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: src/hydrogen.h

Issue 14075013: Replace CheckBuilder with IfBuilder everywhere. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index a2dbe7de1df27f45fa1650555a05d3f06b98073f..9d3a78034abcaed7237940a4797c4098bb653a11 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1013,27 +1013,6 @@ class HGraphBuilder {
HInstruction* BuildStoreMap(HValue* object, HValue* map);
HInstruction* BuildStoreMap(HValue* object, Handle<Map> map);
- class CheckBuilder {
- public:
- explicit CheckBuilder(HGraphBuilder* builder);
- ~CheckBuilder() {
- if (!finished_) End();
- }
-
- HValue* CheckNotUndefined(HValue* value);
- HValue* CheckIntegerCompare(HValue* left, HValue* right, Token::Value op);
- HValue* CheckIntegerEq(HValue* left, HValue* right);
- void End();
-
- private:
- Zone* zone() { return builder_->zone(); }
-
- HGraphBuilder* builder_;
- bool finished_;
- HBasicBlock* failure_block_;
- HBasicBlock* merge_block_;
- };
-
class IfBuilder {
public:
explicit IfBuilder(HGraphBuilder* builder,
@@ -1067,6 +1046,17 @@ class HGraphBuilder {
return compare;
}
+ template<class Condition, class P2>
+ HInstruction* IfNot(HValue* p1, P2 p2) {
+ HControlInstruction* compare = new(zone()) Condition(p1, p2);
+ AddCompare(compare);
+ HBasicBlock* block0 = compare->SuccessorAt(0);
+ HBasicBlock* block1 = compare->SuccessorAt(1);
+ compare->SetSuccessorAt(0, block1);
+ compare->SetSuccessorAt(1, block0);
+ return compare;
+ }
+
HInstruction* OrIfCompare(
HValue* p1,
HValue* p2,
@@ -1129,6 +1119,11 @@ class HGraphBuilder {
void End();
void Deopt();
+ void ElseDeopt() {
+ Else();
+ Deopt();
+ End();
+ }
private:
void AddCompare(HControlInstruction* compare);
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698