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

Unified Diff: src/ast.h

Issue 17444011: Fix to_boolean type feedback for unary and binary ops (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | « no previous file | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 670c515087d53e626f7d42497c795fb4b8fca754..6336b3a14b0e144aee345f0f2b91acce270f37ac 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -383,7 +383,7 @@ class Expression: public AstNode {
}
// TODO(rossberg): this should move to its own AST node eventually.
- void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle);
+ virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle);
byte to_boolean_types() const { return to_boolean_types_; }
BailoutId id() const { return id_; }
@@ -395,6 +395,7 @@ class Expression: public AstNode {
lower_type_(Type::None(), isolate),
id_(GetNextId(isolate)),
test_id_(GetNextId(isolate)) {}
+ void set_to_boolean_types(byte types) { to_boolean_types_ = types; }
private:
Handle<Type> upper_type_;
@@ -1841,6 +1842,8 @@ class UnaryOperation: public Expression {
TypeFeedbackId UnaryOperationFeedbackId() const { return reuse(id()); }
+ virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle);
+
protected:
UnaryOperation(Isolate* isolate,
Token::Value op,
@@ -1884,6 +1887,8 @@ class BinaryOperation: public Expression {
Maybe<int> fixed_right_arg() const { return fixed_right_arg_; }
void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; }
+ virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle);
+
protected:
BinaryOperation(Isolate* isolate,
Token::Value op,
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698