Commit 9e60e7ac authored by bradnelson's avatar bradnelson Committed by Commit bot

[wasm][asm.js] Disable success messages for asm.js

These interfere with layout tests.

BUG=v8:4203
R=titzer@chromium.org,jochen@chromium.org

Review-Url: https://codereview.chromium.org/2628703003
Cr-Commit-Position: refs/heads/master@{#42241}
parent 57c20f0b
...@@ -209,27 +209,25 @@ MaybeHandle<FixedArray> AsmJs::CompileAsmViaWasm(CompilationInfo* info) { ...@@ -209,27 +209,25 @@ MaybeHandle<FixedArray> AsmJs::CompileAsmViaWasm(CompilationInfo* info) {
result->set(kWasmDataScriptPosition, result->set(kWasmDataScriptPosition,
Smi::FromInt(info->literal()->position())); Smi::FromInt(info->literal()->position()));
MessageLocation location(info->script(), info->literal()->position(),
info->literal()->position());
char text[100];
int length;
if (FLAG_trace_asm_time) { if (FLAG_trace_asm_time) {
length = MessageLocation location(info->script(), info->literal()->position(),
info->literal()->position());
char text[100];
int length =
base::OS::SNPrintF(text, arraysize(text), base::OS::SNPrintF(text, arraysize(text),
"success, asm->wasm: %0.3f ms, compile: %0.3f ms", "success, asm->wasm: %0.3f ms, compile: %0.3f ms",
asm_wasm_time, compile_time); asm_wasm_time, compile_time);
} else { DCHECK_NE(-1, length);
length = base::OS::SNPrintF(text, arraysize(text), "success"); USE(length);
} Handle<String> stext(
DCHECK_NE(-1, length); info->isolate()->factory()->InternalizeUtf8String(text));
USE(length); Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
Handle<String> stext(info->isolate()->factory()->InternalizeUtf8String(text)); info->isolate(), MessageTemplate::kAsmJsCompiled, &location, stext,
Handle<JSMessageObject> message = MessageHandler::MakeMessageObject( Handle<JSArray>::null());
info->isolate(), MessageTemplate::kAsmJsCompiled, &location, stext, message->set_error_level(v8::Isolate::kMessageInfo);
Handle<JSArray>::null()); if (!FLAG_suppress_asm_messages) {
message->set_error_level(v8::Isolate::kMessageInfo); MessageHandler::ReportMessage(info->isolate(), &location, message);
if (!FLAG_suppress_asm_messages) { }
MessageHandler::ReportMessage(info->isolate(), &location, message);
} }
return result; return result;
...@@ -320,28 +318,29 @@ MaybeHandle<Object> AsmJs::InstantiateAsmWasm(i::Isolate* isolate, ...@@ -320,28 +318,29 @@ MaybeHandle<Object> AsmJs::InstantiateAsmWasm(i::Isolate* isolate,
return single_function; return single_function;
} }
i::Handle<i::Script> script(i::Script::cast(wasm_data->get(kWasmDataScript)));
int32_t position = 0;
if (!wasm_data->get(kWasmDataScriptPosition)->ToInt32(&position)) {
UNREACHABLE();
}
MessageLocation location(script, position, position);
char text[50];
int length;
if (FLAG_trace_asm_time) { if (FLAG_trace_asm_time) {
length = base::OS::SNPrintF(text, arraysize(text), "success, %0.3f ms", i::Handle<i::Script> script(
instantiate_timer.Elapsed().InMillisecondsF()); i::Script::cast(wasm_data->get(kWasmDataScript)));
} else { int32_t position = 0;
length = base::OS::SNPrintF(text, arraysize(text), "success"); if (!wasm_data->get(kWasmDataScriptPosition)->ToInt32(&position)) {
UNREACHABLE();
}
MessageLocation location(script, position, position);
char text[50];
int length =
base::OS::SNPrintF(text, arraysize(text), "success, %0.3f ms",
instantiate_timer.Elapsed().InMillisecondsF());
DCHECK_NE(-1, length);
USE(length);
Handle<String> stext(isolate->factory()->InternalizeUtf8String(text));
Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
isolate, MessageTemplate::kAsmJsInstantiated, &location, stext,
Handle<JSArray>::null());
message->set_error_level(v8::Isolate::kMessageInfo);
if (!FLAG_suppress_asm_messages) {
MessageHandler::ReportMessage(isolate, &location, message);
}
} }
DCHECK_NE(-1, length);
USE(length);
Handle<String> stext(isolate->factory()->InternalizeUtf8String(text));
Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
isolate, MessageTemplate::kAsmJsInstantiated, &location, stext,
Handle<JSArray>::null());
message->set_error_level(v8::Isolate::kMessageInfo);
MessageHandler::ReportMessage(isolate, &location, message);
return module_object; return module_object;
} }
......
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