Index: src/compiler/interpreter-assembler.h |
diff --git a/src/compiler/interpreter-assembler.h b/src/compiler/interpreter-assembler.h |
index ead7b92d7aa8b6792398e0308ece8cdf844c4f7b..3459956b112f8d6bda975bc089ed09fa418da0d9 100644 |
--- a/src/compiler/interpreter-assembler.h |
+++ b/src/compiler/interpreter-assembler.h |
@@ -22,9 +22,7 @@ class Zone; |
namespace compiler { |
class CallDescriptor; |
-class CommonOperatorBuilder; |
class Graph; |
-class MachineOperatorBuilder; |
class Node; |
class Operator; |
class RawMachineAssembler; |
@@ -38,19 +36,18 @@ class InterpreterAssembler { |
Handle<Code> GenerateCode(); |
+ // Accumulator. |
+ Node* IncomingAccumulator(); |
titzer
2015/08/14 12:42:20
The distinction between "incoming" accumulator and
rmcilroy
2015/08/14 14:03:41
Good idea. Done.
|
+ void StoreAccumulator(Node* value); |
+ |
// Constants. |
Node* Int32Constant(int value); |
Node* NumberConstant(double value); |
Node* HeapConstant(Unique<HeapObject> object); |
- // Returns the bytecode operand |index| for the current bytecode. |
- Node* BytecodeOperand(int index); |
- |
// Loads from and stores to the interpreter register file. |
- Node* LoadRegister(int index); |
- Node* LoadRegister(Node* index); |
- Node* StoreRegister(Node* value, int index); |
- Node* StoreRegister(Node* value, Node* index); |
+ Node* LoadRegister(Node* reg_index); |
+ Node* StoreRegister(Node* value, Node* reg_index); |
// Returns from the function. |
void Return(); |
@@ -58,13 +55,10 @@ class InterpreterAssembler { |
// Dispatch to the bytecode. |
void Dispatch(); |
- protected: |
- static const int kFirstRegisterOffsetFromFp = |
- -kPointerSize - StandardFrameConstants::kFixedFrameSizeFromFp; |
- |
- // TODO(rmcilroy): Increase this when required. |
- static const int kMaxRegisterIndex = 255; |
+ Node* BytecodeOperand(int index); |
+ Node* BytecodeOperandSignExtended(int index); |
+ protected: |
// Close the graph. |
void End(); |
@@ -73,35 +67,37 @@ class InterpreterAssembler { |
Graph* graph(); |
private: |
+ // Returns a raw pointer to start of the register file on the stack. |
+ Node* RegisterFilePointer(); |
titzer
2015/08/14 12:42:20
Can we name this RegisterFileRawPointer() and the
rmcilroy
2015/08/14 14:03:41
Done (also done for DispatchTablePointer below)
|
// Returns a tagged pointer to the current function's BytecodeArray object. |
Node* BytecodeArrayPointer(); |
// Returns the offset from the BytecodeArrayPointer of the current bytecode. |
Node* BytecodeOffset(); |
// Returns a pointer to first entry in the interpreter dispatch table. |
Node* DispatchTablePointer(); |
- // Returns the frame pointer for the current function. |
- Node* FramePointer(); |
- // Returns the offset of register |index|. |
- Node* RegisterFrameOffset(int index); |
+ // Returns the offset of register |index| relative to RegisterFilePointer(). |
Node* RegisterFrameOffset(Node* index); |
// Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not |
// update BytecodeOffset() itself. |
Node* Advance(int delta); |
+ // Returns the outgoing accumulator value, which is either by |
+ // SetOutgoingAccumulator or is the IncomingAccumulator. |
+ Node* OutgoingAccumulator(); |
+ |
// Sets the end node of the graph. |
void SetEndInput(Node* input); |
// Private helpers which delegate to RawMachineAssembler. |
Isolate* isolate(); |
Schedule* schedule(); |
- MachineOperatorBuilder* machine(); |
- CommonOperatorBuilder* common(); |
interpreter::Bytecode bytecode_; |
base::SmartPointer<RawMachineAssembler> raw_assembler_; |
Node* end_node_; |
+ Node* outgoing_accumulator_; |
bool code_generated_; |
DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |