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

Unified Diff: src/wasm/encoder.cc

Issue 2165633006: [wasm] Remove special memory type for (internal) globals and use local type instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [wasm] Remove special memory type for (internal) globals and use local type instead. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/encoder.h ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/encoder.cc
diff --git a/src/wasm/encoder.cc b/src/wasm/encoder.cc
index ffd0294f6e78e793cec2848920d415368e19108c..ef0bddc836368f67f222bab432151af075f9351b 100644
--- a/src/wasm/encoder.cc
+++ b/src/wasm/encoder.cc
@@ -247,7 +247,7 @@ void WasmModuleBuilder::MarkStartFunction(uint32_t index) {
start_function_index_ = index;
}
-uint32_t WasmModuleBuilder::AddGlobal(MachineType type, bool exported) {
+uint32_t WasmModuleBuilder::AddGlobal(LocalType type, bool exported) {
globals_.push_back(std::make_pair(type, exported));
return static_cast<uint32_t>(globals_.size() - 1);
}
@@ -286,7 +286,7 @@ void WasmModuleBuilder::WriteTo(ZoneBuffer& buffer) const {
for (auto global : globals_) {
buffer.write_u32v(0); // Length of the global name.
- buffer.write_u8(WasmOpcodes::MemTypeCodeFor(global.first));
+ buffer.write_u8(WasmOpcodes::LocalTypeCodeFor(global.first));
buffer.write_u8(global.second);
}
FixupSection(buffer, start);
« no previous file with comments | « src/wasm/encoder.h ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698