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

Unified Diff: src/wasm/wasm-module.cc

Issue 2381843002: Add Smi::Zero and replace all Smi::FromInt(0) calls (Closed)
Patch Set: Mark Smi::kZero as V8_EXPORT_PRIVATE 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/type-feedback-vector.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index 1e6d8e6f2d88743db41d683e4831d45909aea6ba..76287ac6a2e607cf98966dd5a7589f28a7fa6717 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -882,7 +882,7 @@ WasmModule::WasmModule(byte* module_start)
void EncodeInit(const WasmModule* module, Factory* factory,
Handle<FixedArray> entry, int kind_index, int value_index,
const WasmInitExpr& expr) {
- entry->set(kind_index, Smi::FromInt(0));
+ entry->set(kind_index, Smi::kZero);
Handle<Object> value;
switch (expr.kind) {
@@ -1119,7 +1119,7 @@ MaybeHandle<WasmCompiledModule> WasmModule::CompileFunctions(
HandleScope scope(isolate);
Handle<FixedArray> startup_data =
factory->NewFixedArray(kWasmExportDataSize, TENURED);
- startup_data->set(kExportArity, Smi::FromInt(0));
+ startup_data->set(kExportArity, Smi::kZero);
startup_data->set(kExportIndex, Smi::FromInt(start_function_index));
ret->set_startup_function(startup_data);
}
« no previous file with comments | « src/type-feedback-vector.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698