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

Unified Diff: src/type-info.cc

Issue 1520001: Start using String type info: (Closed)
Patch Set: Review Created 10 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 | « src/type-info.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index b1bde599f4c6c1684a993c2c054595845d53d492..3fc929db3ca0c999e4851c9dbeee8fca6d83af76 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -41,6 +41,8 @@ TypeInfo TypeInfo::TypeFromValue(Handle<Object> value) {
info = TypeInfo::IsInt32Double(HeapNumber::cast(*value)->value())
? TypeInfo::Integer32()
: TypeInfo::Double();
+ } else if (value->IsString()) {
+ info = TypeInfo::String();
} else {
info = TypeInfo::Unknown();
}
« no previous file with comments | « src/type-info.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698