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

Unified Diff: src/types.cc

Issue 18712002: Convert UnaryOpStub to a HydrogenCodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix builtin leakage 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
Index: src/types.cc
diff --git a/src/types.cc b/src/types.cc
index 22a108b7206b0bd657ae57e90af4c20a11770190..0d2615b02d2a17bcc271a0411be7afd4dbeb3ec5 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -455,4 +455,13 @@ Type* Type::Optional(Handle<Type> type) {
: Union(type, Undefined()->handle_via_isolate_of(*type));
}
+
+Representation Representation::FromType(Handle<Type> type) {
+ if (type->Is(Type::None())) return Representation::None();
+ if (type->Is(Type::Integer32())) return Representation::Integer32();
+ if (type->Is(Type::Number())) return Representation::Double();
+ return Representation::Tagged();
+}
+
+
} } // namespace v8::internal
« src/hydrogen.cc ('K') | « src/type-info.cc ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698