| 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 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1826           break; | 1826           break; | 
| 1827         } | 1827         } | 
| 1828         case kExternalGlobal: { | 1828         case kExternalGlobal: { | 
| 1829           // Global imports are converted to numbers and written into the | 1829           // Global imports are converted to numbers and written into the | 
| 1830           // {globals_} array buffer. | 1830           // {globals_} array buffer. | 
| 1831           if (module_->globals[import.index].type == kWasmI64) { | 1831           if (module_->globals[import.index].type == kWasmI64) { | 
| 1832             ReportLinkError("global import cannot have type i64", index, | 1832             ReportLinkError("global import cannot have type i64", index, | 
| 1833                             module_name, import_name); | 1833                             module_name, import_name); | 
| 1834             return -1; | 1834             return -1; | 
| 1835           } | 1835           } | 
| 1836           if (FLAG_fast_validate_asm) { | 1836           if (module_->is_asm_js() && FLAG_fast_validate_asm) { | 
| 1837             if (module_->globals[import.index].type == kWasmI32) { | 1837             if (module_->globals[import.index].type == kWasmI32) { | 
| 1838               value = Object::ToInt32(isolate_, value).ToHandleChecked(); | 1838               value = Object::ToInt32(isolate_, value).ToHandleChecked(); | 
| 1839             } else { | 1839             } else { | 
| 1840               value = Object::ToNumber(value).ToHandleChecked(); | 1840               value = Object::ToNumber(value).ToHandleChecked(); | 
| 1841             } | 1841             } | 
| 1842           } | 1842           } | 
| 1843           if (!value->IsNumber()) { | 1843           if (!value->IsNumber()) { | 
| 1844             ReportLinkError("global import must be a number", index, | 1844             ReportLinkError("global import must be a number", index, | 
| 1845                             module_name, import_name); | 1845                             module_name, import_name); | 
| 1846             return -1; | 1846             return -1; | 
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3209                                      callee_compiled->instruction_start()); | 3209                                      callee_compiled->instruction_start()); | 
| 3210     } | 3210     } | 
| 3211     DCHECK_EQ(non_compiled_functions.size(), idx); | 3211     DCHECK_EQ(non_compiled_functions.size(), idx); | 
| 3212   } | 3212   } | 
| 3213 | 3213 | 
| 3214   Code* ret = | 3214   Code* ret = | 
| 3215       Code::cast(compiled_module->code_table()->get(func_to_return_idx)); | 3215       Code::cast(compiled_module->code_table()->get(func_to_return_idx)); | 
| 3216   DCHECK_EQ(Code::WASM_FUNCTION, ret->kind()); | 3216   DCHECK_EQ(Code::WASM_FUNCTION, ret->kind()); | 
| 3217   return handle(ret, isolate); | 3217   return handle(ret, isolate); | 
| 3218 } | 3218 } | 
| OLD | NEW | 
|---|