OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_WASM_MODULE_H_ | 5 #ifndef V8_WASM_MODULE_H_ |
6 #define V8_WASM_MODULE_H_ | 6 #define V8_WASM_MODULE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/api.h" | 10 #include "src/api.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 kNameSectionCode = 12, // Name section (encoded as a string) | 55 kNameSectionCode = 12, // Name section (encoded as a string) |
56 }; | 56 }; |
57 | 57 |
58 inline bool IsValidSectionCode(uint8_t byte) { | 58 inline bool IsValidSectionCode(uint8_t byte) { |
59 return kTypeSectionCode <= byte && byte <= kDataSectionCode; | 59 return kTypeSectionCode <= byte && byte <= kDataSectionCode; |
60 } | 60 } |
61 | 61 |
62 const char* SectionName(WasmSectionCode code); | 62 const char* SectionName(WasmSectionCode code); |
63 | 63 |
64 // Constants for fixed-size elements within a module. | 64 // Constants for fixed-size elements within a module. |
65 static const uint32_t kMaxReturnCount = 1; | |
66 static const uint8_t kResizableMaximumFlag = 1; | 65 static const uint8_t kResizableMaximumFlag = 1; |
67 static const int32_t kInvalidFunctionIndex = -1; | 66 static const int32_t kInvalidFunctionIndex = -1; |
68 | 67 |
69 enum WasmExternalKind { | 68 enum WasmExternalKind { |
70 kExternalFunction = 0, | 69 kExternalFunction = 0, |
71 kExternalTable = 1, | 70 kExternalTable = 1, |
72 kExternalMemory = 2, | 71 kExternalMemory = 2, |
73 kExternalGlobal = 3 | 72 kExternalGlobal = 3 |
74 }; | 73 }; |
75 | 74 |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); | 447 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); |
449 void ValidateOrphanedInstance(Isolate* isolate, | 448 void ValidateOrphanedInstance(Isolate* isolate, |
450 Handle<WasmInstanceObject> instance); | 449 Handle<WasmInstanceObject> instance); |
451 | 450 |
452 } // namespace testing | 451 } // namespace testing |
453 } // namespace wasm | 452 } // namespace wasm |
454 } // namespace internal | 453 } // namespace internal |
455 } // namespace v8 | 454 } // namespace v8 |
456 | 455 |
457 #endif // V8_WASM_MODULE_H_ | 456 #endif // V8_WASM_MODULE_H_ |
OLD | NEW |