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

Unified Diff: src/ic.cc

Issue 104243002: Revert "Use constant types to represent the fixed right arg of a MOD." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/ic.h ('k') | src/type-info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index b548bc68609675d7fa100e1c32c78fe6bdb4f93c..8a25504564640c17e7a8f5f067889a2b6aececa8 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -2329,10 +2329,7 @@ BinaryOpIC::State::State(ExtraICState extra_ic_state) {
1 << FixedRightArgValueField::decode(extra_ic_state));
left_kind_ = LeftKindField::decode(extra_ic_state);
if (fixed_right_arg_.has_value) {
- // We have only 4 bits to encode the log2 of the fixed right arg, so the
- // max value is 2^(2^4), which is always a SMI.
- ASSERT(Smi::IsValid(fixed_right_arg_.value));
- right_kind_ = SMI;
+ right_kind_ = Smi::IsValid(fixed_right_arg_.value) ? SMI : INT32;
} else {
right_kind_ = RightKindField::decode(extra_ic_state);
}
@@ -2585,17 +2582,6 @@ void BinaryOpIC::State::GenerateAheadOfTime(
}
-Handle<Type> BinaryOpIC::State::GetRightType(Isolate* isolate) const {
- if (fixed_right_arg_.has_value) {
- Handle<Smi> value = handle(Smi::FromInt(fixed_right_arg_.value), isolate);
- Handle<Type> type = handle(Type::Constant(value, isolate), isolate);
- ASSERT(type->Is(KindToType(right_kind_, isolate)));
- return type;
- }
- return KindToType(right_kind_, isolate);
-}
-
-
Handle<Type> BinaryOpIC::State::GetResultType(Isolate* isolate) const {
Kind result_kind = result_kind_;
if (HasSideEffects()) {
« no previous file with comments | « src/ic.h ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698