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

Unified Diff: src/types.cc

Issue 795993002: Introduce unsigned representation types (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/typing.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 b423beea0833e4be55865ff0e7d9fa463226afc4..a73df2b63a924be2272c48b70b5c19852ac8e431 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -153,9 +153,9 @@ TypeImpl<Config>::BitsetType::Lub(TypeImpl* type) {
}
if (type->IsConstant()) return type->AsConstant()->Bound()->AsBitset();
if (type->IsRange()) return type->AsRange()->BitsetLub();
- if (type->IsContext()) return kInternal & kTaggedPtr;
+ if (type->IsContext()) return kInternal & kTaggedPointer;
if (type->IsArray()) return kArray;
- if (type->IsFunction()) return kFunction;
+ if (type->IsFunction()) return kOtherObject; // TODO(rossberg): kFunction
UNREACHABLE();
return kNone;
}
@@ -200,10 +200,10 @@ TypeImpl<Config>::BitsetType::Lub(i::Map* map) {
map == heap->no_interceptor_result_sentinel_map() ||
map == heap->termination_exception_map() ||
map == heap->arguments_marker_map());
- return kInternal & kTaggedPtr;
+ return kInternal & kTaggedPointer;
}
case HEAP_NUMBER_TYPE:
- return kNumber & kTaggedPtr;
+ return kNumber & kTaggedPointer;
case JS_VALUE_TYPE:
case JS_DATE_TYPE:
case JS_OBJECT_TYPE:
@@ -227,9 +227,9 @@ TypeImpl<Config>::BitsetType::Lub(i::Map* map) {
case JS_ARRAY_TYPE:
return kArray;
case JS_FUNCTION_TYPE:
- return kFunction;
+ return kOtherObject; // TODO(rossberg): there should be a Function type.
case JS_REGEXP_TYPE:
- return kRegExp;
+ return kOtherObject; // TODO(rossberg): there should be a RegExp type.
case JS_PROXY_TYPE:
case JS_FUNCTION_PROXY_TYPE:
return kProxy;
@@ -252,7 +252,7 @@ TypeImpl<Config>::BitsetType::Lub(i::Map* map) {
case BYTE_ARRAY_TYPE:
case FOREIGN_TYPE:
case CODE_TYPE:
- return kInternal & kTaggedPtr;
+ return kInternal & kTaggedPointer;
default:
UNREACHABLE();
return kNone;
@@ -265,7 +265,8 @@ typename TypeImpl<Config>::bitset
TypeImpl<Config>::BitsetType::Lub(i::Object* value) {
DisallowHeapAllocation no_allocation;
if (value->IsNumber()) {
- return Lub(value->Number()) & (value->IsSmi() ? kTaggedInt : kTaggedPtr);
+ return Lub(value->Number()) &
+ (value->IsSmi() ? kTaggedSigned : kTaggedPointer);
}
return Lub(i::HeapObject::cast(value)->map());
}
« no previous file with comments | « src/types.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698