OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 namespace v8 { |
| 6 namespace internal { |
| 7 |
| 8 class Builtins; |
| 9 class Code; |
| 10 class Isolate; |
| 11 |
| 12 namespace interpreter { |
| 13 class Interpreter; |
| 14 } // namespace interpreter |
| 15 |
| 16 // This class is an abstraction layer around initialization of components |
| 17 // that are either deserialized from the snapshot or generated from scratch. |
| 18 // Currently this includes builtins and interpreter bytecode handlers. |
| 19 // There are three implementations to choose from (at link time): |
| 20 // - setup-isolate-deserialize.cc: always loads things from snapshot. |
| 21 // - setup-isolate-full.cc: always generates things. |
| 22 // - setup-isolate-for-tests.cc: does the one or the other, controlled by |
| 23 // the |create_heap_objects| flag. |
| 24 // |
| 25 // The actual implementations of generation of builtins and handlers is in |
| 26 // setup-builtins-internal.cc and setup-interpreter-internal.cc, and is |
| 27 // linked in by the latter two Delegate implementations. |
| 28 class SetupIsolateDelegate { |
| 29 public: |
| 30 SetupIsolateDelegate() {} |
| 31 virtual ~SetupIsolateDelegate() {} |
| 32 |
| 33 virtual void SetupBuiltins(Isolate* isolate, bool create_heap_objects); |
| 34 |
| 35 virtual void SetupInterpreter(interpreter::Interpreter* interpreter, |
| 36 bool create_heap_objects); |
| 37 |
| 38 protected: |
| 39 static void SetupBuiltinsInternal(Isolate* isolate); |
| 40 static void AddBuiltin(Builtins* builtins, int index, Code* code); |
| 41 }; |
| 42 |
| 43 } // namespace internal |
| 44 } // namespace v8 |
OLD | NEW |