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

Unified Diff: src/wasm/asm-wasm-builder.cc

Issue 1760363003: Revert of [wasm] Update {i32,i64}.const to use signed leb128 (Closed) Base URL: http://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | src/wasm/ast-decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/asm-wasm-builder.cc
diff --git a/src/wasm/asm-wasm-builder.cc b/src/wasm/asm-wasm-builder.cc
index 5be074acdfe98c3e61e2670ff49e84a30b42aa85..0bca2cfdaa50c562827c2d1d20201f0ed2d265ae 100644
--- a/src/wasm/asm-wasm-builder.cc
+++ b/src/wasm/asm-wasm-builder.cc
@@ -237,8 +237,7 @@
void SetLocalTo(uint16_t index, int value) {
current_function_builder_->Emit(kExprSetLocal);
AddLeb128(index, true);
- // TODO(bradnelson): variable size
- byte code[] = {WASM_I32V(value)};
+ byte code[] = {WASM_I32(value)};
current_function_builder_->EmitCode(code, sizeof(code));
block_size_++;
}
@@ -466,8 +465,7 @@
switch (type) {
case kAstI32: {
int val = static_cast<int>(expr->raw_value()->AsNumber());
- // TODO(bradnelson): variable size
- byte code[] = {WASM_I32V(val)};
+ byte code[] = {WASM_I32(val)};
current_function_builder_->EmitCode(code, sizeof(code));
break;
}
@@ -744,8 +742,7 @@
Handle<Object> nvalue = maybe_nvalue.ToHandleChecked();
if (nvalue->IsNumber()) {
int32_t val = static_cast<int32_t>(nvalue->Number());
- // TODO(bradnelson): variable size
- byte code[] = {WASM_I32V(val)};
+ byte code[] = {WASM_I32(val)};
current_function_builder_->EmitCode(code, sizeof(code));
return;
}
@@ -757,7 +754,7 @@
byte code[] = {WASM_F64(std::numeric_limits<double>::quiet_NaN())};
current_function_builder_->EmitCode(code, sizeof(code));
} else {
- byte code[] = {WASM_I32V_1(0)};
+ byte code[] = {WASM_I32(0)};
current_function_builder_->EmitCode(code, sizeof(code));
}
}
@@ -815,8 +812,7 @@
DCHECK(value->raw_value()->IsNumber());
DCHECK_EQ(kAstI32, TypeOf(value));
int val = static_cast<int>(value->raw_value()->AsNumber());
- // TODO(bradnelson): variable size
- byte code[] = {WASM_I32V(val * size)};
+ byte code[] = {WASM_I32(val * size)};
current_function_builder_->EmitCode(code, sizeof(code));
return;
}
@@ -1061,8 +1057,7 @@
current_function_builder_->EmitWithU8(kExprCallIndirect,
indices->signature_index);
current_function_builder_->Emit(kExprI32Add);
- // TODO(bradnelson): variable size
- byte code[] = {WASM_I32V(indices->start_index)};
+ byte code[] = {WASM_I32(indices->start_index)};
current_function_builder_->EmitCode(code, sizeof(code));
RECURSE(Visit(p->key()));
break;
« no previous file with comments | « no previous file | src/wasm/ast-decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698