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

Unified Diff: src/hydrogen-instructions.cc

Issue 19271008: Speed up Binops (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
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 16f502ddaf7b11f3d9600ecd40b025dc899e38d1..86960a6a2c20649ee2359fa193e789cf3efa4d52 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -461,6 +461,23 @@ HType HType::TypeFromValue(Handle<Object> value) {
}
+Handle< ::v8::internal::Type> HType::intersect(
+ Handle< ::v8::internal::Type> type, Isolate* isolate) {
+ if (IsSmi()) return handle(::v8::internal::Type::Smi(), isolate);
Jakob Kummerow 2013/07/18 11:56:15 This is not a generic implementation of intersecti
+ if (IsString()) return handle(::v8::internal::Type::String(), isolate);
+ if (IsBoolean()) return handle(::v8::internal::Type::Boolean(), isolate);
+ if (IsHeapNumber() || IsTaggedNumber()) {
+ return handle(::v8::internal::Type::Intersect(
+ type, handle(::v8::internal::Type::Number(), isolate)), isolate);
+ }
+ if (IsNonPrimitive() || IsJSObject()) {
+ return handle(::v8::internal::Type::Intersect(
+ type, handle(::v8::internal::Type::NonSmi(), isolate)), isolate);
+ }
+ return type;
+}
+
+
bool HValue::Dominates(HValue* dominator, HValue* dominated) {
if (dominator->block() != dominated->block()) {
// If they are in different blocks we can use the dominance relation

Powered by Google App Engine
This is Rietveld 408576698