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

Unified Diff: src/compiler/interpreter-assembler.h

Issue 1289863003: [interpreter]: Changes to interpreter builtins for accumulator and register file registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fix_interpreter_initialization
Patch Set: Rename incoming_accumulator Created 5 years, 4 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/arm64/macro-assembler-arm64.h ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/interpreter-assembler.h
diff --git a/src/compiler/interpreter-assembler.h b/src/compiler/interpreter-assembler.h
index ead7b92d7aa8b6792398e0308ece8cdf844c4f7b..7d095c9be49d8de0d2f7cad45c827a506d491ead 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,33 +36,29 @@ class InterpreterAssembler {
Handle<Code> GenerateCode();
+ // Accumulator.
+ Node* GetAccumulator();
+ void SetAccumulator(Node* value);
+
+ // Loads from and stores to the interpreter register file.
+ Node* LoadRegister(Node* reg_index);
+ Node* StoreRegister(Node* value, Node* reg_index);
+
// 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);
-
// Returns from the function.
void Return();
// 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,17 +67,16 @@ class InterpreterAssembler {
Graph* graph();
private:
+ // Returns a raw pointer to start of the register file on the stack.
+ Node* RegisterFileRawPointer();
// Returns a tagged pointer to the current function's BytecodeArray object.
- Node* BytecodeArrayPointer();
+ Node* BytecodeArrayTaggedPointer();
// 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();
+ Node* DispatchTableRawPointer();
- // 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
@@ -96,12 +89,11 @@ class InterpreterAssembler {
// 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* accumulator_;
bool code_generated_;
DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
« no previous file with comments | « src/arm64/macro-assembler-arm64.h ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698