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

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

Issue 1493963003: [turbofan] Make RawMachineAssembler handle the end node. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 years 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/common-operator.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_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_INTERPRETER_ASSEMBLER_H_
6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_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"
11 #include "src/base/smart-pointers.h" 11 #include "src/base/smart-pointers.h"
12 #include "src/builtins.h" 12 #include "src/builtins.h"
13 #include "src/frames.h" 13 #include "src/frames.h"
14 #include "src/interpreter/bytecodes.h" 14 #include "src/interpreter/bytecodes.h"
15 #include "src/runtime/runtime.h" 15 #include "src/runtime/runtime.h"
16 #include "src/zone-containers.h"
17 16
18 namespace v8 { 17 namespace v8 {
19 namespace internal { 18 namespace internal {
20 19
21 class CallInterfaceDescriptor; 20 class CallInterfaceDescriptor;
22 class Isolate; 21 class Isolate;
23 class Zone; 22 class Zone;
24 23
25 namespace compiler { 24 namespace compiler {
26 25
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Returns from the function. 140 // Returns from the function.
142 void Return(); 141 void Return();
143 142
144 // Dispatch to the bytecode. 143 // Dispatch to the bytecode.
145 void Dispatch(); 144 void Dispatch();
146 145
147 // Abort with the given bailout reason. 146 // Abort with the given bailout reason.
148 void Abort(BailoutReason bailout_reason); 147 void Abort(BailoutReason bailout_reason);
149 148
150 protected: 149 protected:
151 // Close the graph.
152 void End();
153
154 static bool TargetSupportsUnalignedAccess(); 150 static bool TargetSupportsUnalignedAccess();
155 151
156 // Protected helpers (for testing) which delegate to RawMachineAssembler. 152 // Protected helpers (for testing) which delegate to RawMachineAssembler.
157 CallDescriptor* call_descriptor() const; 153 CallDescriptor* call_descriptor() const;
158 Graph* graph(); 154 Graph* graph();
159 155
160 private: 156 private:
161 // Returns a raw pointer to start of the register file on the stack. 157 // Returns a raw pointer to start of the register file on the stack.
162 Node* RegisterFileRawPointer(); 158 Node* RegisterFileRawPointer();
163 // Returns a tagged pointer to the current function's BytecodeArray object. 159 // Returns a tagged pointer to the current function's BytecodeArray object.
(...skipping 20 matching lines...) Expand all
184 // update BytecodeOffset() itself. 180 // update BytecodeOffset() itself.
185 Node* Advance(int delta); 181 Node* Advance(int delta);
186 Node* Advance(Node* delta); 182 Node* Advance(Node* delta);
187 183
188 // Starts next instruction dispatch at |new_bytecode_offset|. 184 // Starts next instruction dispatch at |new_bytecode_offset|.
189 void DispatchTo(Node* new_bytecode_offset); 185 void DispatchTo(Node* new_bytecode_offset);
190 186
191 // Abort operations for debug code. 187 // Abort operations for debug code.
192 void AbortIfWordNotEqual(Node* lhs, Node* rhs, BailoutReason bailout_reason); 188 void AbortIfWordNotEqual(Node* lhs, Node* rhs, BailoutReason bailout_reason);
193 189
194 // Adds an end node of the graph.
195 void AddEndInput(Node* input);
196
197 // Private helpers which delegate to RawMachineAssembler. 190 // Private helpers which delegate to RawMachineAssembler.
198 Isolate* isolate(); 191 Isolate* isolate();
199 Zone* zone(); 192 Zone* zone();
200 193
201 interpreter::Bytecode bytecode_; 194 interpreter::Bytecode bytecode_;
202 base::SmartPointer<RawMachineAssembler> raw_assembler_; 195 base::SmartPointer<RawMachineAssembler> raw_assembler_;
203 ZoneVector<Node*> end_nodes_;
204 Node* accumulator_; 196 Node* accumulator_;
205 Node* context_; 197 Node* context_;
206 bool code_generated_; 198 bool code_generated_;
207 199
208 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 200 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
209 }; 201 };
210 202
211 } // namespace compiler 203 } // namespace compiler
212 } // namespace internal 204 } // namespace internal
213 } // namespace v8 205 } // namespace v8
214 206
215 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 207 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698