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

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: cl feedback and rebase Created 5 years, 6 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/ic/ic.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 f191c96f1ef43c02bf40f367da2266a3f81fe31a..dbc504bf6d79f9f95d6a86e14eca0514198507f5 100644
--- a/src/ic/ic-state.h
+++ b/src/ic/ic-state.h
@@ -56,9 +56,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),
@@ -105,8 +105,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::STRONG : Strength::WEAK;
}
// Returns true if the IC should enable the inline smi code (i.e. if either
@@ -147,7 +147,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> {};
« no previous file with comments | « 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