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

Unified Diff: src/types-inl.h

Issue 837723006: Steps towards unification of number bitset and range types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Style warnings 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 | « src/types.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types-inl.h
diff --git a/src/types-inl.h b/src/types-inl.h
index 2e7f8a36fa76325acc2dd57a9b5f84ab8ca28050..60d81bdde5cd6789e4415cbfab2184cc4e74b0cd 100644
--- a/src/types-inl.h
+++ b/src/types-inl.h
@@ -16,6 +16,20 @@ namespace internal {
// -----------------------------------------------------------------------------
// TypeImpl
+template <class Config>
+typename TypeImpl<Config>::bitset
+TypeImpl<Config>::BitsetType::SignedSmall() {
+ return i::SmiValuesAre31Bits() ? kSigned31 : kSigned32;
+}
+
+
+template <class Config>
+typename TypeImpl<Config>::bitset
+TypeImpl<Config>::BitsetType::UnsignedSmall() {
+ return i::SmiValuesAre31Bits() ? kUnsigned30 : kUnsigned31;
+}
+
+
template<class Config>
TypeImpl<Config>* TypeImpl<Config>::cast(typename Config::Base* object) {
TypeImpl* t = static_cast<TypeImpl*>(object);
@@ -201,6 +215,9 @@ void ZoneTypeConfig::struct_set_value(
}
+// static
+i::Isolate* ZoneTypeConfig::isolate(Zone* zone) { return zone->isolate(); }
+
// -----------------------------------------------------------------------------
// HeapTypeConfig
@@ -348,6 +365,8 @@ void HeapTypeConfig::struct_set_value(
structure->set(i + 1, *x);
}
+// static
+i::Isolate* HeapTypeConfig::isolate(Isolate* isolate) { return isolate; }
} } // namespace v8::internal
#endif // V8_TYPES_INL_H_
« no previous file with comments | « src/types.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698