[wasm] Rename ExprBoolNot to ExprI32Eqz.

R=bradnelson@chromium.org, binji@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1741393002

Cr-Commit-Position: refs/heads/master@{#34350}
This commit is contained in:
titzer 2016-02-28 11:01:27 -08:00 committed by Commit bot
parent 9c6f024d38
commit 91802542d5
6 changed files with 9 additions and 9 deletions

View File

@ -708,7 +708,7 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input) {
const Operator* op;
MachineOperatorBuilder* m = jsgraph()->machine();
switch (opcode) {
case wasm::kExprBoolNot:
case wasm::kExprI32Eqz:
op = m->Word32Equal();
return graph()->NewNode(op, input, jsgraph()->Int32Constant(0));
case wasm::kExprF32Abs:
@ -1696,7 +1696,7 @@ Node* WasmGraphBuilder::FromJS(Node* node, Node* context,
Node* WasmGraphBuilder::Invert(Node* node) {
return Unop(wasm::kExprBoolNot, node);
return Unop(wasm::kExprI32Eqz, node);
}

View File

@ -318,7 +318,7 @@ class AsmWasmBuilderImpl : public AstVisitor {
if (stmt->cond() != nullptr) {
block_size_++;
current_function_builder_->Emit(kExprIf);
current_function_builder_->Emit(kExprBoolNot);
current_function_builder_->Emit(kExprI32Eqz);
RECURSE(Visit(stmt->cond()));
current_function_builder_->EmitWithU8(kExprBr, 1);
current_function_builder_->Emit(kExprNop);
@ -1045,7 +1045,7 @@ class AsmWasmBuilderImpl : public AstVisitor {
switch (expr->op()) {
case Token::NOT: {
DCHECK_EQ(kAstI32, TypeOf(expr->expression()));
current_function_builder_->Emit(kExprBoolNot);
current_function_builder_->Emit(kExprI32Eqz);
break;
}
default:

View File

@ -112,7 +112,7 @@
#define WASM_CALL_IMPORT0(index) kExprCallImport, static_cast<byte>(index)
#define WASM_CALL_INDIRECT0(index, func) \
kExprCallIndirect, static_cast<byte>(index), func
#define WASM_NOT(x) kExprBoolNot, x
#define WASM_NOT(x) kExprI32Eqz, x
//------------------------------------------------------------------------------
// Constructs that are composed of multiple bytecodes.

View File

@ -161,7 +161,7 @@ std::ostream& operator<<(std::ostream& os, const FunctionSig& function);
V(I32Clz, 0x57, i_i) \
V(I32Ctz, 0x58, i_i) \
V(I32Popcnt, 0x59, i_i) \
V(BoolNot, 0x5a, i_i) \
V(I32Eqz, 0x5a, i_i) \
V(I64Add, 0x5b, l_ll) \
V(I64Sub, 0x5c, l_ll) \
V(I64Mul, 0x5d, l_ll) \

View File

@ -152,7 +152,7 @@ var kExprI32GeU = 0x56;
var kExprI32Clz = 0x57;
var kExprI32Ctz = 0x58;
var kExprI32Popcnt = 0x59;
var kExprBoolNot = 0x5a;
var kExprI32Eqz = 0x5a;
var kExprI64Add = 0x5b;
var kExprI64Sub = 0x5c;
var kExprI64Mul = 0x5d;

View File

@ -2113,7 +2113,7 @@ TEST_F(WasmOpcodeLengthTest, SimpleExpressions) {
EXPECT_LENGTH(1, kExprI32Clz);
EXPECT_LENGTH(1, kExprI32Ctz);
EXPECT_LENGTH(1, kExprI32Popcnt);
EXPECT_LENGTH(1, kExprBoolNot);
EXPECT_LENGTH(1, kExprI32Eqz);
EXPECT_LENGTH(1, kExprI64Add);
EXPECT_LENGTH(1, kExprI64Sub);
EXPECT_LENGTH(1, kExprI64Mul);
@ -2374,7 +2374,7 @@ TEST_F(WasmOpcodeArityTest, SimpleExpressions) {
EXPECT_ARITY(1, kExprI32Clz);
EXPECT_ARITY(1, kExprI32Ctz);
EXPECT_ARITY(1, kExprI32Popcnt);
EXPECT_ARITY(1, kExprBoolNot);
EXPECT_ARITY(1, kExprI32Eqz);
EXPECT_ARITY(2, kExprI64Add);
EXPECT_ARITY(2, kExprI64Sub);
EXPECT_ARITY(2, kExprI64Mul);