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

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: 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..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);
« 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