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

Unified Diff: src/wasm/wasm-module-builder.h

Issue 2406133003: [wasm] Decouple function name and exported name in WasmFunctionBuilder (Closed)
Patch Set: Change interface to Vector<const char>; avoids size_t/int confusion Created 4 years, 2 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/asmjs/asm-wasm-builder.cc ('k') | src/wasm/wasm-module-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module-builder.h
diff --git a/src/wasm/wasm-module-builder.h b/src/wasm/wasm-module-builder.h
index 057d6102f1fa026c1364b44e65717831ae667cb5..ed08923d35c70434c743d6e91d99cc770b467998 100644
--- a/src/wasm/wasm-module-builder.h
+++ b/src/wasm/wasm-module-builder.h
@@ -132,8 +132,9 @@ class V8_EXPORT_PRIVATE WasmFunctionBuilder : public ZoneObject {
void EmitWithU8U8(WasmOpcode opcode, const byte imm1, const byte imm2);
void EmitWithVarInt(WasmOpcode opcode, uint32_t immediate);
void EmitDirectCallIndex(uint32_t index);
- void SetExported();
- void SetName(const char* name, int name_length);
+ void Export();
+ void ExportAs(Vector<const char> name);
+ void SetName(Vector<const char> name);
void WriteSignature(ZoneBuffer& buffer) const;
void WriteExport(ZoneBuffer& buffer) const;
@@ -160,6 +161,7 @@ class V8_EXPORT_PRIVATE WasmFunctionBuilder : public ZoneObject {
uint32_t func_index_;
ZoneVector<uint8_t> body_;
ZoneVector<char> name_;
+ ZoneVector<char> exported_name_;
ZoneVector<uint32_t> i32_temps_;
ZoneVector<uint32_t> i64_temps_;
ZoneVector<uint32_t> f32_temps_;
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | src/wasm/wasm-module-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698