| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 // Allows an entropy source to be provided for use in random number | 92 // Allows an entropy source to be provided for use in random number |
| 93 // generation. | 93 // generation. |
| 94 static void SetEntropySource(EntropySource source); | 94 static void SetEntropySource(EntropySource source); |
| 95 // Support for return-address rewriting profilers. | 95 // Support for return-address rewriting profilers. |
| 96 static void SetReturnAddressLocationResolver( | 96 static void SetReturnAddressLocationResolver( |
| 97 ReturnAddressLocationResolver resolver); | 97 ReturnAddressLocationResolver resolver); |
| 98 // Support for entry hooking JITed code. | 98 // Support for entry hooking JITed code. |
| 99 static void SetFunctionEntryHook(FunctionEntryHook entry_hook); | 99 static void SetFunctionEntryHook(FunctionEntryHook entry_hook); |
| 100 | 100 |
| 101 static void AddCallCompletedCallback(CallCompletedCallback callback); | |
| 102 static void RemoveCallCompletedCallback(CallCompletedCallback callback); | |
| 103 static void FireCallCompletedCallback(Isolate* isolate); | |
| 104 | |
| 105 static void RunMicrotasks(Isolate* isolate); | 101 static void RunMicrotasks(Isolate* isolate); |
| 106 | 102 |
| 107 static v8::ArrayBuffer::Allocator* ArrayBufferAllocator() { | 103 static v8::ArrayBuffer::Allocator* ArrayBufferAllocator() { |
| 108 return array_buffer_allocator_; | 104 return array_buffer_allocator_; |
| 109 } | 105 } |
| 110 | 106 |
| 111 static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) { | 107 static void SetArrayBufferAllocator(v8::ArrayBuffer::Allocator *allocator) { |
| 112 CHECK_EQ(NULL, array_buffer_allocator_); | 108 CHECK_EQ(NULL, array_buffer_allocator_); |
| 113 array_buffer_allocator_ = allocator; | 109 array_buffer_allocator_ = allocator; |
| 114 } | 110 } |
| 115 | 111 |
| 116 static void InitializePlatform(v8::Platform* platform); | 112 static void InitializePlatform(v8::Platform* platform); |
| 117 static void ShutdownPlatform(); | 113 static void ShutdownPlatform(); |
| 118 static v8::Platform* GetCurrentPlatform(); | 114 static v8::Platform* GetCurrentPlatform(); |
| 119 | 115 |
| 120 private: | 116 private: |
| 121 static void InitializeOncePerProcessImpl(); | 117 static void InitializeOncePerProcessImpl(); |
| 122 static void InitializeOncePerProcess(); | 118 static void InitializeOncePerProcess(); |
| 123 | 119 |
| 124 // List of callbacks when a Call completes. | |
| 125 static List<CallCompletedCallback>* call_completed_callbacks_; | |
| 126 // Allocator for external array buffers. | 120 // Allocator for external array buffers. |
| 127 static v8::ArrayBuffer::Allocator* array_buffer_allocator_; | 121 static v8::ArrayBuffer::Allocator* array_buffer_allocator_; |
| 128 // v8::Platform to use. | 122 // v8::Platform to use. |
| 129 static v8::Platform* platform_; | 123 static v8::Platform* platform_; |
| 130 }; | 124 }; |
| 131 | 125 |
| 132 | 126 |
| 133 // JavaScript defines two kinds of 'nil'. | 127 // JavaScript defines two kinds of 'nil'. |
| 134 enum NilValue { kNullValue, kUndefinedValue }; | 128 enum NilValue { kNullValue, kUndefinedValue }; |
| 135 | 129 |
| 136 | 130 |
| 137 } } // namespace v8::internal | 131 } } // namespace v8::internal |
| 138 | 132 |
| 139 #endif // V8_V8_H_ | 133 #endif // V8_V8_H_ |
| OLD | NEW |