| Index: src/builtins/setup-builtins.h
|
| diff --git a/src/builtins/setup-builtins.h b/src/builtins/setup-builtins.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..885a5cf7e2196bddcf29cdd492d51b152e9cb940
|
| --- /dev/null
|
| +++ b/src/builtins/setup-builtins.h
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2017 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +namespace v8 {
|
| +namespace internal {
|
| +
|
| +class Builtins;
|
| +class Code;
|
| +class Isolate;
|
| +
|
| +// This class is an abstraction layer around generation of compiled builtins.
|
| +// There are three implementations to choose from (at link time):
|
| +// - setup-builtins-deserialize.cc: always loads builtins from snapshot.
|
| +// - setup-builtins-full.cc: always generates builtins.
|
| +// - setup-builtins-for-tests.cc: does the one or the other, controlled by
|
| +// the |create_heap_objects| flag.
|
| +// The actual implementation of builtins generation is in
|
| +// setup-builtins-internal.cc, and is linked in by the latter two.
|
| +class SetupBuiltinsDelegate {
|
| + public:
|
| + SetupBuiltinsDelegate() {}
|
| + virtual ~SetupBuiltinsDelegate() {}
|
| +
|
| + virtual void SetupBuiltins(Isolate* isolate, bool create_heap_objects);
|
| +
|
| + protected:
|
| + static void SetupBuiltinsInternal(Isolate* isolate);
|
| + static void AddBuiltin(Builtins* builtins, int index, Code* code);
|
| +};
|
| +
|
| +} // namespace internal
|
| +} // namespace v8
|
|
|