| 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_H_ | 5 #ifndef V8_INTERPRETER_INTERPRETER_H_ |
| 6 #define V8_INTERPRETER_INTERPRETER_H_ | 6 #define V8_INTERPRETER_INTERPRETER_H_ |
| 7 | 7 |
| 8 // Clients of this interface shouldn't depend on lots of interpreter internals. | 8 // Clients of this interface shouldn't depend on lots of interpreter internals. |
| 9 // Do not include anything from src/interpreter other than | 9 // Do not include anything from src/interpreter other than |
| 10 // src/interpreter/bytecodes.h here! | 10 // src/interpreter/bytecodes.h here! |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class InterpreterAssembler; | 21 class InterpreterAssembler; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace interpreter { | 24 namespace interpreter { |
| 25 | 25 |
| 26 class Interpreter { | 26 class Interpreter { |
| 27 public: | 27 public: |
| 28 explicit Interpreter(Isolate* isolate); | 28 explicit Interpreter(Isolate* isolate); |
| 29 virtual ~Interpreter() {} | 29 virtual ~Interpreter() {} |
| 30 | 30 |
| 31 void Initialize(bool create_heap_objects); | 31 // Creates an uninitialized interpreter handler table, where each handler |
| 32 // points to the Illegal builtin. |
| 33 static Handle<FixedArray> CreateUninitializedInterpreterTable( |
| 34 Isolate* isolate); |
| 35 |
| 36 // Initializes the interpreter. |
| 37 void Initialize(); |
| 32 | 38 |
| 33 private: | 39 private: |
| 34 // Bytecode handler generator functions. | 40 // Bytecode handler generator functions. |
| 35 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ | 41 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ |
| 36 void Do##Name(compiler::InterpreterAssembler* assembler); | 42 void Do##Name(compiler::InterpreterAssembler* assembler); |
| 37 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) | 43 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) |
| 38 #undef DECLARE_BYTECODE_HANDLER_GENERATOR | 44 #undef DECLARE_BYTECODE_HANDLER_GENERATOR |
| 39 | 45 |
| 46 bool IsInterpreterTableInitialized(Handle<FixedArray> handler_table); |
| 47 |
| 40 Isolate* isolate_; | 48 Isolate* isolate_; |
| 41 | 49 |
| 42 DISALLOW_COPY_AND_ASSIGN(Interpreter); | 50 DISALLOW_COPY_AND_ASSIGN(Interpreter); |
| 43 }; | 51 }; |
| 44 | 52 |
| 45 } // namespace interpreter | 53 } // namespace interpreter |
| 46 } // namespace internal | 54 } // namespace internal |
| 47 } // namespace v8 | 55 } // namespace v8 |
| 48 | 56 |
| 49 #endif // V8_INTERPRETER_INTERPRETER_H_ | 57 #endif // V8_INTERPRETER_INTERPRETER_H_ |
| OLD | NEW |