| 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 "src/api-natives.h" | 5 #include "src/api-natives.h" |
| 6 #include "src/api.h" | 6 #include "src/api.h" |
| 7 #include "src/asmjs/asm-js.h" | 7 #include "src/asmjs/asm-js.h" |
| 8 #include "src/asmjs/asm-typer.h" | 8 #include "src/asmjs/asm-typer.h" |
| 9 #include "src/asmjs/asm-wasm-builder.h" | 9 #include "src/asmjs/asm-wasm-builder.h" |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| 11 #include "src/ast/ast.h" | 11 #include "src/ast/ast.h" |
| 12 #include "src/execution.h" | 12 #include "src/execution.h" |
| 13 #include "src/factory.h" | 13 #include "src/factory.h" |
| 14 #include "src/handles.h" | 14 #include "src/handles.h" |
| 15 #include "src/isolate.h" | 15 #include "src/isolate.h" |
| 16 #include "src/objects.h" | 16 #include "src/objects.h" |
| 17 #include "src/parsing/parse-info.h" | 17 #include "src/parsing/parse-info.h" |
| 18 | 18 |
| 19 #include "src/wasm/module-decoder.h" | 19 #include "src/wasm/module-decoder.h" |
| 20 #include "src/wasm/wasm-js.h" | 20 #include "src/wasm/wasm-js.h" |
| 21 #include "src/wasm/wasm-limits.h" |
| 21 #include "src/wasm/wasm-module.h" | 22 #include "src/wasm/wasm-module.h" |
| 22 #include "src/wasm/wasm-objects.h" | 23 #include "src/wasm/wasm-objects.h" |
| 23 #include "src/wasm/wasm-result.h" | 24 #include "src/wasm/wasm-result.h" |
| 24 | 25 |
| 25 typedef uint8_t byte; | 26 typedef uint8_t byte; |
| 26 | 27 |
| 27 using v8::internal::wasm::ErrorThrower; | 28 using v8::internal::wasm::ErrorThrower; |
| 28 | 29 |
| 29 namespace v8 { | 30 namespace v8 { |
| 30 | 31 |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 if (has_maximum.IsNothing()) { | 309 if (has_maximum.IsNothing()) { |
| 309 // There has been an exception, just return. | 310 // There has been an exception, just return. |
| 310 return; | 311 return; |
| 311 } | 312 } |
| 312 if (has_maximum.FromJust()) { | 313 if (has_maximum.FromJust()) { |
| 313 if (!GetIntegerProperty(isolate, &thrower, context, descriptor, maximum_key, | 314 if (!GetIntegerProperty(isolate, &thrower, context, descriptor, maximum_key, |
| 314 &maximum, initial, max_table_size)) { | 315 &maximum, initial, max_table_size)) { |
| 315 return; | 316 return; |
| 316 } | 317 } |
| 317 } else { | 318 } else { |
| 318 maximum = static_cast<int>(i::wasm::WasmModule::kV8MaxTableSize); | 319 maximum = static_cast<int>(i::wasm::kV8MaxWasmTableSize); |
| 319 } | 320 } |
| 320 | 321 |
| 321 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 322 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 322 i::Handle<i::FixedArray> fixed_array; | 323 i::Handle<i::FixedArray> fixed_array; |
| 323 i::Handle<i::JSObject> table_obj = | 324 i::Handle<i::JSObject> table_obj = |
| 324 i::WasmTableObject::New(i_isolate, initial, maximum, &fixed_array); | 325 i::WasmTableObject::New(i_isolate, initial, maximum, &fixed_array); |
| 325 v8::ReturnValue<v8::Value> return_value = args.GetReturnValue(); | 326 v8::ReturnValue<v8::Value> return_value = args.GetReturnValue(); |
| 326 return_value.Set(Utils::ToLocal(table_obj)); | 327 return_value.Set(Utils::ToLocal(table_obj)); |
| 327 } | 328 } |
| 328 | 329 |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 i::Handle<i::Symbol> symbol(isolate->context()->wasm_memory_sym(), isolate); | 762 i::Handle<i::Symbol> symbol(isolate->context()->wasm_memory_sym(), isolate); |
| 762 return HasBrand(value, symbol); | 763 return HasBrand(value, symbol); |
| 763 } | 764 } |
| 764 | 765 |
| 765 bool WasmJs::IsWasmTableObject(Isolate* isolate, Handle<Object> value) { | 766 bool WasmJs::IsWasmTableObject(Isolate* isolate, Handle<Object> value) { |
| 766 i::Handle<i::Symbol> symbol(isolate->context()->wasm_table_sym(), isolate); | 767 i::Handle<i::Symbol> symbol(isolate->context()->wasm_table_sym(), isolate); |
| 767 return HasBrand(value, symbol); | 768 return HasBrand(value, symbol); |
| 768 } | 769 } |
| 769 } // namespace internal | 770 } // namespace internal |
| 770 } // namespace v8 | 771 } // namespace v8 |
| OLD | NEW |