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

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

Issue 1144183004: [strong] Refactor ObjectStrength into a replacement for strong boolean args (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: everything should work now Created 5 years, 7 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/ic/ic-state.h
diff --git a/src/ic/ic-state.h b/src/ic/ic-state.h
index e451fb2c80c2299b5b9695ffd52821b516789f9c..1bf325315871169c3d5effc532a9884636ead133 100644
--- a/src/ic/ic-state.h
+++ b/src/ic/ic-state.h
@@ -57,9 +57,9 @@ std::ostream& operator<<(std::ostream& os, const CallICState& s);
class BinaryOpICState final BASE_EMBEDDED {
public:
BinaryOpICState(Isolate* isolate, ExtraICState extra_ic_state);
- BinaryOpICState(Isolate* isolate, Token::Value op, LanguageMode language_mode)
+ BinaryOpICState(Isolate* isolate, Token::Value op, Strength strength)
: op_(op),
- strong_(is_strong(language_mode)),
+ strong_(is_strong(strength)),
left_kind_(NONE),
right_kind_(NONE),
result_kind_(NONE),
@@ -106,8 +106,8 @@ class BinaryOpICState final BASE_EMBEDDED {
return Max(left_kind_, right_kind_) == GENERIC;
}
- LanguageMode language_mode() const {
- return strong_ ? LanguageMode::STRONG : LanguageMode::SLOPPY;
+ Strength strength() const {
+ return strong_ ? Strength::FIRM : Strength::WEAK;
}
// Returns true if the IC should enable the inline smi code (i.e. if either
@@ -148,7 +148,7 @@ class BinaryOpICState final BASE_EMBEDDED {
class OpField : public BitField<int, 0, 4> {};
class ResultKindField : public BitField<Kind, 4, 3> {};
class LeftKindField : public BitField<Kind, 7, 3> {};
- class StrongField : public BitField<bool, 10, 1> {};
+ class StrengthField : public BitField<bool, 10, 1> {};
// 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, 11, 1> {};
« src/compiler/js-operator.h ('K') | « src/ic/ic.cc ('k') | src/ic/ic-state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698