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

Unified Diff: src/ast.h

Issue 18415005: Introduce type Bounds record (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/hydrogen.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 6336b3a14b0e144aee345f0f2b91acce270f37ac..78b7843d991d5479c5ec72d4f8229b43b56cdb9c 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -357,10 +357,8 @@ class Expression: public AstNode {
bool IsUndefinedLiteral();
// Expression type bounds
- Handle<Type> upper_type() { return upper_type_; }
- Handle<Type> lower_type() { return lower_type_; }
- void set_upper_type(Handle<Type> type) { upper_type_ = type; }
- void set_lower_type(Handle<Type> type) { lower_type_ = type; }
+ Bounds bounds() { return bounds_; }
+ void set_bounds(Bounds bounds) { bounds_ = bounds; }
// Type feedback information for assignments and properties.
virtual bool IsMonomorphic() {
@@ -391,15 +389,13 @@ class Expression: public AstNode {
protected:
explicit Expression(Isolate* isolate)
- : upper_type_(Type::Any(), isolate),
- lower_type_(Type::None(), isolate),
+ : bounds_(Type::None(), Type::Any(), isolate),
id_(GetNextId(isolate)),
test_id_(GetNextId(isolate)) {}
void set_to_boolean_types(byte types) { to_boolean_types_ = types; }
private:
- Handle<Type> upper_type_;
- Handle<Type> lower_type_;
+ Bounds bounds_;
byte to_boolean_types_;
const BailoutId id_;
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698