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

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

Issue 1092353002: [strong] Disallow implicit conversions for binary arithmetic operations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase :( Created 5 years, 8 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 d3fdbe0dfbee75dd9d55286fdc297897bb424c3c..6863c6e7b91281192d247d1c3d3e4eebdfbd3420 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)
+ BinaryOpICState(Isolate* isolate, Token::Value op, LanguageMode language_mode)
: op_(op),
+ language_mode_(language_mode),
left_kind_(NONE),
right_kind_(NONE),
result_kind_(NONE),
@@ -106,6 +106,10 @@ class BinaryOpICState final BASE_EMBEDDED {
return Max(left_kind_, right_kind_) == GENERIC;
}
+ LanguageMode language_mode() const {
+ return language_mode_;
+ }
+
// Returns true if the IC should enable the inline smi code (i.e. if either
// parameter may be a smi).
bool UseInlinedSmiCode() const {
@@ -147,10 +151,12 @@ class BinaryOpICState final BASE_EMBEDDED {
// 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, 10, 1> {};
- class FixedRightArgValueField : public BitField<int, 11, 4> {};
- class RightKindField : public BitField<Kind, 11, 3> {};
+ class LanguageModeField : public BitField<LanguageMode, 11, 2> {};
+ class FixedRightArgValueField : public BitField<int, 13, 4> {};
+ class RightKindField : public BitField<Kind, 13, 3> {};
Token::Value op_;
+ LanguageMode language_mode_;
Kind left_kind_;
Kind right_kind_;
Kind result_kind_;

Powered by Google App Engine
This is Rietveld 408576698