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

Unified Diff: src/interpreter/bytecode-array-builder.h

Issue 1595103006: [Interpreter] Preparation for wide registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. 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
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index 6c2b941bbc0224f65f4d16fb0241194439cfeb9a..402a810d4aaa7aec1e31859cb7e63b3fa532151d 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -18,7 +18,6 @@ class Isolate;
namespace interpreter {
class BytecodeLabel;
-class ConstantArrayBuilder;
class Register;
// TODO(rmcilroy): Unify this with CreateArgumentsParameters::Type in Turbofan
@@ -98,7 +97,6 @@ class BytecodeArrayBuilder final {
// Register-register transfer.
BytecodeArrayBuilder& MoveRegister(Register from, Register to);
- BytecodeArrayBuilder& ExchangeRegisters(Register reg0, Register reg1);
// Named load property.
BytecodeArrayBuilder& LoadNamedProperty(Register object,
@@ -231,15 +229,8 @@ class BytecodeArrayBuilder final {
Zone* zone() const { return zone_; }
private:
- 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_;
- }
+ class PreviousBytecodeHelper;
+ friend class BytecodeRegisterAllocator;
static Bytecode BytecodeForBinaryOperation(Token::Value op);
static Bytecode BytecodeForCountOperation(Token::Value op);
@@ -296,12 +287,11 @@ class BytecodeArrayBuilder final {
bool OperandIsValid(Bytecode bytecode, int operand_index,
uint32_t operand_value) const;
bool LastBytecodeInSameBlock() const;
+ bool RegisterIsValid(Register reg, OperandType reg_type) const;
bool NeedToBooleanCast();
bool IsRegisterInAccumulator(Register reg);
- bool RegisterIsValid(Register reg) const;
-
// Temporary register management.
int BorrowTemporaryRegister();
int BorrowTemporaryRegisterNotInRange(int start_index, int end_index);
@@ -316,6 +306,16 @@ class BytecodeArrayBuilder final {
// Gets a constant pool entry for the |object|.
size_t GetConstantPoolEntry(Handle<Object> object);
+ 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_;
+ }
+
Isolate* isolate_;
Zone* zone_;
ZoneVector<uint8_t> bytecodes_;
@@ -332,9 +332,6 @@ class BytecodeArrayBuilder final {
int temporary_register_count_;
ZoneSet<int> free_temporaries_;
- class PreviousBytecodeHelper;
- friend class BytecodeRegisterAllocator;
-
DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
};
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698