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

Side by Side Diff: src/compiler/interpreter-assembler.h

Issue 1254293006: [interpreter] Change interpreter to use an BytecodeArray pointer and and offset. (Closed) Base URL: ssh://rmcilroy.lon.corp.google.com///usr/local/google/code/v8_full/v8@master
Patch Set: Fix MIPS merge error 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 unified diff | Download patch
« no previous file with comments | « src/compiler/ia32/linkage-ia32.cc ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_INTERPRETER_CODEGEN_H_ 5 #ifndef V8_COMPILER_INTERPRETER_CODEGEN_H_
6 #define V8_COMPILER_INTERPRETER_CODEGEN_H_ 6 #define V8_COMPILER_INTERPRETER_CODEGEN_H_
7 7
8 // Clients of this interface shouldn't depend on lots of compiler internals. 8 // Clients of this interface shouldn't depend on lots of compiler internals.
9 // Do not include anything from src/compiler here! 9 // Do not include anything from src/compiler here!
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 static const int kMaxRegisterIndex = 255; 61 static const int kMaxRegisterIndex = 255;
62 62
63 // Close the graph. 63 // Close the graph.
64 void End(); 64 void End();
65 65
66 // Protected helpers (for testing) which delegate to RawMachineAssembler. 66 // Protected helpers (for testing) which delegate to RawMachineAssembler.
67 CallDescriptor* call_descriptor() const; 67 CallDescriptor* call_descriptor() const;
68 Graph* graph(); 68 Graph* graph();
69 69
70 private: 70 private:
71 // Returns the pointer to the current bytecode. 71 // Returns a tagged pointer to the current function's BytecodeArray object.
72 Node* BytecodePointer(); 72 Node* BytecodeArrayPointer();
73 // Returns the pointer to first entry in the interpreter dispatch table. 73 // Returns the offset from the BytecodeArrayPointer of the current bytecode.
74 Node* BytecodeOffset();
75 // Returns a pointer to first entry in the interpreter dispatch table.
74 Node* DispatchTablePointer(); 76 Node* DispatchTablePointer();
75 // Returns the frame pointer for the current function. 77 // Returns the frame pointer for the current function.
76 Node* FramePointer(); 78 Node* FramePointer();
77 79
78 // Returns the offset of register |index|. 80 // Returns the offset of register |index|.
79 Node* RegisterFrameOffset(int index); 81 Node* RegisterFrameOffset(int index);
80 Node* RegisterFrameOffset(Node* index); 82 Node* RegisterFrameOffset(Node* index);
81 83
82 // Returns BytecodePointer() advanced by delta bytecodes. Note: this does not 84 // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not
83 // update BytecodePointer() itself. 85 // update BytecodeOffset() itself.
84 Node* Advance(int delta); 86 Node* Advance(int delta);
85 87
86 // Sets the end node of the graph. 88 // Sets the end node of the graph.
87 void SetEndInput(Node* input); 89 void SetEndInput(Node* input);
88 90
89 // Private helpers which delegate to RawMachineAssembler. 91 // Private helpers which delegate to RawMachineAssembler.
90 Isolate* isolate(); 92 Isolate* isolate();
91 Schedule* schedule(); 93 Schedule* schedule();
92 MachineOperatorBuilder* machine(); 94 MachineOperatorBuilder* machine();
93 CommonOperatorBuilder* common(); 95 CommonOperatorBuilder* common();
94 96
95 interpreter::Bytecode bytecode_; 97 interpreter::Bytecode bytecode_;
96 base::SmartPointer<RawMachineAssembler> raw_assembler_; 98 base::SmartPointer<RawMachineAssembler> raw_assembler_;
97 Node* end_node_; 99 Node* end_node_;
98 bool code_generated_; 100 bool code_generated_;
99 101
100 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 102 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
101 }; 103 };
102 104
103 } // namespace interpreter 105 } // namespace interpreter
104 } // namespace internal 106 } // namespace internal
105 } // namespace v8 107 } // namespace v8
106 108
107 #endif // V8_COMPILER_INTERPRETER_CODEGEN_H_ 109 #endif // V8_COMPILER_INTERPRETER_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/compiler/ia32/linkage-ia32.cc ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698