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

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

Issue 1436493002: [builtins] Introduce specialized Call/CallFunction builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 442e87c179598a46f8c0de7038e045ee0e2ba9e9..ebc686b7383bab3b6f2cba261b2038b2cb9e8405 100644
--- a/src/ic/ic-state.h
+++ b/src/ic/ic-state.h
@@ -23,20 +23,29 @@ class ICUtility : public AllStatic {
class CallICState final BASE_EMBEDDED {
public:
- explicit CallICState(int argc) : argc_(argc) {}
+ explicit CallICState(ExtraICState extra_ic_state)
+ : bit_field_(extra_ic_state) {}
+ CallICState(int argc, ConvertReceiverMode convert_mode)
+ : bit_field_(ArgcBits::encode(argc) |
+ ConvertModeBits::encode(convert_mode)) {}
- ExtraICState GetExtraICState() const;
+ ExtraICState GetExtraICState() const { return bit_field_; }
static void GenerateAheadOfTime(Isolate*,
void (*Generate)(Isolate*,
const CallICState&));
- int arg_count() const { return argc_; }
+ int argc() const { return ArgcBits::decode(bit_field_); }
+ ConvertReceiverMode convert_mode() const {
+ return ConvertModeBits::decode(bit_field_);
+ }
private:
- class ArgcBits : public BitField<int, 0, Code::kArgumentsBits> {};
+ typedef BitField<int, 0, Code::kArgumentsBits> ArgcBits;
+ typedef BitField<ConvertReceiverMode, Code::kArgumentsBits, 2>
+ ConvertModeBits;
- const int argc_;
+ int const bit_field_;
};
« 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