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

Unified Diff: src/crankshaft/hydrogen-instructions.h

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Support for CS and TF compilers added Created 4 years, 11 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/crankshaft/hydrogen-instructions.h
diff --git a/src/crankshaft/hydrogen-instructions.h b/src/crankshaft/hydrogen-instructions.h
index 13ada8c606cfa7a79384bb2c7dfbb8bddfa442fa..5e7ee4e411f00a20d2170523ad8321853d85dac1 100644
--- a/src/crankshaft/hydrogen-instructions.h
+++ b/src/crankshaft/hydrogen-instructions.h
@@ -2396,13 +2396,19 @@ class HInvokeFunction final : public HBinaryCall {
class HCallFunction final : public HBinaryCall {
public:
- DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HCallFunction, HValue*, int,
- ConvertReceiverMode);
+ DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HCallFunction, HValue*, int,
+ ConvertReceiverMode,
+ TailCallMode);
HValue* context() const { return first(); }
HValue* function() const { return second(); }
- ConvertReceiverMode convert_mode() const { return convert_mode_; }
+ ConvertReceiverMode convert_mode() const {
+ return ConvertReceiverModeField::decode(bit_field_);
+ }
+ TailCallMode tail_call_mode() const {
+ return TailCallModeField::decode(bit_field_);
+ }
FeedbackVectorSlot slot() const { return slot_; }
Handle<TypeFeedbackVector> feedback_vector() const {
return feedback_vector_;
@@ -2422,12 +2428,19 @@ class HCallFunction final : public HBinaryCall {
private:
HCallFunction(HValue* context, HValue* function, int argument_count,
- ConvertReceiverMode convert_mode)
+ ConvertReceiverMode convert_mode, TailCallMode tail_call_mode)
: HBinaryCall(context, function, argument_count),
- convert_mode_(convert_mode) {}
+ bit_field_(ConvertReceiverModeField::encode(convert_mode) |
+ TailCallModeField::encode(tail_call_mode)) {}
Handle<TypeFeedbackVector> feedback_vector_;
FeedbackVectorSlot slot_;
- ConvertReceiverMode convert_mode_;
+
+ class ConvertReceiverModeField : public BitField<ConvertReceiverMode, 0, 2> {
+ };
+ class TailCallModeField
+ : public BitField<TailCallMode, ConvertReceiverModeField::kNext, 1> {};
+
+ uint32_t bit_field_;
};

Powered by Google App Engine
This is Rietveld 408576698