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

Unified Diff: src/types.cc

Issue 148503002: A64: Synchronize with r15545. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | « src/types.h ('k') | src/unicode.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.cc
diff --git a/src/types.cc b/src/types.cc
index b8febc2a149ad4e7e488a8cfc4e6a59f6c896da6..ed98480b8a06e10b4dfcb5630216e56a32cbb05c 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -131,6 +131,7 @@ int Type::LubBitset() {
if (value->IsUndefined()) return kUndefined;
if (value->IsNull()) return kNull;
if (value->IsTrue() || value->IsFalse()) return kBoolean;
+ if (value->IsTheHole()) return kAny;
}
}
switch (map->instance_type()) {
@@ -200,6 +201,10 @@ int Type::LubBitset() {
// We ought to find a cleaner solution for compiling stubs parameterised
// over type or class variables, esp ones with bounds...
return kDetectable;
+ case DECLARED_ACCESSOR_INFO_TYPE:
+ case EXECUTABLE_ACCESSOR_INFO_TYPE:
+ case ACCESSOR_PAIR_TYPE:
+ return kInternal;
default:
UNREACHABLE();
return kNone;
@@ -222,7 +227,7 @@ int Type::GlbBitset() {
// Check this <= that.
-bool Type::Is(Type* that) {
+bool Type::IsSlowCase(Type* that) {
// Fast path for bitsets.
if (that->is_bitset()) {
return (this->LubBitset() | that->as_bitset()) == that->as_bitset();
@@ -313,6 +318,7 @@ bool Type::InUnion(Handle<Unioned> unioned, int current_size) {
return false;
}
+
// Get non-bitsets from this which are not subsumed by union, store at unioned,
// starting at index. Returns updated index.
int Type::ExtendUnion(Handle<Unioned> result, int current_size) {
@@ -471,4 +477,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::Signed32())) return Representation::Integer32();
+ if (type->Is(Type::Number())) return Representation::Double();
+ return Representation::Tagged();
+}
+
+
} } // namespace v8::internal
« no previous file with comments | « src/types.h ('k') | src/unicode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698