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 // This class is an abstraction layer around generation of compiled builtins. |
| 13 // There are three implementations to choose from (at link time): |
| 14 // - setup-builtins-deserialize.cc: always loads builtins from snapshot. |
| 15 // - setup-builtins-full.cc: always generates builtins. |
| 16 // - setup-builtins-for-tests.cc: does the one or the other, controlled by |
| 17 // the |create_heap_objects| flag. |
| 18 // The actual implementation of builtins generation is in |
| 19 // setup-builtins-internal.cc, and is linked in by the latter two. |
| 20 class SetupBuiltinsDelegate { |
| 21 public: |
| 22 SetupBuiltinsDelegate() {} |
| 23 virtual ~SetupBuiltinsDelegate() {} |
| 24 |
| 25 virtual void SetupBuiltins(Isolate* isolate, bool create_heap_objects); |
| 26 |
| 27 protected: |
| 28 static void SetupBuiltinsInternal(Isolate* isolate); |
| 29 static void AddBuiltin(Builtins* builtins, int index, Code* code); |
| 30 }; |
| 31 |
| 32 } // namespace internal |
| 33 } // namespace v8 |
OLD | NEW |