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

Unified Diff: src/ast.h

Issue 12702002: Polymorphism support for numbers and strings (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 9 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 05f0653dc98ee4515390634551f5449e6ea0b46f..5debc74ebbab68ee18c40a863d664ad5f92e7a1b 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1532,6 +1532,22 @@ class Call: public Expression {
virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; }
virtual bool IsMonomorphic() { return is_monomorphic_; }
CheckType check_type() const { return check_type_; }
+
+ void set_string_check(Handle<JSObject> holder) {
+ holder_ = holder;
+ check_type_ = STRING_CHECK;
+ }
+
+ void set_number_check(Handle<JSObject> holder) {
+ holder_ = holder;
+ check_type_ = NUMBER_CHECK;
+ }
+
+ void set_map_check() {
+ holder_ = Handle<JSObject>::null();
+ check_type_ = RECEIVER_MAP_CHECK;
+ }
+
Handle<JSFunction> target() { return target_; }
// A cache for the holder, set as a side effect of computing the target of the
« 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