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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 882063002: [turbofan] Use unboxed doubles in range types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make tests less fragile. Created 5 years, 11 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/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 8f8fb1cd28a62c3a291f428be92bd54691c5df50..35d47728f9ac0fe91bb5dbae3be26d90df6d7608 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -30,26 +30,23 @@ static void RelaxEffects(Node* node) {
JSTypedLowering::JSTypedLowering(JSGraph* jsgraph, Zone* zone)
: jsgraph_(jsgraph), simplified_(graph()->zone()), conversions_(zone) {
- Handle<Object> zero = factory()->NewNumber(0.0);
- Handle<Object> one = factory()->NewNumber(1.0);
- zero_range_ = Type::Range(zero, zero, graph()->zone());
- one_range_ = Type::Range(one, one, graph()->zone());
- Handle<Object> thirtyone = factory()->NewNumber(31.0);
- zero_thirtyone_range_ = Type::Range(zero, thirtyone, graph()->zone());
+ zero_range_ = Type::Range(0.0, 1.0, graph()->zone());
+ one_range_ = Type::Range(1.0, 1.0, graph()->zone());
+ zero_thirtyone_range_ = Type::Range(0.0, 31.0, graph()->zone());
// TODO(jarin): Can we have a correctification of the stupid type system?
// These stupid work-arounds are just stupid!
shifted_int32_ranges_[0] = Type::Signed32();
if (SmiValuesAre31Bits()) {
shifted_int32_ranges_[1] = Type::SignedSmall();
for (size_t k = 2; k < arraysize(shifted_int32_ranges_); ++k) {
- Handle<Object> min = factory()->NewNumber(kMinInt / (1 << k));
- Handle<Object> max = factory()->NewNumber(kMaxInt / (1 << k));
+ double min = kMinInt / (1 << k);
+ double max = kMaxInt / (1 << k);
shifted_int32_ranges_[k] = Type::Range(min, max, graph()->zone());
}
} else {
for (size_t k = 1; k < arraysize(shifted_int32_ranges_); ++k) {
- Handle<Object> min = factory()->NewNumber(kMinInt / (1 << k));
- Handle<Object> max = factory()->NewNumber(kMaxInt / (1 << k));
+ double min = kMinInt / (1 << k);
+ double max = kMaxInt / (1 << k);
shifted_int32_ranges_[k] = Type::Range(min, max, graph()->zone());
}
}
« no previous file with comments | « no previous file | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698