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

Unified Diff: src/ic/ic-state.h

Issue 900193002: Remove the obsolete OverwriteMode optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 5 years, 10 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/ia32/lithium-codegen-ia32.cc ('k') | src/ic/ic-state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic-state.h
diff --git a/src/ic/ic-state.h b/src/ic/ic-state.h
index 72fc865c68d1ebe221f37829f5e457bf7c12cd84..b5f58ed211a1800ede1b7c6022409cfa04669797 100644
--- a/src/ic/ic-state.h
+++ b/src/ic/ic-state.h
@@ -54,16 +54,12 @@ class CallICState FINAL BASE_EMBEDDED {
std::ostream& operator<<(std::ostream& os, const CallICState& s);
-// Mode to overwrite BinaryExpression values.
-enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
-
class BinaryOpICState FINAL BASE_EMBEDDED {
public:
BinaryOpICState(Isolate* isolate, ExtraICState extra_ic_state);
- BinaryOpICState(Isolate* isolate, Token::Value op, OverwriteMode mode)
+ BinaryOpICState(Isolate* isolate, Token::Value op)
: op_(op),
- mode_(mode),
left_kind_(NONE),
right_kind_(NONE),
result_kind_(NONE),
@@ -91,14 +87,6 @@ class BinaryOpICState FINAL BASE_EMBEDDED {
void (*Generate)(Isolate*,
const BinaryOpICState&));
- bool CanReuseDoubleBox() const {
- return (result_kind_ > SMI && result_kind_ <= NUMBER) &&
- ((mode_ == OVERWRITE_LEFT && left_kind_ > SMI &&
- left_kind_ <= NUMBER) ||
- (mode_ == OVERWRITE_RIGHT && right_kind_ > SMI &&
- right_kind_ <= NUMBER));
- }
-
// Returns true if the IC _could_ create allocation mementos.
bool CouldCreateAllocationMementos() const {
if (left_kind_ == STRING || right_kind_ == STRING) {
@@ -127,7 +115,6 @@ class BinaryOpICState FINAL BASE_EMBEDDED {
static const int LAST_TOKEN = Token::MOD;
Token::Value op() const { return op_; }
- OverwriteMode mode() const { return mode_; }
Maybe<int> fixed_right_arg() const { return fixed_right_arg_; }
Type* GetLeftType(Zone* zone) const { return KindToType(left_kind_, zone); }
@@ -154,17 +141,15 @@ class BinaryOpICState FINAL BASE_EMBEDDED {
// We truncate the last bit of the token.
STATIC_ASSERT(LAST_TOKEN - FIRST_TOKEN < (1 << 4));
class OpField : public BitField<int, 0, 4> {};
- class OverwriteModeField : public BitField<OverwriteMode, 4, 2> {};
- class ResultKindField : public BitField<Kind, 6, 3> {};
- class LeftKindField : public BitField<Kind, 9, 3> {};
+ class ResultKindField : public BitField<Kind, 4, 3> {};
+ class LeftKindField : public BitField<Kind, 7, 3> {};
// When fixed right arg is set, we don't need to store the right kind.
// Thus the two fields can overlap.
- class HasFixedRightArgField : public BitField<bool, 12, 1> {};
- class FixedRightArgValueField : public BitField<int, 13, 4> {};
- class RightKindField : public BitField<Kind, 13, 3> {};
+ class HasFixedRightArgField : public BitField<bool, 10, 1> {};
+ class FixedRightArgValueField : public BitField<int, 11, 4> {};
+ class RightKindField : public BitField<Kind, 11, 3> {};
Token::Value op_;
- OverwriteMode mode_;
Kind left_kind_;
Kind right_kind_;
Kind result_kind_;
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic/ic-state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698