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

Unified Diff: src/wasm/encoder.h

Issue 1583603002: Add __init__ function to all modules created in asm-to-wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@refactor
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | src/wasm/encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/encoder.h
diff --git a/src/wasm/encoder.h b/src/wasm/encoder.h
index ba72ae1d9b90ce842e7dae995252f53ec831d36d..f0fabe998a0df7d6b8e07a78868c0ef8ab118055 100644
--- a/src/wasm/encoder.h
+++ b/src/wasm/encoder.h
@@ -65,10 +65,11 @@ class WasmFunctionBuilder : public ZoneObject {
void EditImmediate(uint32_t offset, const byte immediate);
void Exported(uint8_t flag);
void External(uint8_t flag);
+ void SetName(const unsigned char* name, int name_length);
WasmFunctionEncoder* Build(Zone* zone, WasmModuleBuilder* mb) const;
private:
- WasmFunctionBuilder(Zone* zone, const unsigned char* name, int name_length);
+ explicit WasmFunctionBuilder(Zone* zone);
friend class WasmModuleBuilder;
LocalType return_type_;
struct Type;
@@ -125,8 +126,7 @@ class WasmModuleWriter : public ZoneObject {
class WasmModuleBuilder : public ZoneObject {
public:
explicit WasmModuleBuilder(Zone* zone);
- uint16_t AddFunction(const unsigned char* name = nullptr,
- int name_length = 0);
+ uint16_t AddFunction();
uint32_t AddGlobal(MachineType type, bool exported);
WasmFunctionBuilder* FunctionAt(size_t index);
void AddDataSegment(WasmDataSegmentEncoder* data);
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | src/wasm/encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698