| 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_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 5 #ifndef V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
| 6 #define V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 6 #define V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/builtins/builtins.h" | 9 #include "src/builtins/builtins.h" |
| 10 #include "src/code-stub-assembler.h" | 10 #include "src/code-stub-assembler.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 // Context at |depth| in the context chain starting at |context|. | 75 // Context at |depth| in the context chain starting at |context|. |
| 76 compiler::Node* GetContextAtDepth(compiler::Node* context, | 76 compiler::Node* GetContextAtDepth(compiler::Node* context, |
| 77 compiler::Node* depth); | 77 compiler::Node* depth); |
| 78 | 78 |
| 79 // Goto the given |target| if the context chain starting at |context| has any | 79 // Goto the given |target| if the context chain starting at |context| has any |
| 80 // extensions up to the given |depth|. | 80 // extensions up to the given |depth|. |
| 81 void GotoIfHasContextExtensionUpToDepth(compiler::Node* context, | 81 void GotoIfHasContextExtensionUpToDepth(compiler::Node* context, |
| 82 compiler::Node* depth, Label* target); | 82 compiler::Node* depth, Label* target); |
| 83 | 83 |
| 84 // Number of registers. | |
| 85 compiler::Node* RegisterCount(); | |
| 86 | |
| 87 // Backup/restore register file to/from a fixed array of the correct length. | 84 // Backup/restore register file to/from a fixed array of the correct length. |
| 88 compiler::Node* ExportRegisterFile(compiler::Node* array); | 85 compiler::Node* ExportRegisterFile(compiler::Node* array, |
| 89 compiler::Node* ImportRegisterFile(compiler::Node* array); | 86 compiler::Node* register_count); |
| 87 compiler::Node* ImportRegisterFile(compiler::Node* array, |
| 88 compiler::Node* register_count); |
| 90 | 89 |
| 91 // Loads from and stores to the interpreter register file. | 90 // Loads from and stores to the interpreter register file. |
| 92 compiler::Node* LoadRegister(Register reg); | 91 compiler::Node* LoadRegister(Register reg); |
| 93 compiler::Node* LoadRegister(compiler::Node* reg_index); | 92 compiler::Node* LoadRegister(compiler::Node* reg_index); |
| 94 compiler::Node* LoadAndUntagRegister(Register reg); | 93 compiler::Node* LoadAndUntagRegister(Register reg); |
| 95 compiler::Node* StoreRegister(compiler::Node* value, Register reg); | 94 compiler::Node* StoreRegister(compiler::Node* value, Register reg); |
| 96 compiler::Node* StoreRegister(compiler::Node* value, | 95 compiler::Node* StoreRegister(compiler::Node* value, |
| 97 compiler::Node* reg_index); | 96 compiler::Node* reg_index); |
| 98 compiler::Node* StoreAndTagRegister(compiler::Node* value, Register reg); | 97 compiler::Node* StoreAndTagRegister(compiler::Node* value, Register reg); |
| 99 | 98 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // Truncate tagged |value| to word32 and store the type feedback in | 213 // Truncate tagged |value| to word32 and store the type feedback in |
| 215 // |var_type_feedback|. | 214 // |var_type_feedback|. |
| 216 compiler::Node* TruncateTaggedToWord32WithFeedback( | 215 compiler::Node* TruncateTaggedToWord32WithFeedback( |
| 217 compiler::Node* context, compiler::Node* value, | 216 compiler::Node* context, compiler::Node* value, |
| 218 Variable* var_type_feedback); | 217 Variable* var_type_feedback); |
| 219 | 218 |
| 220 // Abort with the given bailout reason. | 219 // Abort with the given bailout reason. |
| 221 void Abort(BailoutReason bailout_reason); | 220 void Abort(BailoutReason bailout_reason); |
| 222 void AbortIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs, | 221 void AbortIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs, |
| 223 BailoutReason bailout_reason); | 222 BailoutReason bailout_reason); |
| 223 // Abort if |register_count| is invalid for given register file array. |
| 224 void AbortIfRegisterCountInvalid(compiler::Node* register_file, |
| 225 compiler::Node* register_count); |
| 224 | 226 |
| 225 // Dispatch to frame dropper trampoline if necessary. | 227 // Dispatch to frame dropper trampoline if necessary. |
| 226 void MaybeDropFrames(compiler::Node* context); | 228 void MaybeDropFrames(compiler::Node* context); |
| 227 | 229 |
| 228 // Returns the offset from the BytecodeArrayPointer of the current bytecode. | 230 // Returns the offset from the BytecodeArrayPointer of the current bytecode. |
| 229 compiler::Node* BytecodeOffset(); | 231 compiler::Node* BytecodeOffset(); |
| 230 | 232 |
| 231 protected: | 233 protected: |
| 232 Bytecode bytecode() const { return bytecode_; } | 234 Bytecode bytecode() const { return bytecode_; } |
| 233 static bool TargetSupportsUnalignedAccess(); | 235 static bool TargetSupportsUnalignedAccess(); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 compiler::Node* stack_pointer_before_call_; | 361 compiler::Node* stack_pointer_before_call_; |
| 360 | 362 |
| 361 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 363 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
| 362 }; | 364 }; |
| 363 | 365 |
| 364 } // namespace interpreter | 366 } // namespace interpreter |
| 365 } // namespace internal | 367 } // namespace internal |
| 366 } // namespace v8 | 368 } // namespace v8 |
| 367 | 369 |
| 368 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 370 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
| OLD | NEW |