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

Unified Diff: src/types-inl.h

Issue 877643002: Reland of "Steps towards unification of number bitset and range types." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Avoid (some of the) uninhabited type normalization based on representation. 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
Index: src/types-inl.h
diff --git a/src/types-inl.h b/src/types-inl.h
index 2e7f8a36fa76325acc2dd57a9b5f84ab8ca28050..c22dfd4fcc3bf365cdf68ac2ab1601f56a4ffa86 100644
--- a/src/types-inl.h
+++ b/src/types-inl.h
@@ -16,6 +16,19 @@ 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);
« src/types.cc ('K') | « 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