| Index: src/interpreter/bytecode-array-builder.h
|
| diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
|
| index 4906e715ac34224bf45dec9559310728f175f02b..bcbdc248922453380f49bf0b2251d5d75f73ce33 100644
|
| --- a/src/interpreter/bytecode-array-builder.h
|
| +++ b/src/interpreter/bytecode-array-builder.h
|
| @@ -5,12 +5,9 @@
|
| #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
|
| #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
|
|
|
| -#include <vector>
|
| -
|
| #include "src/ast/ast.h"
|
| -#include "src/identity-map.h"
|
| #include "src/interpreter/bytecodes.h"
|
| -#include "src/zone.h"
|
| +#include "src/interpreter/constant-array-builder.h"
|
| #include "src/zone-containers.h"
|
|
|
| namespace v8 {
|
| @@ -21,6 +18,7 @@ class Isolate;
|
| namespace interpreter {
|
|
|
| class BytecodeLabel;
|
| +class ConstantArrayBuilder;
|
| class Register;
|
|
|
| // TODO(rmcilroy): Unify this with CreateArgumentsParameters::Type in Turbofan
|
| @@ -228,6 +226,12 @@ class BytecodeArrayBuilder final {
|
| ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; }
|
| const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; }
|
| Isolate* isolate() const { return isolate_; }
|
| + ConstantArrayBuilder* constant_array_builder() {
|
| + return &constant_array_builder_;
|
| + }
|
| + const ConstantArrayBuilder* constant_array_builder() const {
|
| + return &constant_array_builder_;
|
| + }
|
|
|
| static Bytecode BytecodeForBinaryOperation(Token::Value op);
|
| static Bytecode BytecodeForCountOperation(Token::Value op);
|
| @@ -250,8 +254,9 @@ class BytecodeArrayBuilder final {
|
| static bool FitsInIdx16Operand(int value);
|
| static bool FitsInIdx16Operand(size_t value);
|
|
|
| - static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand);
|
| - static Bytecode GetJumpWithToBoolean(Bytecode jump);
|
| + static Bytecode GetJumpWithConstantOperand(Bytecode jump_smi8_operand);
|
| + static Bytecode GetJumpWithConstantWideOperand(Bytecode jump_smi8_operand);
|
| + static Bytecode GetJumpWithToBoolean(Bytecode jump_smi8_operand);
|
|
|
| template <size_t N>
|
| INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N]));
|
| @@ -266,7 +271,13 @@ class BytecodeArrayBuilder final {
|
| BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode,
|
| BytecodeLabel* label);
|
| void PatchJump(const ZoneVector<uint8_t>::iterator& jump_target,
|
| - ZoneVector<uint8_t>::iterator jump_location);
|
| + const ZoneVector<uint8_t>::iterator& jump_location);
|
| + void PatchIndirectJumpWith8BitOperand(
|
| + const ZoneVector<uint8_t>::iterator& jump_target,
|
| + const ZoneVector<uint8_t>::iterator& jump_location);
|
| + void PatchIndirectJumpWith16BitOperand(
|
| + const ZoneVector<uint8_t>::iterator& jump_target,
|
| + const ZoneVector<uint8_t>::iterator& jump_location);
|
|
|
| void LeaveBasicBlock();
|
| void EnsureReturn();
|
| @@ -278,6 +289,7 @@ class BytecodeArrayBuilder final {
|
| bool NeedToBooleanCast();
|
| bool IsRegisterInAccumulator(Register reg);
|
|
|
| + // Temporary register management.
|
| int BorrowTemporaryRegister();
|
| int BorrowTemporaryRegisterNotInRange(int start_index, int end_index);
|
| int AllocateAndBorrowTemporaryRegister();
|
| @@ -296,19 +308,16 @@ class BytecodeArrayBuilder final {
|
| Zone* zone_;
|
| ZoneVector<uint8_t> bytecodes_;
|
| bool bytecode_generated_;
|
| + ConstantArrayBuilder constant_array_builder_;
|
| size_t last_block_end_;
|
| size_t last_bytecode_start_;
|
| bool exit_seen_in_block_;
|
| int unbound_jumps_;
|
|
|
| - IdentityMap<size_t> constants_map_;
|
| - ZoneVector<Handle<Object>> constants_;
|
| -
|
| int parameter_count_;
|
| int local_register_count_;
|
| int context_register_count_;
|
| int temporary_register_count_;
|
| -
|
| ZoneSet<int> free_temporaries_;
|
|
|
| class PreviousBytecodeHelper;
|
|
|