OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 3884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3895 V8_INLINE static Proxy* Cast(Value* obj); | 3895 V8_INLINE static Proxy* Cast(Value* obj); |
3896 | 3896 |
3897 private: | 3897 private: |
3898 Proxy(); | 3898 Proxy(); |
3899 static void CheckCast(Value* obj); | 3899 static void CheckCast(Value* obj); |
3900 }; | 3900 }; |
3901 | 3901 |
3902 class V8_EXPORT WasmCompiledModule : public Object { | 3902 class V8_EXPORT WasmCompiledModule : public Object { |
3903 public: | 3903 public: |
3904 typedef std::pair<std::unique_ptr<const uint8_t[]>, size_t> SerializedModule; | 3904 typedef std::pair<std::unique_ptr<const uint8_t[]>, size_t> SerializedModule; |
3905 // Get the uncompiled bytes that were used to compile this module. | |
3906 Local<String> GetUncompiledBytes(); | |
3905 | 3907 |
3908 // Serialize the compiled module. The serialized data does not include the | |
3909 // uncompiled bytes. | |
3906 SerializedModule Serialize(); | 3910 SerializedModule Serialize(); |
3907 static MaybeLocal<WasmCompiledModule> Deserialize( | 3911 |
3908 Isolate* isolate, const SerializedModule& serialized_data); | 3912 // If possible, deserialize the module, otherwise compile it from the provided |
vogelheim
2016/10/06 10:00:50
This is an incompatible API change, and one of the
| |
3913 // uncompiled bytes. | |
3914 static MaybeLocal<WasmCompiledModule> DeserializeOrCompile( | |
3915 Isolate* isolate, const SerializedModule& serialized_data, | |
3916 Local<String> uncompiled_bytes); | |
3909 V8_INLINE static WasmCompiledModule* Cast(Value* obj); | 3917 V8_INLINE static WasmCompiledModule* Cast(Value* obj); |
3910 | 3918 |
3911 private: | 3919 private: |
3920 static MaybeLocal<WasmCompiledModule> Compile(Isolate* isolate, | |
3921 Local<String> bytes); | |
3912 WasmCompiledModule(); | 3922 WasmCompiledModule(); |
3913 static void CheckCast(Value* obj); | 3923 static void CheckCast(Value* obj); |
3914 }; | 3924 }; |
3915 | 3925 |
3916 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT | 3926 #ifndef V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT |
3917 // The number of required internal fields can be defined by embedder. | 3927 // The number of required internal fields can be defined by embedder. |
3918 #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2 | 3928 #define V8_ARRAY_BUFFER_INTERNAL_FIELD_COUNT 2 |
3919 #endif | 3929 #endif |
3920 | 3930 |
3921 | 3931 |
(...skipping 5729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9651 */ | 9661 */ |
9652 | 9662 |
9653 | 9663 |
9654 } // namespace v8 | 9664 } // namespace v8 |
9655 | 9665 |
9656 | 9666 |
9657 #undef TYPE_CHECK | 9667 #undef TYPE_CHECK |
9658 | 9668 |
9659 | 9669 |
9660 #endif // INCLUDE_V8_H_ | 9670 #endif // INCLUDE_V8_H_ |
OLD | NEW |