| OLD | NEW | 
|---|
| 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" | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 103   // receiver) and the first argument located at |first_arg|. | 103   // receiver) and the first argument located at |first_arg|. | 
| 104   Node* CallJS(Node* function, Node* first_arg, Node* arg_count); | 104   Node* CallJS(Node* function, Node* first_arg, Node* arg_count); | 
| 105 | 105 | 
| 106   // Call an IC code stub. | 106   // Call an IC code stub. | 
| 107   Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, | 107   Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, | 
| 108                Node* arg2, Node* arg3, Node* arg4); | 108                Node* arg2, Node* arg3, Node* arg4); | 
| 109   Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, | 109   Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, | 
| 110                Node* arg2, Node* arg3, Node* arg4, Node* arg5); | 110                Node* arg2, Node* arg3, Node* arg4, Node* arg5); | 
| 111 | 111 | 
| 112   // Call runtime function. | 112   // Call runtime function. | 
| 113   Node* CallRuntime(Node* function_id, Node* first_arg, Node* arg_count); |  | 
| 114   Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1); | 113   Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1); | 
| 115   Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2); | 114   Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2); | 
| 116 | 115 | 
| 117   // Jump relative to the current bytecode by |jump_offset|. | 116   // Jump relative to the current bytecode by |jump_offset|. | 
| 118   void Jump(Node* jump_offset); | 117   void Jump(Node* jump_offset); | 
| 119 | 118 | 
| 120   // Jump relative to the current bytecode by |jump_offset| if the | 119   // Jump relative to the current bytecode by |jump_offset| if the | 
| 121   // word values |lhs| and |rhs| are equal. | 120   // word values |lhs| and |rhs| are equal. | 
| 122   void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset); | 121   void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset); | 
| 123 | 122 | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 150   Node* ContextTaggedPointer(); | 149   Node* ContextTaggedPointer(); | 
| 151 | 150 | 
| 152   // Returns the offset of register |index| relative to RegisterFilePointer(). | 151   // Returns the offset of register |index| relative to RegisterFilePointer(). | 
| 153   Node* RegisterFrameOffset(Node* index); | 152   Node* RegisterFrameOffset(Node* index); | 
| 154 | 153 | 
| 155   Node* SmiShiftBitsConstant(); | 154   Node* SmiShiftBitsConstant(); | 
| 156   Node* BytecodeOperand(int operand_index); | 155   Node* BytecodeOperand(int operand_index); | 
| 157   Node* BytecodeOperandSignExtended(int operand_index); | 156   Node* BytecodeOperandSignExtended(int operand_index); | 
| 158   Node* BytecodeOperandShort(int operand_index); | 157   Node* BytecodeOperandShort(int operand_index); | 
| 159 | 158 | 
| 160   Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); |  | 
| 161   Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node** args); | 159   Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node** args); | 
| 162   Node* CallJSBuiltin(int context_index, Node* receiver, Node** js_args, | 160   Node* CallJSBuiltin(int context_index, Node* receiver, Node** js_args, | 
| 163                       int js_arg_count); | 161                       int js_arg_count); | 
| 164 | 162 | 
| 165   // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not | 163   // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not | 
| 166   // update BytecodeOffset() itself. | 164   // update BytecodeOffset() itself. | 
| 167   Node* Advance(int delta); | 165   Node* Advance(int delta); | 
| 168   Node* Advance(Node* delta); | 166   Node* Advance(Node* delta); | 
| 169 | 167 | 
| 170   // Starts next instruction dispatch at |new_bytecode_offset|. | 168   // Starts next instruction dispatch at |new_bytecode_offset|. | 
| 171   void DispatchTo(Node* new_bytecode_offset); | 169   void DispatchTo(Node* new_bytecode_offset); | 
| 172 | 170 | 
| 173   // Abort operations for debug code. |  | 
| 174   void AbortIfWordNotEqual(Node* lhs, Node* rhs, BailoutReason bailout_reason); |  | 
| 175 |  | 
| 176   // Adds an end node of the graph. | 171   // Adds an end node of the graph. | 
| 177   void AddEndInput(Node* input); | 172   void AddEndInput(Node* input); | 
| 178 | 173 | 
| 179   // Private helpers which delegate to RawMachineAssembler. | 174   // Private helpers which delegate to RawMachineAssembler. | 
| 180   Isolate* isolate(); | 175   Isolate* isolate(); | 
| 181   Schedule* schedule(); | 176   Schedule* schedule(); | 
| 182   Zone* zone(); | 177   Zone* zone(); | 
| 183 | 178 | 
| 184   interpreter::Bytecode bytecode_; | 179   interpreter::Bytecode bytecode_; | 
| 185   base::SmartPointer<RawMachineAssembler> raw_assembler_; | 180   base::SmartPointer<RawMachineAssembler> raw_assembler_; | 
| 186   ZoneVector<Node*> end_nodes_; | 181   ZoneVector<Node*> end_nodes_; | 
| 187   Node* accumulator_; | 182   Node* accumulator_; | 
| 188   bool code_generated_; | 183   bool code_generated_; | 
| 189 | 184 | 
| 190   DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 185   DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 
| 191 }; | 186 }; | 
| 192 | 187 | 
| 193 }  // namespace compiler | 188 }  // namespace compiler | 
| 194 }  // namespace internal | 189 }  // namespace internal | 
| 195 }  // namespace v8 | 190 }  // namespace v8 | 
| 196 | 191 | 
| 197 #endif  // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ | 192 #endif  // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ | 
| OLD | NEW | 
|---|