Commit bf90d9a3 authored by titzer's avatar titzer Committed by Commit bot

[formatting] Remove all double blank lines in WASM code.

R=ahaas@chromium.org,mstarzinger@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1970543003
Cr-Commit-Position: refs/heads/master@{#36174}
parent c4af1ba7
......@@ -54,7 +54,6 @@ const Operator* UnsupportedOpcode(wasm::WasmOpcode opcode) {
return nullptr;
}
void MergeControlToEnd(JSGraph* jsgraph, Node* node) {
Graph* g = jsgraph->graph();
if (g->end()) {
......@@ -285,28 +284,23 @@ WasmGraphBuilder::WasmGraphBuilder(
DCHECK_NOT_NULL(jsgraph_);
}
Node* WasmGraphBuilder::Error() { return jsgraph()->Dead(); }
Node* WasmGraphBuilder::Start(unsigned params) {
Node* start = graph()->NewNode(jsgraph()->common()->Start(params));
graph()->SetStart(start);
return start;
}
Node* WasmGraphBuilder::Param(unsigned index, wasm::LocalType type) {
return graph()->NewNode(jsgraph()->common()->Parameter(index),
graph()->start());
}
Node* WasmGraphBuilder::Loop(Node* entry) {
return graph()->NewNode(jsgraph()->common()->Loop(1), entry);
}
Node* WasmGraphBuilder::Terminate(Node* effect, Node* control) {
Node* terminate =
graph()->NewNode(jsgraph()->common()->Terminate(), effect, control);
......@@ -314,18 +308,15 @@ Node* WasmGraphBuilder::Terminate(Node* effect, Node* control) {
return terminate;
}
unsigned WasmGraphBuilder::InputCount(Node* node) {
return static_cast<unsigned>(node->InputCount());
}
bool WasmGraphBuilder::IsPhiWithMerge(Node* phi, Node* merge) {
return phi && IrOpcode::IsPhiOpcode(phi->opcode()) &&
NodeProperties::GetControlInput(phi) == merge;
}
void WasmGraphBuilder::AppendToMerge(Node* merge, Node* from) {
DCHECK(IrOpcode::IsMergeOpcode(merge->opcode()));
merge->AppendInput(jsgraph()->zone(), from);
......@@ -342,12 +333,10 @@ void WasmGraphBuilder::AppendToPhi(Node* phi, Node* from) {
phi, jsgraph()->common()->ResizeMergeOrPhi(phi->op(), new_size));
}
Node* WasmGraphBuilder::Merge(unsigned count, Node** controls) {
return graph()->NewNode(jsgraph()->common()->Merge(count), count, controls);
}
Node* WasmGraphBuilder::Phi(wasm::LocalType type, unsigned count, Node** vals,
Node* control) {
DCHECK(IrOpcode::IsMergeOpcode(control->opcode()));
......@@ -357,7 +346,6 @@ Node* WasmGraphBuilder::Phi(wasm::LocalType type, unsigned count, Node** vals,
buf);
}
Node* WasmGraphBuilder::EffectPhi(unsigned count, Node** effects,
Node* control) {
DCHECK(IrOpcode::IsMergeOpcode(control->opcode()));
......@@ -375,7 +363,6 @@ Node* WasmGraphBuilder::Int32Constant(int32_t value) {
return jsgraph()->Int32Constant(value);
}
Node* WasmGraphBuilder::Int64Constant(int64_t value) {
return jsgraph()->Int64Constant(value);
}
......@@ -895,22 +882,18 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input,
return graph()->NewNode(op, input);
}
Node* WasmGraphBuilder::Float32Constant(float value) {
return jsgraph()->Float32Constant(value);
}
Node* WasmGraphBuilder::Float64Constant(double value) {
return jsgraph()->Float64Constant(value);
}
Node* WasmGraphBuilder::Constant(Handle<Object> value) {
return jsgraph()->Constant(value);
}
Node* WasmGraphBuilder::Branch(Node* cond, Node** true_node,
Node** false_node) {
DCHECK_NOT_NULL(cond);
......@@ -922,24 +905,20 @@ Node* WasmGraphBuilder::Branch(Node* cond, Node** true_node,
return branch;
}
Node* WasmGraphBuilder::Switch(unsigned count, Node* key) {
return graph()->NewNode(jsgraph()->common()->Switch(count), key, *control_);
}
Node* WasmGraphBuilder::IfValue(int32_t value, Node* sw) {
DCHECK_EQ(IrOpcode::kSwitch, sw->opcode());
return graph()->NewNode(jsgraph()->common()->IfValue(value), sw);
}
Node* WasmGraphBuilder::IfDefault(Node* sw) {
DCHECK_EQ(IrOpcode::kSwitch, sw->opcode());
return graph()->NewNode(jsgraph()->common()->IfDefault(), sw);
}
Node* WasmGraphBuilder::Return(unsigned count, Node** vals) {
DCHECK_NOT_NULL(*control_);
DCHECK_NOT_NULL(*effect_);
......@@ -959,7 +938,6 @@ Node* WasmGraphBuilder::Return(unsigned count, Node** vals) {
return ret;
}
Node* WasmGraphBuilder::ReturnVoid() { return Return(0, Buffer(0)); }
Node* WasmGraphBuilder::Unreachable(wasm::WasmCodePosition position) {
......@@ -1008,7 +986,6 @@ Node* WasmGraphBuilder::BuildF32Neg(Node* input) {
return result;
}
Node* WasmGraphBuilder::BuildF64Neg(Node* input) {
#if WASM_64
Node* result =
......@@ -1028,7 +1005,6 @@ Node* WasmGraphBuilder::BuildF64Neg(Node* input) {
#endif
}
Node* WasmGraphBuilder::BuildF32CopySign(Node* left, Node* right) {
Node* result = Unop(
wasm::kExprF32ReinterpretI32,
......@@ -1041,7 +1017,6 @@ Node* WasmGraphBuilder::BuildF32CopySign(Node* left, Node* right) {
return result;
}
Node* WasmGraphBuilder::BuildF64CopySign(Node* left, Node* right) {
#if WASM_64
Node* result = Unop(
......@@ -1070,7 +1045,6 @@ Node* WasmGraphBuilder::BuildF64CopySign(Node* left, Node* right) {
#endif
}
Node* WasmGraphBuilder::BuildF32Min(Node* left, Node* right) {
Diamond left_le_right(graph(), jsgraph()->common(),
Binop(wasm::kExprF32Le, left, right));
......@@ -1091,7 +1065,6 @@ Node* WasmGraphBuilder::BuildF32Min(Node* left, Node* right) {
Binop(wasm::kExprF32Mul, left, Float32Constant(1.0)))));
}
Node* WasmGraphBuilder::BuildF32Max(Node* left, Node* right) {
Diamond left_ge_right(graph(), jsgraph()->common(),
Binop(wasm::kExprF32Ge, left, right));
......@@ -1112,7 +1085,6 @@ Node* WasmGraphBuilder::BuildF32Max(Node* left, Node* right) {
Binop(wasm::kExprF32Mul, left, Float32Constant(1.0)))));
}
Node* WasmGraphBuilder::BuildF64Min(Node* left, Node* right) {
Diamond left_le_right(graph(), jsgraph()->common(),
Binop(wasm::kExprF64Le, left, right));
......@@ -1133,7 +1105,6 @@ Node* WasmGraphBuilder::BuildF64Min(Node* left, Node* right) {
Binop(wasm::kExprF64Mul, left, Float64Constant(1.0)))));
}
Node* WasmGraphBuilder::BuildF64Max(Node* left, Node* right) {
Diamond left_ge_right(graph(), jsgraph()->common(),
Binop(wasm::kExprF64Ge, left, right));
......@@ -1284,7 +1255,6 @@ Node* WasmGraphBuilder::BuildI32Popcnt(Node* input) {
MachineRepresentation::kWord32);
}
Node* WasmGraphBuilder::BuildI64Popcnt(Node* input) {
return Unop(wasm::kExprI64UConvertI32,
BuildBitCountingCall(input, ExternalReference::wasm_word64_popcnt(
......@@ -2452,7 +2422,6 @@ void WasmGraphBuilder::BuildJSToWasmWrapper(Handle<Code> wasm_code,
MergeControlToEnd(jsgraph(), ret);
}
void WasmGraphBuilder::BuildWasmToJSWrapper(Handle<JSFunction> function,
wasm::FunctionSig* sig) {
int js_count = function->shared()->internal_formal_parameter_count();
......@@ -2545,7 +2514,6 @@ void WasmGraphBuilder::BuildWasmToJSWrapper(Handle<JSFunction> function,
MergeControlToEnd(jsgraph(), ret);
}
Node* WasmGraphBuilder::MemBuffer(uint32_t offset) {
DCHECK(module_ && module_->instance);
if (offset == 0) {
......@@ -2562,7 +2530,6 @@ Node* WasmGraphBuilder::MemBuffer(uint32_t offset) {
}
}
Node* WasmGraphBuilder::MemSize(uint32_t offset) {
DCHECK(module_ && module_->instance);
uint32_t size = static_cast<uint32_t>(module_->instance->mem_size);
......@@ -2574,7 +2541,6 @@ Node* WasmGraphBuilder::MemSize(uint32_t offset) {
}
}
Node* WasmGraphBuilder::FunctionTable() {
DCHECK(module_ && module_->instance &&
!module_->instance->function_table.is_null());
......@@ -2584,7 +2550,6 @@ Node* WasmGraphBuilder::FunctionTable() {
return function_table_;
}
Node* WasmGraphBuilder::LoadGlobal(uint32_t index) {
DCHECK(module_ && module_->instance && module_->instance->globals_start);
MachineType mem_type = module_->GetGlobalType(index);
......@@ -2598,7 +2563,6 @@ Node* WasmGraphBuilder::LoadGlobal(uint32_t index) {
return node;
}
Node* WasmGraphBuilder::StoreGlobal(uint32_t index, Node* val) {
DCHECK(module_ && module_->instance && module_->instance->globals_start);
MachineType mem_type = module_->GetGlobalType(index);
......@@ -2713,13 +2677,11 @@ void WasmGraphBuilder::PrintDebugName(Node* node) {
PrintF("#%d:%s", node->id(), node->op()->mnemonic());
}
Node* WasmGraphBuilder::String(const char* string) {
return jsgraph()->Constant(
jsgraph()->isolate()->factory()->NewStringFromAsciiChecked(string));
}
Graph* WasmGraphBuilder::graph() { return jsgraph()->graph(); }
void WasmGraphBuilder::Int64LoweringForTesting() {
......
......@@ -386,7 +386,6 @@ class WasmDecoder : public Decoder {
}
};
// A shift-reduce-parser strategy for decoding Wasm code that uses an explicit
// shift-reduce strategy with multiple internal stacks.
class SR_WasmDecoder : public WasmDecoder {
......@@ -1499,7 +1498,6 @@ TreeResult BuildTFGraph(base::AccountingAllocator* allocator,
return decoder.toResult<Tree*>(nullptr);
}
std::ostream& operator<<(std::ostream& os, const Tree& tree) {
if (tree.pc == nullptr) {
os << "null";
......
......@@ -39,13 +39,11 @@ void EmitUint8(byte** b, uint8_t x) {
*b += 1;
}
void EmitUint16(byte** b, uint16_t x) {
WriteUnalignedUInt16(*b, x);
*b += 2;
}
void EmitUint32(byte** b, uint32_t x) {
WriteUnalignedUInt32(*b, x);
*b += 4;
......@@ -102,7 +100,6 @@ struct WasmFunctionBuilder::Type {
LocalType type_;
};
WasmFunctionBuilder::WasmFunctionBuilder(Zone* zone)
: return_type_(kAstI32),
locals_(zone),
......@@ -125,21 +122,17 @@ uint16_t WasmFunctionBuilder::AddParam(LocalType type) {
return AddVar(type, true);
}
uint16_t WasmFunctionBuilder::AddLocal(LocalType type) {
return AddVar(type, false);
}
uint16_t WasmFunctionBuilder::AddVar(LocalType type, bool param) {
locals_.push_back({param, type});
return static_cast<uint16_t>(locals_.size() - 1);
}
void WasmFunctionBuilder::ReturnType(LocalType type) { return_type_ = type; }
void WasmFunctionBuilder::EmitCode(const byte* code, uint32_t code_size) {
EmitCode(code, code_size, nullptr, 0);
}
......@@ -166,12 +159,10 @@ void WasmFunctionBuilder::EmitCode(const byte* code, uint32_t code_size,
}
}
void WasmFunctionBuilder::Emit(WasmOpcode opcode) {
body_.push_back(static_cast<byte>(opcode));
}
void WasmFunctionBuilder::EmitWithU8(WasmOpcode opcode, const byte immediate) {
body_.push_back(static_cast<byte>(opcode));
body_.push_back(immediate);
......@@ -229,10 +220,8 @@ void WasmFunctionBuilder::EditVarIntImmediate(uint32_t offset,
v8::internal::wasm::EmitVarInt(&p, immediate);
}
void WasmFunctionBuilder::Exported(uint8_t flag) { exported_ = flag; }
void WasmFunctionBuilder::External(uint8_t flag) { external_ = flag; }
void WasmFunctionBuilder::SetName(const unsigned char* name, int name_length) {
......@@ -244,7 +233,6 @@ void WasmFunctionBuilder::SetName(const unsigned char* name, int name_length) {
}
}
WasmFunctionEncoder* WasmFunctionBuilder::Build(Zone* zone,
WasmModuleBuilder* mb) const {
WasmFunctionEncoder* e =
......@@ -296,7 +284,6 @@ WasmFunctionEncoder* WasmFunctionBuilder::Build(Zone* zone,
return e;
}
void WasmFunctionBuilder::IndexVars(WasmFunctionEncoder* e,
uint16_t* var_index) const {
uint16_t param = 0;
......@@ -342,7 +329,6 @@ void WasmFunctionBuilder::IndexVars(WasmFunctionEncoder* e,
}
}
WasmFunctionEncoder::WasmFunctionEncoder(Zone* zone, LocalType return_type,
bool exported, bool external)
: params_(zone),
......@@ -351,7 +337,6 @@ WasmFunctionEncoder::WasmFunctionEncoder(Zone* zone, LocalType return_type,
body_(zone),
name_(zone) {}
uint32_t WasmFunctionEncoder::HeaderSize() const {
uint32_t size = 3;
if (!external_) size += 2;
......@@ -363,7 +348,6 @@ uint32_t WasmFunctionEncoder::HeaderSize() const {
return size;
}
uint32_t WasmFunctionEncoder::BodySize(void) const {
// TODO(titzer): embed a LocalDeclEncoder in the WasmFunctionEncoder
LocalDeclEncoder local_decl;
......@@ -376,12 +360,10 @@ uint32_t WasmFunctionEncoder::BodySize(void) const {
: static_cast<uint32_t>(body_.size() + local_decl.Size());
}
uint32_t WasmFunctionEncoder::NameSize() const {
return HasName() ? static_cast<uint32_t>(name_.size()) : 0;
}
void WasmFunctionEncoder::Serialize(byte* buffer, byte** header,
byte** body) const {
uint8_t decl_bits = (exported_ ? kDeclFunctionExport : 0) |
......@@ -398,7 +380,6 @@ void WasmFunctionEncoder::Serialize(byte* buffer, byte** header,
}
}
if (!external_) {
// TODO(titzer): embed a LocalDeclEncoder in the WasmFunctionEncoder
LocalDeclEncoder local_decl;
......@@ -416,7 +397,6 @@ void WasmFunctionEncoder::Serialize(byte* buffer, byte** header,
}
}
WasmDataSegmentEncoder::WasmDataSegmentEncoder(Zone* zone, const byte* data,
uint32_t size, uint32_t dest)
: data_(zone), dest_(dest) {
......@@ -425,18 +405,15 @@ WasmDataSegmentEncoder::WasmDataSegmentEncoder(Zone* zone, const byte* data,
}
}
uint32_t WasmDataSegmentEncoder::HeaderSize() const {
static const int kDataSegmentSize = 13;
return kDataSegmentSize;
}
uint32_t WasmDataSegmentEncoder::BodySize() const {
return static_cast<uint32_t>(data_.size());
}
void WasmDataSegmentEncoder::Serialize(byte* buffer, byte** header,
byte** body) const {
EmitVarInt(header, dest_);
......@@ -461,7 +438,6 @@ uint16_t WasmModuleBuilder::AddFunction() {
return static_cast<uint16_t>(functions_.size() - 1);
}
WasmFunctionBuilder* WasmModuleBuilder::FunctionAt(size_t index) {
if (functions_.size() > index) {
return functions_.at(index);
......@@ -470,12 +446,10 @@ WasmFunctionBuilder* WasmModuleBuilder::FunctionAt(size_t index) {
}
}
void WasmModuleBuilder::AddDataSegment(WasmDataSegmentEncoder* data) {
data_segments_.push_back(data);
}
bool WasmModuleBuilder::CompareFunctionSigs::operator()(FunctionSig* a,
FunctionSig* b) const {
if (a->return_count() < b->return_count()) return true;
......@@ -493,7 +467,6 @@ bool WasmModuleBuilder::CompareFunctionSigs::operator()(FunctionSig* a,
return false;
}
uint16_t WasmModuleBuilder::AddSignature(FunctionSig* sig) {
SignatureMap::iterator pos = signature_map_.find(sig);
if (pos != signature_map_.end()) {
......@@ -506,7 +479,6 @@ uint16_t WasmModuleBuilder::AddSignature(FunctionSig* sig) {
}
}
void WasmModuleBuilder::AddIndirectFunction(uint16_t index) {
indirect_functions_.push_back(index);
}
......@@ -536,13 +508,11 @@ WasmModuleWriter* WasmModuleBuilder::Build(Zone* zone) {
return writer;
}
uint32_t WasmModuleBuilder::AddGlobal(MachineType type, bool exported) {
globals_.push_back(std::make_pair(type, exported));
return static_cast<uint32_t>(globals_.size() - 1);
}
WasmModuleWriter::WasmModuleWriter(Zone* zone)
: functions_(zone),
data_segments_(zone),
......
......@@ -773,7 +773,6 @@ class ModuleDecoder : public Decoder {
}
};
// Helpers for nice error messages.
class ModuleError : public ModuleResult {
public:
......@@ -787,7 +786,6 @@ class ModuleError : public ModuleResult {
}
};
// Helpers for nice error messages.
class FunctionError : public FunctionResult {
public:
......@@ -828,7 +826,6 @@ FunctionSig* DecodeWasmSignatureForTesting(Zone* zone, const byte* start,
return decoder.DecodeFunctionSignature(start);
}
FunctionResult DecodeWasmFunction(Isolate* isolate, Zone* zone,
ModuleEnv* module_env,
const byte* function_start,
......
......@@ -34,7 +34,6 @@ struct RawBuffer {
size_t size() { return static_cast<size_t>(end - start); }
};
RawBuffer GetRawBufferArgument(
ErrorThrower& thrower, const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() < 1) {
......@@ -77,7 +76,6 @@ RawBuffer GetRawBufferArgument(
return {start, end};
}
void VerifyModule(const v8::FunctionCallbackInfo<v8::Value>& args) {
HandleScope scope(args.GetIsolate());
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
......@@ -98,7 +96,6 @@ void VerifyModule(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (result.val) delete result.val;
}
void VerifyFunction(const v8::FunctionCallbackInfo<v8::Value>& args) {
HandleScope scope(args.GetIsolate());
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
......@@ -202,7 +199,6 @@ void InstantiateModuleCommon(const v8::FunctionCallbackInfo<v8::Value>& args,
if (result.val) delete result.val;
}
void InstantiateModuleFromAsm(const v8::FunctionCallbackInfo<v8::Value>& args) {
HandleScope scope(args.GetIsolate());
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
......@@ -234,7 +230,6 @@ void InstantiateModuleFromAsm(const v8::FunctionCallbackInfo<v8::Value>& args) {
internal::wasm::kAsmJsOrigin);
}
void InstantiateModule(const v8::FunctionCallbackInfo<v8::Value>& args) {
HandleScope scope(args.GetIsolate());
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate());
......@@ -248,7 +243,6 @@ void InstantiateModule(const v8::FunctionCallbackInfo<v8::Value>& args) {
}
} // namespace
// TODO(titzer): we use the API to create the function template because the
// internal guts are too ugly to replicate here.
static i::Handle<i::FunctionTemplateInfo> NewTemplate(i::Isolate* i_isolate,
......@@ -258,13 +252,11 @@ static i::Handle<i::FunctionTemplateInfo> NewTemplate(i::Isolate* i_isolate,
return v8::Utils::OpenHandle(*local);
}
namespace internal {
static Handle<String> v8_str(Isolate* isolate, const char* str) {
return isolate->factory()->NewStringFromAsciiChecked(str);
}
static void InstallFunc(Isolate* isolate, Handle<JSObject> object,
const char* str, FunctionCallback func) {
Handle<String> name = v8_str(isolate, str);
......@@ -276,7 +268,6 @@ static void InstallFunc(Isolate* isolate, Handle<JSObject> object,
JSObject::AddProperty(object, name, function, attributes);
}
void WasmJs::Install(Isolate* isolate, Handle<JSGlobalObject> global) {
// Setup wasm function map.
Handle<Context> context(global->native_context(), isolate);
......@@ -310,7 +301,6 @@ void WasmJs::Install(Isolate* isolate, Handle<JSGlobalObject> global) {
}
}
void WasmJs::InstallWasmFunctionMap(Isolate* isolate, Handle<Context> context) {
if (!context->get(Context::WASM_FUNCTION_MAP_INDEX)->IsMap()) {
// TODO(titzer): Move this to bootstrapper.cc??
......
......@@ -84,7 +84,6 @@ std::ostream& operator<<(std::ostream& os, const WasmModule& module) {
return os;
}
std::ostream& operator<<(std::ostream& os, const WasmFunction& function) {
os << "WASM function with signature " << *function.sig;
......@@ -221,7 +220,6 @@ size_t AllocateGlobalsOffsets(std::vector<WasmGlobal>& globals) {
return offset;
}
void LoadDataSegments(WasmModule* module, byte* mem_addr, size_t mem_size) {
for (const WasmDataSegment& segment : module->data_segments) {
if (!segment.init) continue;
......@@ -235,7 +233,6 @@ void LoadDataSegments(WasmModule* module, byte* mem_addr, size_t mem_size) {
}
}
Handle<FixedArray> BuildFunctionTable(Isolate* isolate, WasmModule* module) {
if (module->function_table.size() == 0) {
return Handle<FixedArray>::null();
......@@ -680,7 +677,6 @@ MaybeHandle<JSObject> WasmModule::Instantiate(Isolate* isolate,
return instance.js_object;
}
Handle<Code> ModuleEnv::GetFunctionCode(uint32_t index) {
DCHECK(IsValidFunction(index));
if (linker) return linker->GetFunctionCode(index);
......@@ -701,7 +697,6 @@ compiler::CallDescriptor* ModuleEnv::GetCallDescriptor(Zone* zone,
return GetWasmCallDescriptor(zone, function->sig);
}
int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
const byte* module_end, bool asm_js) {
HandleScope scope(isolate);
......@@ -727,7 +722,6 @@ int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
return retval;
}
int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module) {
ErrorThrower thrower(isolate, "CompileAndRunWasmModule");
WasmModuleInstance instance(module);
......
......@@ -51,13 +51,10 @@ std::ostream& operator<<(std::ostream& os, const FunctionSig& sig) {
return os;
}
#define DECLARE_SIG_ENUM(name, ...) kSigEnum_##name,
enum WasmOpcodeSig { FOREACH_SIGNATURE(DECLARE_SIG_ENUM) };
// TODO(titzer): not static-initializer safe. Wrap in LazyInstance.
#define DECLARE_SIG(name, ...) \
static LocalType kTypes_##name[] = {__VA_ARGS__}; \
......@@ -73,7 +70,6 @@ static const FunctionSig* kSimpleExprSigs[] = {
static byte kSimpleExprSigTable[256];
// Initialize the signature table.
static void InitSigTable() {
#define SET_SIG_TABLE(name, opcode, sig) \
......@@ -83,7 +79,6 @@ static void InitSigTable() {
#undef SET_SIG_TABLE
}
FunctionSig* WasmOpcodes::Signature(WasmOpcode opcode) {
// TODO(titzer): use LazyInstance to make this thread safe.
if (kSimpleExprSigTable[kExprI32Add] == 0) InitSigTable();
......@@ -91,7 +86,6 @@ FunctionSig* WasmOpcodes::Signature(WasmOpcode opcode) {
kSimpleExprSigs[kSimpleExprSigTable[static_cast<byte>(opcode)]]);
}
// TODO(titzer): pull WASM_64 up to a common header.
#if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64
#define WASM_64 1
......
......@@ -28,7 +28,6 @@ std::ostream& operator<<(std::ostream& os, const ErrorCode& error_code) {
return os;
}
void ErrorThrower::Error(const char* format, ...) {
if (error_) return; // only report the first error.
error_ = true;
......
......@@ -25,14 +25,12 @@ using namespace v8::internal::wasm;
r.Build(code, code + arraysize(code)); \
} while (false)
#define ADD_CODE(vec, ...) \
do { \
byte __buf[] = {__VA_ARGS__}; \
for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \
} while (false)
namespace {
// A helper for generating predictable but unique argument values that
// are easy to debug (e.g. with misaligned stacks).
......@@ -48,7 +46,6 @@ class PredictableInputValues {
}
};
uint32_t AddJSSelector(TestingModule* module, FunctionSig* sig, int which) {
const int kMaxParams = 11;
static const char* formals[kMaxParams] = {"",
......@@ -73,7 +70,6 @@ uint32_t AddJSSelector(TestingModule* module, FunctionSig* sig, int which) {
return module->AddJsFunction(sig, source.start());
}
void EXPECT_CALL(double expected, Handle<JSFunction> jsfunc,
Handle<Object>* buffer, int count) {
Isolate* isolate = jsfunc->GetIsolate();
......@@ -91,7 +87,6 @@ void EXPECT_CALL(double expected, Handle<JSFunction> jsfunc,
}
}
void EXPECT_CALL(double expected, Handle<JSFunction> jsfunc, double a,
double b) {
Isolate* isolate = jsfunc->GetIsolate();
......@@ -112,7 +107,6 @@ TEST(Run_Int32Sub_jswrapped) {
EXPECT_CALL(-8723487, jsfunc, -8000000, 723487);
}
TEST(Run_Float32Div_jswrapped) {
TestSignatures sigs;
TestingModule module;
......@@ -124,7 +118,6 @@ TEST(Run_Float32Div_jswrapped) {
EXPECT_CALL(64, jsfunc, -16, -0.25);
}
TEST(Run_Float64Add_jswrapped) {
TestSignatures sigs;
TestingModule module;
......@@ -136,7 +129,6 @@ TEST(Run_Float64Add_jswrapped) {
EXPECT_CALL(-5.5, jsfunc, -5.25, -0.25);
}
TEST(Run_I32Popcount_jswrapped) {
TestSignatures sigs;
TestingModule module;
......@@ -149,7 +141,6 @@ TEST(Run_I32Popcount_jswrapped) {
EXPECT_CALL(6, jsfunc, 0x3F, 0);
}
TEST(Run_CallJS_Add_jswrapped) {
TestSignatures sigs;
TestingModule module;
......@@ -165,7 +156,6 @@ TEST(Run_CallJS_Add_jswrapped) {
EXPECT_CALL(-666666801, jsfunc, -666666900, -1);
}
void RunJSSelectTest(int which) {
const int kMaxParams = 8;
PredictableInputValues inputs(0x100);
......@@ -201,7 +191,6 @@ void RunJSSelectTest(int which) {
}
}
TEST(Run_JSSelect_0) { RunJSSelectTest(0); }
TEST(Run_JSSelect_1) { RunJSSelectTest(1); }
......@@ -218,7 +207,6 @@ TEST(Run_JSSelect_6) { RunJSSelectTest(6); }
TEST(Run_JSSelect_7) { RunJSSelectTest(7); }
void RunWASMSelectTest(int which) {
PredictableInputValues inputs(0x200);
Isolate* isolate = CcTest::InitIsolateOnce();
......@@ -250,7 +238,6 @@ void RunWASMSelectTest(int which) {
}
}
TEST(Run_WASMSelect_0) { RunWASMSelectTest(0); }
TEST(Run_WASMSelect_1) { RunWASMSelectTest(1); }
......@@ -267,7 +254,6 @@ TEST(Run_WASMSelect_6) { RunWASMSelectTest(6); }
TEST(Run_WASMSelect_7) { RunWASMSelectTest(7); }
void RunWASMSelectAlignTest(int num_args, int num_params) {
PredictableInputValues inputs(0x300);
Isolate* isolate = CcTest::InitIsolateOnce();
......@@ -301,31 +287,26 @@ void RunWASMSelectAlignTest(int num_args, int num_params) {
}
}
TEST(Run_WASMSelectAlign_0) {
RunWASMSelectAlignTest(0, 1);
RunWASMSelectAlignTest(0, 2);
}
TEST(Run_WASMSelectAlign_1) {
RunWASMSelectAlignTest(1, 2);
RunWASMSelectAlignTest(1, 3);
}
TEST(Run_WASMSelectAlign_2) {
RunWASMSelectAlignTest(2, 3);
RunWASMSelectAlignTest(2, 4);
}
TEST(Run_WASMSelectAlign_3) {
RunWASMSelectAlignTest(3, 3);
RunWASMSelectAlignTest(3, 4);
}
TEST(Run_WASMSelectAlign_4) {
RunWASMSelectAlignTest(4, 3);
RunWASMSelectAlignTest(4, 4);
......@@ -412,7 +393,6 @@ void RunJSSelectAlignTest(int num_args, int num_params) {
}
}
TEST(Run_JSSelectAlign_0) {
RunJSSelectAlignTest(0, 1);
RunJSSelectAlignTest(0, 2);
......
......@@ -44,7 +44,6 @@ TEST(Run_WasmModule_Return114) {
TestModule(writer->WriteTo(&zone), kReturnValue);
}
TEST(Run_WasmModule_CallAdd) {
v8::base::AccountingAllocator allocator;
Zone zone(&allocator);
......@@ -66,7 +65,6 @@ TEST(Run_WasmModule_CallAdd) {
TestModule(writer->WriteTo(&zone), 99);
}
TEST(Run_WasmModule_ReadLoadedDataSegment) {
static const byte kDataSegmentDest0 = 12;
v8::base::AccountingAllocator allocator;
......
This diff is collapsed.
......@@ -52,7 +52,6 @@ static const WasmOpcode kInt32BinopOpcodes[] = {
Verify(kSuccess, env, code, code + arraysize(code)); \
} while (false)
#define EXPECT_FAILURE_INLINE(env, ...) \
do { \
static byte code[] = {__VA_ARGS__}; \
......@@ -1150,7 +1149,6 @@ TEST_F(AstDecoderTest, AllStoreMemCombinations) {
}
}
namespace {
// A helper for tests that require a module environment for functions and
// globals.
......@@ -1862,7 +1860,6 @@ TEST_F(AstDecoderTest, Select_TypeCheck) {
WASM_SELECT(WASM_F32(9.9), WASM_GET_LOCAL(0), WASM_I64V_1(0)));
}
class WasmOpcodeLengthTest : public TestWithZone {
public:
WasmOpcodeLengthTest() : TestWithZone() {}
......@@ -1892,7 +1889,6 @@ TEST_F(WasmOpcodeLengthTest, Statements) {
EXPECT_LENGTH(3, kExprBrIf);
}
TEST_F(WasmOpcodeLengthTest, MiscExpressions) {
EXPECT_LENGTH(2, kExprI8Const);
EXPECT_LENGTH(5, kExprF32Const);
......@@ -1966,13 +1962,11 @@ TEST_F(WasmOpcodeLengthTest, LoadsAndStores) {
EXPECT_LENGTH(3, kExprF64StoreMem);
}
TEST_F(WasmOpcodeLengthTest, MiscMemExpressions) {
EXPECT_LENGTH(1, kExprMemorySize);
EXPECT_LENGTH(1, kExprGrowMemory);
}
TEST_F(WasmOpcodeLengthTest, SimpleExpressions) {
EXPECT_LENGTH(1, kExprI32Add);
EXPECT_LENGTH(1, kExprI32Sub);
......@@ -2094,7 +2088,6 @@ TEST_F(WasmOpcodeLengthTest, SimpleExpressions) {
EXPECT_LENGTH(1, kExprI64ReinterpretF64);
}
class WasmOpcodeArityTest : public TestWithZone {
public:
WasmOpcodeArityTest() : TestWithZone() {}
......@@ -2137,7 +2130,6 @@ TEST_F(WasmOpcodeArityTest, Control) {
}
}
TEST_F(WasmOpcodeArityTest, Misc) {
EXPECT_ARITY(0, kExprI8Const);
EXPECT_ARITY(0, kExprI32Const);
......@@ -2150,7 +2142,6 @@ TEST_F(WasmOpcodeArityTest, Misc) {
EXPECT_ARITY(1, kExprStoreGlobal);
}
TEST_F(WasmOpcodeArityTest, Calls) {
{
EXPECT_ARITY(2, kExprCallFunction, 2, 0);
......@@ -2181,7 +2172,6 @@ TEST_F(WasmOpcodeArityTest, Calls) {
}
}
TEST_F(WasmOpcodeArityTest, LoadsAndStores) {
EXPECT_ARITY(1, kExprI32LoadMem8S);
EXPECT_ARITY(1, kExprI32LoadMem8U);
......@@ -2210,13 +2200,11 @@ TEST_F(WasmOpcodeArityTest, LoadsAndStores) {
EXPECT_ARITY(2, kExprF64StoreMem);
}
TEST_F(WasmOpcodeArityTest, MiscMemExpressions) {
EXPECT_ARITY(0, kExprMemorySize);
EXPECT_ARITY(1, kExprGrowMemory);
}
TEST_F(WasmOpcodeArityTest, SimpleExpressions) {
EXPECT_ARITY(2, kExprI32Add);
EXPECT_ARITY(2, kExprI32Sub);
......
......@@ -21,7 +21,6 @@ class EncoderTest : public TestWithZone {
}
};
TEST_F(EncoderTest, Function_Builder_Variable_Indexing) {
base::AccountingAllocator allocator;
Zone zone(&allocator);
......@@ -60,7 +59,6 @@ TEST_F(EncoderTest, Function_Builder_Variable_Indexing) {
f->Serialize(buffer, &header, &body);
}
TEST_F(EncoderTest, Function_Builder_Indexing_Variable_Width) {
base::AccountingAllocator allocator;
Zone zone(&allocator);
......
......@@ -32,14 +32,12 @@ class WasmLoopAssignmentAnalyzerTest : public TestWithZone {
}
};
TEST_F(WasmLoopAssignmentAnalyzerTest, Empty0) {
byte code[] = { 0 };
BitVector* assigned = Analyze(code, code);
CHECK_NULL(assigned);
}
TEST_F(WasmLoopAssignmentAnalyzerTest, Empty1) {
byte code[] = {kExprLoop, 0};
for (int i = 0; i < 5; i++) {
......@@ -51,7 +49,6 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Empty1) {
}
}
TEST_F(WasmLoopAssignmentAnalyzerTest, One) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
......@@ -63,7 +60,6 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, One) {
}
}
TEST_F(WasmLoopAssignmentAnalyzerTest, OneBeyond) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
......@@ -75,7 +71,6 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, OneBeyond) {
}
}
TEST_F(WasmLoopAssignmentAnalyzerTest, Two) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
......@@ -90,7 +85,6 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Two) {
}
}
TEST_F(WasmLoopAssignmentAnalyzerTest, NestedIf) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
......@@ -104,14 +98,12 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, NestedIf) {
}
}
static byte LEBByte(uint32_t val, byte which) {
byte b = (val >> (which * 7)) & 0x7F;
if (val >> ((which + 1) * 7)) b |= 0x80;
return b;
}
TEST_F(WasmLoopAssignmentAnalyzerTest, BigLocal) {
num_locals = 65000;
for (int i = 13; i < 65000; i = static_cast<int>(i * 1.5)) {
......@@ -133,7 +125,6 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, BigLocal) {
}
}
TEST_F(WasmLoopAssignmentAnalyzerTest, Break) {
num_locals = 3;
byte code[] = {
......@@ -147,7 +138,6 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Break) {
}
}
TEST_F(WasmLoopAssignmentAnalyzerTest, Loop1) {
num_locals = 5;
byte code[] = {
......@@ -164,7 +154,6 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Loop1) {
}
}
TEST_F(WasmLoopAssignmentAnalyzerTest, Loop2) {
num_locals = 6;
const byte kIter = 0;
......@@ -191,7 +180,6 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Loop2) {
}
}
} // namespace wasm
} // namespace internal
} // namespace v8
......@@ -169,7 +169,6 @@ TEST_F(WasmModuleVerifyTest, OneGlobal) {
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
}
TEST_F(WasmModuleVerifyTest, ZeroGlobals) {
static const byte data[] = {
SECTION(GLOBALS, 1), // --
......@@ -180,7 +179,6 @@ TEST_F(WasmModuleVerifyTest, ZeroGlobals) {
if (result.val) delete result.val;
}
static void AppendUint32v(std::vector<byte>& buffer, uint32_t val) {
while (true) {
uint32_t next = val >> 7;
......@@ -195,7 +193,6 @@ static void AppendUint32v(std::vector<byte>& buffer, uint32_t val) {
}
}
TEST_F(WasmModuleVerifyTest, NGlobals) {
static const byte data[] = {
NO_NAME, // name length
......@@ -245,7 +242,6 @@ TEST_F(WasmModuleVerifyTest, GlobalWithInvalidMemoryType) {
EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, TwoGlobals) {
static const byte data[] = {
SECTION(GLOBALS, 7),
......@@ -285,7 +281,6 @@ TEST_F(WasmModuleVerifyTest, TwoGlobals) {
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
}
TEST_F(WasmModuleVerifyTest, OneSignature) {
{
static const byte data[] = {SIGNATURES_SECTION_VOID_VOID};
......@@ -299,7 +294,6 @@ TEST_F(WasmModuleVerifyTest, OneSignature) {
}
}
TEST_F(WasmModuleVerifyTest, MultipleSignatures) {
static const byte data[] = {
SECTION(SIGNATURES, 1 + SIZEOF_SIG_ENTRY_v_v + SIZEOF_SIG_ENTRY_x_x +
......@@ -327,7 +321,6 @@ TEST_F(WasmModuleVerifyTest, MultipleSignatures) {
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
}
TEST_F(WasmModuleVerifyTest, FunctionWithoutSig) {
static const byte data[] = {
SECTION(OLD_FUNCTIONS, 25), 1,
......@@ -349,7 +342,6 @@ TEST_F(WasmModuleVerifyTest, FunctionWithoutSig) {
if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, OneEmptyVoidVoidFunction) {
const int kCodeStartOffset = 49;
const int kCodeEndOffset = kCodeStartOffset + 1;
......@@ -401,7 +393,6 @@ TEST_F(WasmModuleVerifyTest, OneEmptyVoidVoidFunction) {
EXPECT_OFF_END_FAILURE(data, 16, sizeof(data));
}
TEST_F(WasmModuleVerifyTest, OneFunctionImported) {
static const byte data[] = {
// signatures
......@@ -467,7 +458,6 @@ TEST_F(WasmModuleVerifyTest, OneFunctionWithNopBody) {
if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, OneFunctionWithNopBody_WithLocals) {
static const byte kCodeStartOffset = 46;
static const byte kCodeEndOffset = kCodeStartOffset + 1;
......@@ -505,7 +495,6 @@ TEST_F(WasmModuleVerifyTest, OneFunctionWithNopBody_WithLocals) {
if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, OneGlobalOneFunctionWithNopBodyOneDataSegment) {
static const byte kNameOffset = 49;
static const byte kCodeStartOffset = 61;
......@@ -579,7 +568,6 @@ TEST_F(WasmModuleVerifyTest, OneGlobalOneFunctionWithNopBodyOneDataSegment) {
}
}
TEST_F(WasmModuleVerifyTest, OneDataSegment) {
const byte kDataSegmentSourceOffset = 30;
const byte data[] = {
......@@ -617,7 +605,6 @@ TEST_F(WasmModuleVerifyTest, OneDataSegment) {
EXPECT_OFF_END_FAILURE(data, 13, sizeof(data));
}
TEST_F(WasmModuleVerifyTest, TwoDataSegments) {
const byte kDataSegment0SourceOffset = 30;
const byte kDataSegment1SourceOffset = 30 + 8;
......@@ -704,7 +691,6 @@ TEST_F(WasmModuleVerifyTest, DataSegmentWithInvalidDest) {
}
}
// To make below tests for indirect calls much shorter.
#define FUNCTION(sig_index, external) kDeclFunctionImport, SIG_INDEX(sig_index)
......@@ -728,7 +714,6 @@ TEST_F(WasmModuleVerifyTest, OneIndirectFunction) {
if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, MultipleIndirectFunctions) {
static const byte data[] = {
// sig#0 -------------------------------------------------------
......@@ -766,7 +751,6 @@ TEST_F(WasmModuleVerifyTest, MultipleIndirectFunctions) {
if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, IndirectFunctionNoFunctions) {
static const byte data[] = {
// sig#0 -------------------------------------------------------
......@@ -778,7 +762,6 @@ TEST_F(WasmModuleVerifyTest, IndirectFunctionNoFunctions) {
EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, IndirectFunctionInvalidIndex) {
static const byte data[] = {
// sig#0 -------------------------------------------------------
......@@ -792,10 +775,8 @@ TEST_F(WasmModuleVerifyTest, IndirectFunctionInvalidIndex) {
EXPECT_FAILURE(data);
}
class WasmSignatureDecodeTest : public TestWithZone {};
TEST_F(WasmSignatureDecodeTest, Ok_v_v) {
static const byte data[] = {SIG_ENTRY_v_v};
base::AccountingAllocator allocator;
......@@ -808,7 +789,6 @@ TEST_F(WasmSignatureDecodeTest, Ok_v_v) {
EXPECT_EQ(0, sig->return_count());
}
TEST_F(WasmSignatureDecodeTest, Ok_t_v) {
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalTypePair ret_type = kLocalTypes[i];
......@@ -823,7 +803,6 @@ TEST_F(WasmSignatureDecodeTest, Ok_t_v) {
}
}
TEST_F(WasmSignatureDecodeTest, Ok_v_t) {
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalTypePair param_type = kLocalTypes[i];
......@@ -838,7 +817,6 @@ TEST_F(WasmSignatureDecodeTest, Ok_v_t) {
}
}
TEST_F(WasmSignatureDecodeTest, Ok_t_t) {
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalTypePair ret_type = kLocalTypes[i];
......@@ -857,7 +835,6 @@ TEST_F(WasmSignatureDecodeTest, Ok_t_t) {
}
}
TEST_F(WasmSignatureDecodeTest, Ok_i_tt) {
for (size_t i = 0; i < arraysize(kLocalTypes); i++) {
LocalTypePair p0_type = kLocalTypes[i];
......@@ -877,7 +854,6 @@ TEST_F(WasmSignatureDecodeTest, Ok_i_tt) {
}
}
TEST_F(WasmSignatureDecodeTest, Fail_off_end) {
byte data[256];
for (int p = 0; p <= 255; p = p + 1 + p * 3) {
......@@ -892,7 +868,6 @@ TEST_F(WasmSignatureDecodeTest, Fail_off_end) {
}
}
TEST_F(WasmSignatureDecodeTest, Fail_invalid_type) {
byte kInvalidType = 76;
for (size_t i = 0; i < SIZEOF_SIG_ENTRY_x_xx; i++) {
......
......@@ -18,7 +18,6 @@ class WasmMacroGenTest : public TestWithZone {};
EXPECT_EQ(size, sizeof(code)); \
} while (false)
TEST_F(WasmMacroGenTest, Constants) {
EXPECT_SIZE(2, WASM_ONE);
EXPECT_SIZE(2, WASM_ZERO);
......@@ -48,7 +47,6 @@ TEST_F(WasmMacroGenTest, Constants) {
EXPECT_SIZE(9, WASM_F64(-9818934.0));
}
TEST_F(WasmMacroGenTest, Statements) {
EXPECT_SIZE(1, WASM_NOP);
......@@ -85,7 +83,6 @@ TEST_F(WasmMacroGenTest, Statements) {
EXPECT_SIZE(1, WASM_UNREACHABLE);
}
TEST_F(WasmMacroGenTest, MacroStatements) {
EXPECT_SIZE(10, WASM_WHILE(WASM_I8(0), WASM_NOP));
EXPECT_SIZE(7, WASM_INC_LOCAL(0));
......@@ -100,7 +97,6 @@ TEST_F(WasmMacroGenTest, BrTable) {
EXPECT_SIZE(11, WASM_BR_TABLEV(WASM_ZERO, WASM_ZERO, 1, BR_TARGET(1)));
}
TEST_F(WasmMacroGenTest, Expressions) {
EXPECT_SIZE(2, WASM_GET_LOCAL(0));
EXPECT_SIZE(2, WASM_GET_LOCAL(1));
......@@ -188,7 +184,6 @@ TEST_F(WasmMacroGenTest, Int32Ops) {
EXPECT_SIZE(3, WASM_I32_EQZ(WASM_ZERO));
}
TEST_F(WasmMacroGenTest, Int64Ops) {
EXPECT_SIZE(5, WASM_I64_ADD(WASM_ZERO, WASM_ZERO));
EXPECT_SIZE(5, WASM_I64_SUB(WASM_ZERO, WASM_ZERO));
......@@ -224,7 +219,6 @@ TEST_F(WasmMacroGenTest, Int64Ops) {
EXPECT_SIZE(3, WASM_I64_EQZ(WASM_ZERO));
}
TEST_F(WasmMacroGenTest, Float32Ops) {
EXPECT_SIZE(5, WASM_F32_ADD(WASM_ZERO, WASM_ZERO));
EXPECT_SIZE(5, WASM_F32_SUB(WASM_ZERO, WASM_ZERO));
......@@ -249,7 +243,6 @@ TEST_F(WasmMacroGenTest, Float32Ops) {
EXPECT_SIZE(5, WASM_F32_GE(WASM_ZERO, WASM_ZERO));
}
TEST_F(WasmMacroGenTest, Float64Ops) {
EXPECT_SIZE(5, WASM_F64_ADD(WASM_ZERO, WASM_ZERO));
EXPECT_SIZE(5, WASM_F64_SUB(WASM_ZERO, WASM_ZERO));
......@@ -274,7 +267,6 @@ TEST_F(WasmMacroGenTest, Float64Ops) {
EXPECT_SIZE(5, WASM_F64_GE(WASM_ZERO, WASM_ZERO));
}
TEST_F(WasmMacroGenTest, Conversions) {
EXPECT_SIZE(3, WASM_I32_SCONVERT_F32(WASM_ZERO));
EXPECT_SIZE(3, WASM_I32_SCONVERT_F64(WASM_ZERO));
......@@ -316,7 +308,6 @@ TEST_F(WasmMacroGenTest, LoadsAndStores) {
}
}
TEST_F(WasmMacroGenTest, LoadsAndStoresWithOffset) {
for (size_t i = 0; i < arraysize(kMemTypes); i++) {
EXPECT_SIZE(5, WASM_LOAD_MEM_OFFSET(kMemTypes[i], 11, WASM_ZERO));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment