1 // Copyright 2011 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.
8 #include "include/v8.h"
9 #include "src/allocation.h"
14 class V8 : public AllStatic {
18 static bool Initialize();
19 static void TearDown();
21 // Report process out of memory. Implementation found in api.cc.
22 // This function will not return, but will terminate the execution.
23 static void FatalProcessOutOfMemory(const char* location,
24 bool take_snapshot = false);
26 static void InitializePlatform(v8::Platform* platform);
27 static void ShutdownPlatform();
28 static v8::Platform* GetCurrentPlatform();
29 // Replaces the current platform with the given platform.
30 // Should be used only for testing.
31 static void SetPlatformForTesting(v8::Platform* platform);
33 static void SetNativesBlob(StartupData* natives_blob);
34 static void SetSnapshotBlob(StartupData* snapshot_blob);
37 static void InitializeOncePerProcessImpl();
38 static void InitializeOncePerProcess();
40 // v8::Platform to use.
41 static v8::Platform* platform_;
44 } } // namespace v8::internal