| Index: src/arm64/lithium-arm64.h
|
| diff --git a/src/arm64/lithium-arm64.h b/src/arm64/lithium-arm64.h
|
| index bca5e54c1e574eca246050ea8467341b64ce5127..72ae57db3c92819935e66ea32bd2f1278c07e45d 100644
|
| --- a/src/arm64/lithium-arm64.h
|
| +++ b/src/arm64/lithium-arm64.h
|
| @@ -136,7 +136,8 @@ class LCodeGen;
|
| V(OsrEntry) \
|
| V(Parameter) \
|
| V(Power) \
|
| - V(PushArgument) \
|
| + V(PreparePushArguments) \
|
| + V(PushArguments) \
|
| V(RegExpLiteral) \
|
| V(Return) \
|
| V(SeqStringGetChar) \
|
| @@ -2249,15 +2250,50 @@ class LPower V8_FINAL : public LTemplateInstruction<1, 2, 0> {
|
| };
|
|
|
|
|
| -class LPushArgument V8_FINAL : public LTemplateInstruction<0, 1, 0> {
|
| +class LPreparePushArguments V8_FINAL : public LTemplateInstruction<0, 0, 0> {
|
| public:
|
| - explicit LPushArgument(LOperand* value) {
|
| - inputs_[0] = value;
|
| + explicit LPreparePushArguments(int argc) : argc_(argc) {}
|
| +
|
| + inline int argc() const { return argc_; }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(PreparePushArguments, "prepare-push-arguments")
|
| +
|
| + protected:
|
| + int argc_;
|
| +};
|
| +
|
| +
|
| +class LPushArguments V8_FINAL : public LTemplateResultInstruction<0> {
|
| + public:
|
| + explicit LPushArguments(Zone* zone,
|
| + int capacity = kRecommendedMaxPushedArgs)
|
| + : zone_(zone), inputs_(capacity, zone) {}
|
| +
|
| + LOperand* argument(int i) { return inputs_[i]; }
|
| + int ArgumentCount() const { return inputs_.length(); }
|
| +
|
| + void AddArgument(LOperand* arg) { inputs_.Add(arg, zone_); }
|
| +
|
| + DECLARE_CONCRETE_INSTRUCTION(PushArguments, "push-arguments")
|
| +
|
| + // It is better to limit the number of arguments pushed simultaneously to
|
| + // avoid pressure on the register allocator.
|
| + static const int kRecommendedMaxPushedArgs = 4;
|
| + bool ShouldSplitPush() const {
|
| + return inputs_.length() >= kRecommendedMaxPushedArgs;
|
| }
|
|
|
| - LOperand* value() { return inputs_[0]; }
|
| + protected:
|
| + Zone* zone_;
|
| + ZoneList<LOperand*> inputs_;
|
|
|
| - DECLARE_CONCRETE_INSTRUCTION(PushArgument, "push-argument")
|
| + private:
|
| + // Iterator support.
|
| + virtual int InputCount() V8_FINAL V8_OVERRIDE { return inputs_.length(); }
|
| + virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; }
|
| +
|
| + virtual int TempCount() V8_FINAL V8_OVERRIDE { return 0; }
|
| + virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return NULL; }
|
| };
|
|
|
|
|
|
|