OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 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 | 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 // | 5 // |
6 // Top include for all V8 .cc files. | 6 // Top include for all V8 .cc files. |
7 // | 7 // |
8 | 8 |
9 #ifndef V8_V8_H_ | 9 #ifndef V8_V8_H_ |
10 #define V8_V8_H_ | 10 #define V8_V8_H_ |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 static void SetEntropySource(EntropySource source); | 65 static void SetEntropySource(EntropySource source); |
66 // Support for return-address rewriting profilers. | 66 // Support for return-address rewriting profilers. |
67 static void SetReturnAddressLocationResolver( | 67 static void SetReturnAddressLocationResolver( |
68 ReturnAddressLocationResolver resolver); | 68 ReturnAddressLocationResolver resolver); |
69 // Support for entry hooking JITed code. | 69 // Support for entry hooking JITed code. |
70 static void SetFunctionEntryHook(FunctionEntryHook entry_hook); | 70 static void SetFunctionEntryHook(FunctionEntryHook entry_hook); |
71 | 71 |
72 static void InitializePlatform(v8::Platform* platform); | 72 static void InitializePlatform(v8::Platform* platform); |
73 static void ShutdownPlatform(); | 73 static void ShutdownPlatform(); |
74 static v8::Platform* GetCurrentPlatform(); | 74 static v8::Platform* GetCurrentPlatform(); |
| 75 // Replaces the current platform with the given platform. |
| 76 // Should be used only for testing. |
| 77 static void SetPlatformForTesting(v8::Platform* platform); |
75 | 78 |
76 static void SetNativesBlob(StartupData* natives_blob); | 79 static void SetNativesBlob(StartupData* natives_blob); |
77 static void SetSnapshotBlob(StartupData* snapshot_blob); | 80 static void SetSnapshotBlob(StartupData* snapshot_blob); |
78 | 81 |
79 private: | 82 private: |
80 static void InitializeOncePerProcessImpl(); | 83 static void InitializeOncePerProcessImpl(); |
81 static void InitializeOncePerProcess(); | 84 static void InitializeOncePerProcess(); |
82 | 85 |
83 // v8::Platform to use. | 86 // v8::Platform to use. |
84 static v8::Platform* platform_; | 87 static v8::Platform* platform_; |
85 }; | 88 }; |
86 | 89 |
87 | 90 |
88 // JavaScript defines two kinds of 'nil'. | 91 // JavaScript defines two kinds of 'nil'. |
89 enum NilValue { kNullValue, kUndefinedValue }; | 92 enum NilValue { kNullValue, kUndefinedValue }; |
90 | 93 |
91 | 94 |
92 } } // namespace v8::internal | 95 } } // namespace v8::internal |
93 | 96 |
94 #endif // V8_V8_H_ | 97 #endif // V8_V8_H_ |
OLD | NEW |