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/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
8 #include "src/base/adapters.h" | 8 #include "src/base/adapters.h" |
9 #include "src/base/atomic-utils.h" | 9 #include "src/base/atomic-utils.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1943 weak_exported_functions->set(export_index, *weak_export); | 1943 weak_exported_functions->set(export_index, *weak_export); |
1944 break; | 1944 break; |
1945 } | 1945 } |
1946 case kExternalTable: { | 1946 case kExternalTable: { |
1947 // Export a table as a WebAssembly.Table object. | 1947 // Export a table as a WebAssembly.Table object. |
1948 TableInstance& table_instance = table_instances_[exp.index]; | 1948 TableInstance& table_instance = table_instances_[exp.index]; |
1949 WasmIndirectFunctionTable& table = | 1949 WasmIndirectFunctionTable& table = |
1950 module_->function_tables[exp.index]; | 1950 module_->function_tables[exp.index]; |
1951 if (table_instance.table_object.is_null()) { | 1951 if (table_instance.table_object.is_null()) { |
1952 uint32_t maximum = | 1952 uint32_t maximum = |
1953 table.has_max ? table.max_size : kV8MaxWasmTableSize; | 1953 table.has_max ? table.max_size : FLAG_wasm_max_table_size; |
1954 table_instance.table_object = WasmTableObject::New( | 1954 table_instance.table_object = WasmTableObject::New( |
1955 isolate_, table.min_size, maximum, &table_instance.js_wrappers); | 1955 isolate_, table.min_size, maximum, &table_instance.js_wrappers); |
1956 } | 1956 } |
1957 desc.set_value(table_instance.table_object); | 1957 desc.set_value(table_instance.table_object); |
1958 break; | 1958 break; |
1959 } | 1959 } |
1960 case kExternalMemory: { | 1960 case kExternalMemory: { |
1961 // Export the memory as a WebAssembly.Memory object. | 1961 // Export the memory as a WebAssembly.Memory object. |
1962 Handle<WasmMemoryObject> memory_object; | 1962 Handle<WasmMemoryObject> memory_object; |
1963 if (!instance->has_memory_object()) { | 1963 if (!instance->has_memory_object()) { |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 | 2642 |
2643 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(), | 2643 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(), |
2644 NONE); | 2644 NONE); |
2645 JSObject::AddProperty(entry, kind_string, export_kind, NONE); | 2645 JSObject::AddProperty(entry, kind_string, export_kind, NONE); |
2646 | 2646 |
2647 storage->set(index, *entry); | 2647 storage->set(index, *entry); |
2648 } | 2648 } |
2649 | 2649 |
2650 return array_object; | 2650 return array_object; |
2651 } | 2651 } |
OLD | NEW |