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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 static v8::ArrayBuffer::Allocator* ArrayBufferAllocator() { | 72 static v8::ArrayBuffer::Allocator* ArrayBufferAllocator() { |
73 return array_buffer_allocator_; | 73 return array_buffer_allocator_; |
74 } | 74 } |
75 | 75 |
76 static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) { | 76 static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) { |
77 CHECK_NULL(array_buffer_allocator_); | 77 CHECK_NULL(array_buffer_allocator_); |
78 array_buffer_allocator_ = allocator; | 78 array_buffer_allocator_ = allocator; |
79 } | 79 } |
80 | 80 |
| 81 static v8::SharedArrayBuffer::Allocator* SharedArrayBufferAllocator() { |
| 82 return shared_array_buffer_allocator_; |
| 83 } |
| 84 |
| 85 static void SetSharedArrayBufferAllocator( |
| 86 v8::SharedArrayBuffer::Allocator* allocator) { |
| 87 CHECK_NULL(shared_array_buffer_allocator_); |
| 88 shared_array_buffer_allocator_ = allocator; |
| 89 } |
| 90 |
81 static void InitializePlatform(v8::Platform* platform); | 91 static void InitializePlatform(v8::Platform* platform); |
82 static void ShutdownPlatform(); | 92 static void ShutdownPlatform(); |
83 static v8::Platform* GetCurrentPlatform(); | 93 static v8::Platform* GetCurrentPlatform(); |
84 | 94 |
85 static void SetNativesBlob(StartupData* natives_blob); | 95 static void SetNativesBlob(StartupData* natives_blob); |
86 static void SetSnapshotBlob(StartupData* snapshot_blob); | 96 static void SetSnapshotBlob(StartupData* snapshot_blob); |
87 | 97 |
88 private: | 98 private: |
89 static void InitializeOncePerProcessImpl(); | 99 static void InitializeOncePerProcessImpl(); |
90 static void InitializeOncePerProcess(); | 100 static void InitializeOncePerProcess(); |
91 | 101 |
92 // Allocator for external array buffers. | 102 // Allocator for external array buffers. |
93 static v8::ArrayBuffer::Allocator* array_buffer_allocator_; | 103 static v8::ArrayBuffer::Allocator* array_buffer_allocator_; |
| 104 // Allocator for external shared array buffers. |
| 105 static v8::SharedArrayBuffer::Allocator* shared_array_buffer_allocator_; |
94 // v8::Platform to use. | 106 // v8::Platform to use. |
95 static v8::Platform* platform_; | 107 static v8::Platform* platform_; |
96 }; | 108 }; |
97 | 109 |
98 | 110 |
99 // JavaScript defines two kinds of 'nil'. | 111 // JavaScript defines two kinds of 'nil'. |
100 enum NilValue { kNullValue, kUndefinedValue }; | 112 enum NilValue { kNullValue, kUndefinedValue }; |
101 | 113 |
102 | 114 |
103 } } // namespace v8::internal | 115 } } // namespace v8::internal |
104 | 116 |
105 #endif // V8_V8_H_ | 117 #endif // V8_V8_H_ |
OLD | NEW |