Index: src/asmjs/asm-wasm-builder.cc |
diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc |
index 133793821ebdbb3faa0336896bae59382dcda93e..e15c6e7208dff6970e5e7bbd50c83aef121700ef 100644 |
--- a/src/asmjs/asm-wasm-builder.cc |
+++ b/src/asmjs/asm-wasm-builder.cc |
@@ -105,7 +105,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
foreign_init_function_->EmitGetLocal(static_cast<uint32_t>(pos)); |
ForeignVariable* fv = &foreign_variables_[pos]; |
uint32_t index = LookupOrInsertGlobal(fv->var, fv->type); |
- foreign_init_function_->EmitWithVarInt(kExprSetGlobal, index); |
+ foreign_init_function_->EmitWithVarUint(kExprSetGlobal, index); |
} |
foreign_init_function_->Emit(kExprEnd); |
} |
@@ -318,7 +318,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
auto elem = breakable_blocks_.at(i); |
if (elem.first == target && elem.second == type) { |
int block_distance = static_cast<int>(breakable_blocks_.size() - i - 1); |
- current_function_builder_->EmitWithVarInt(kExprBr, block_distance); |
+ current_function_builder_->EmitWithVarUint(kExprBr, block_distance); |
return; |
} |
} |
@@ -389,8 +389,8 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
current_function_builder_->EmitWithU8(kExprIf, kLocalVoid); |
DCHECK(case_to_block.find(node->begin) != case_to_block.end()); |
current_function_builder_->Emit(kExprBr); |
- current_function_builder_->EmitVarInt(1 + if_depth + |
- case_to_block[node->begin]); |
+ current_function_builder_->EmitVarUint(1 + if_depth + |
+ case_to_block[node->begin]); |
current_function_builder_->Emit(kExprEnd); |
} else { |
if (node->begin != 0) { |
@@ -401,21 +401,21 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
VisitVariableProxy(tag); |
} |
current_function_builder_->Emit(kExprBrTable); |
- current_function_builder_->EmitVarInt(node->end - node->begin + 1); |
+ current_function_builder_->EmitVarUint(node->end - node->begin + 1); |
for (int v = node->begin; v <= node->end; ++v) { |
if (case_to_block.find(v) != case_to_block.end()) { |
uint32_t target = if_depth + case_to_block[v]; |
- current_function_builder_->EmitVarInt(target); |
+ current_function_builder_->EmitVarUint(target); |
} else { |
uint32_t target = if_depth + default_block; |
- current_function_builder_->EmitVarInt(target); |
+ current_function_builder_->EmitVarUint(target); |
} |
if (v == kMaxInt) { |
break; |
} |
} |
uint32_t target = if_depth + default_block; |
- current_function_builder_->EmitVarInt(target); |
+ current_function_builder_->EmitVarUint(target); |
} |
while (if_depth-- != prev_if_depth) { |
@@ -463,7 +463,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
if (root->left != nullptr || root->right != nullptr || |
root->begin == root->end) { |
current_function_builder_->Emit(kExprBr); |
- current_function_builder_->EmitVarInt(default_block); |
+ current_function_builder_->EmitVarUint(default_block); |
} |
} |
for (int i = 0; i < case_count; ++i) { |
@@ -657,7 +657,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
ValueType var_type = TypeOf(expr); |
DCHECK_NE(kWasmStmt, var_type); |
if (var->IsContextSlot()) { |
- current_function_builder_->EmitWithVarInt( |
+ current_function_builder_->EmitWithVarUint( |
kExprGetGlobal, LookupOrInsertGlobal(var, var_type)); |
} else { |
current_function_builder_->EmitGetLocal( |
@@ -961,9 +961,9 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
DCHECK_NE(kWasmStmt, var_type); |
if (var->IsContextSlot()) { |
uint32_t index = LookupOrInsertGlobal(var, var_type); |
- current_function_builder_->EmitWithVarInt(kExprSetGlobal, index); |
+ current_function_builder_->EmitWithVarUint(kExprSetGlobal, index); |
if (fate == kLeaveOnStack) { |
- current_function_builder_->EmitWithVarInt(kExprGetGlobal, index); |
+ current_function_builder_->EmitWithVarUint(kExprGetGlobal, index); |
} |
} else { |
if (fate == kDrop) { |
@@ -1473,7 +1473,7 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
int parent_pos = returns_value ? parent_binop->position() : pos; |
current_function_builder_->AddAsmWasmOffset(pos, parent_pos); |
current_function_builder_->Emit(kExprCallFunction); |
- current_function_builder_->EmitVarInt(index); |
+ current_function_builder_->EmitVarUint(index); |
} else { |
WasmFunctionBuilder* function = LookupOrInsertFunction(vp->var()); |
VisitCallArgs(expr); |
@@ -1507,8 +1507,8 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
current_function_builder_->AddAsmWasmOffset(expr->position(), |
expr->position()); |
current_function_builder_->Emit(kExprCallIndirect); |
- current_function_builder_->EmitVarInt(indices->signature_index); |
- current_function_builder_->EmitVarInt(0); // table index |
+ current_function_builder_->EmitVarUint(indices->signature_index); |
+ current_function_builder_->EmitVarUint(0); // table index |
returns_value = |
builder_->GetSignature(indices->signature_index)->return_count() > |
0; |