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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // Allows an entropy source to be provided for use in random number | 63 // Allows an entropy source to be provided for use in random number |
64 // generation. | 64 // generation. |
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 v8::ArrayBuffer::Allocator* ArrayBufferAllocator() { | |
73 return array_buffer_allocator_; | |
74 } | |
75 | |
76 static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) { | |
77 CHECK_NULL(array_buffer_allocator_); | |
78 array_buffer_allocator_ = allocator; | |
79 } | |
80 | |
81 static void InitializePlatform(v8::Platform* platform); | 72 static void InitializePlatform(v8::Platform* platform); |
82 static void ShutdownPlatform(); | 73 static void ShutdownPlatform(); |
83 static v8::Platform* GetCurrentPlatform(); | 74 static v8::Platform* GetCurrentPlatform(); |
84 | 75 |
85 static void SetNativesBlob(StartupData* natives_blob); | 76 static void SetNativesBlob(StartupData* natives_blob); |
86 static void SetSnapshotBlob(StartupData* snapshot_blob); | 77 static void SetSnapshotBlob(StartupData* snapshot_blob); |
87 | 78 |
88 private: | 79 private: |
89 static void InitializeOncePerProcessImpl(); | 80 static void InitializeOncePerProcessImpl(); |
90 static void InitializeOncePerProcess(); | 81 static void InitializeOncePerProcess(); |
91 | 82 |
92 // Allocator for external array buffers. | |
93 static v8::ArrayBuffer::Allocator* array_buffer_allocator_; | |
94 // v8::Platform to use. | 83 // v8::Platform to use. |
95 static v8::Platform* platform_; | 84 static v8::Platform* platform_; |
96 }; | 85 }; |
97 | 86 |
98 | 87 |
99 // JavaScript defines two kinds of 'nil'. | 88 // JavaScript defines two kinds of 'nil'. |
100 enum NilValue { kNullValue, kUndefinedValue }; | 89 enum NilValue { kNullValue, kUndefinedValue }; |
101 | 90 |
102 | 91 |
103 } } // namespace v8::internal | 92 } } // namespace v8::internal |
104 | 93 |
105 #endif // V8_V8_H_ | 94 #endif // V8_V8_H_ |
OLD | NEW |