Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: src/wasm/wasm-module.cc

Issue 2640823002: [wasm] LinkError on imported i64 global (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 "memory import %d has larger maximum than maximum %u, got %d", 1755 "memory import %d has larger maximum than maximum %u, got %d",
1756 index, module_->max_mem_pages, imported_max_pages); 1756 index, module_->max_mem_pages, imported_max_pages);
1757 return -1; 1757 return -1;
1758 } 1758 }
1759 } 1759 }
1760 break; 1760 break;
1761 } 1761 }
1762 case kExternalGlobal: { 1762 case kExternalGlobal: {
1763 // Global imports are converted to numbers and written into the 1763 // Global imports are converted to numbers and written into the
1764 // {globals_} array buffer. 1764 // {globals_} array buffer.
1765 if (module_->globals[import.index].type == kWasmI64) {
1766 ReportLinkError("global import cannot have type i64", index,
1767 module_name, import_name);
1768 return -1;
1769 }
1765 if (!value->IsNumber()) { 1770 if (!value->IsNumber()) {
1766 ReportLinkError("global import must be a number", index, 1771 ReportLinkError("global import must be a number", index,
1767 module_name, import_name); 1772 module_name, import_name);
1768 return -1; 1773 return -1;
1769 } 1774 }
1770 WriteGlobalValue(module_->globals[import.index], value); 1775 WriteGlobalValue(module_->globals[import.index], value);
1771 break; 1776 break;
1772 } 1777 }
1773 default: 1778 default:
1774 UNREACHABLE(); 1779 UNREACHABLE();
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
2621 2626
2622 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(), 2627 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(),
2623 NONE); 2628 NONE);
2624 JSObject::AddProperty(entry, kind_string, export_kind, NONE); 2629 JSObject::AddProperty(entry, kind_string, export_kind, NONE);
2625 2630
2626 storage->set(index, *entry); 2631 storage->set(index, *entry);
2627 } 2632 }
2628 2633
2629 return array_object; 2634 return array_object;
2630 } 2635 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698