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

Unified Diff: src/types.h

Issue 616563002: Get rid of code duplication by computing int Lub using range Lub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.h
diff --git a/src/types.h b/src/types.h
index e7815ed316f29d420096619aaccdfb2cdf19c9f1..b43249fab859c5e01ea94c8e8ab61c37659f3fee 100644
--- a/src/types.h
+++ b/src/types.h
@@ -598,12 +598,10 @@ class TypeImpl<Config>::BitsetType : public TypeImpl<Config> {
static bitset Glb(TypeImpl* type); // greatest lower bound that's a bitset
static bitset Lub(TypeImpl* type); // least upper bound that's a bitset
+ static bitset Lub(i::Map* map);
static bitset Lub(i::Object* value);
static bitset Lub(double value);
- static bitset Lub(int32_t value);
- static bitset Lub(uint32_t value);
- static bitset Lub(i::Map* map);
- static bitset Lub(Limits lim);
+ static bitset Lub(double min, double max);
static const char* Name(bitset);
static void Print(OStream& os, bitset); // NOLINT
@@ -781,7 +779,8 @@ class TypeImpl<Config>::RangeType : public StructuralType {
DCHECK(min->Number() <= max->Number());
RangeHandle type = Config::template cast<RangeType>(
StructuralType::New(StructuralType::kRangeTag, 3, region));
- type->Set(0, BitsetType::New(BitsetType::Lub(Limits(min, max)), region));
+ type->Set(0, BitsetType::New(
+ BitsetType::Lub(min->Number(), max->Number()), region));
type->SetValue(1, min);
type->SetValue(2, max);
return type;
« no previous file with comments | « no previous file | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698