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

Unified Diff: src/typing.h

Issue 17468003: Use AST's type field and merge types for unary, binary & compare ICs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments 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 | « src/types.cc ('k') | src/typing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing.h
diff --git a/src/typing.h b/src/typing.h
index 1f172eaf59b6f59100e4f92f485b35bc4a02f5ee..2d3fac0650959cb9f6ac719b3973456510702b69 100644
--- a/src/typing.h
+++ b/src/typing.h
@@ -62,6 +62,13 @@ class AstTyper: public AstVisitor {
TypeFeedbackOracle* oracle() { return &oracle_; }
Zone* zone() const { return info_->zone(); }
+ void MergeLowerType(Expression* e, Handle<Type> t) {
+ e->set_lower_type(handle(Type::Union(e->lower_type(), t), isolate_));
+ }
+ void MergeUpperType(Expression* e, Handle<Type> t) {
+ e->set_upper_type(handle(Type::Intersect(e->upper_type(), t), isolate_));
+ }
+
void VisitDeclarations(ZoneList<Declaration*>* declarations);
void VisitStatements(ZoneList<Statement*>* statements);
« no previous file with comments | « src/types.cc ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698