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 #include <memory> | 5 #include <memory> |
6 | 6 |
7 #include "src/base/atomic-utils.h" | 7 #include "src/base/atomic-utils.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 | 9 |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1918 offset_tables_len); | 1918 offset_tables_len); |
1919 compiled_module->set_asm_js_offset_tables(offset_tables); | 1919 compiled_module->set_asm_js_offset_tables(offset_tables); |
1920 } | 1920 } |
1921 | 1921 |
1922 return WasmModuleObject::New(isolate, compiled_module); | 1922 return WasmModuleObject::New(isolate, compiled_module); |
1923 } | 1923 } |
1924 | 1924 |
1925 bool wasm::ValidateModuleBytes(Isolate* isolate, const byte* start, | 1925 bool wasm::ValidateModuleBytes(Isolate* isolate, const byte* start, |
1926 const byte* end, ErrorThrower* thrower, | 1926 const byte* end, ErrorThrower* thrower, |
1927 ModuleOrigin origin) { | 1927 ModuleOrigin origin) { |
1928 ModuleResult result = DecodeWasmModule(isolate, start, end, false, origin); | 1928 ModuleResult result = DecodeWasmModule(isolate, start, end, true, origin); |
1929 if (result.val) { | 1929 if (result.val) { |
1930 delete result.val; | 1930 delete result.val; |
1931 } else { | 1931 } else { |
1932 DCHECK(!result.ok()); | 1932 DCHECK(!result.ok()); |
1933 } | 1933 } |
1934 return result.ok(); | 1934 return result.ok(); |
1935 } | 1935 } |
1936 | 1936 |
1937 MaybeHandle<JSArrayBuffer> wasm::GetInstanceMemory(Isolate* isolate, | 1937 MaybeHandle<JSArrayBuffer> wasm::GetInstanceMemory(Isolate* isolate, |
1938 Handle<JSObject> object) { | 1938 Handle<JSObject> object) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2102 CHECK_NOT_NULL(result.val); | 2102 CHECK_NOT_NULL(result.val); |
2103 module = const_cast<WasmModule*>(result.val); | 2103 module = const_cast<WasmModule*>(result.val); |
2104 } | 2104 } |
2105 | 2105 |
2106 Handle<WasmModuleWrapper> module_wrapper = | 2106 Handle<WasmModuleWrapper> module_wrapper = |
2107 WasmModuleWrapper::New(isolate, module); | 2107 WasmModuleWrapper::New(isolate, module); |
2108 | 2108 |
2109 compiled_module->set_module_wrapper(module_wrapper); | 2109 compiled_module->set_module_wrapper(module_wrapper); |
2110 DCHECK(WasmCompiledModule::IsWasmCompiledModule(*compiled_module)); | 2110 DCHECK(WasmCompiledModule::IsWasmCompiledModule(*compiled_module)); |
2111 } | 2111 } |
OLD | NEW |