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

Unified Diff: src/asmjs/asm-js.cc

Issue 2628703003: [wasm][asm.js] Disable success messages for asm.js (Closed)
Patch Set: fix Created 3 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-js.cc
diff --git a/src/asmjs/asm-js.cc b/src/asmjs/asm-js.cc
index 9508b489545a408c2c2ae1738f6ba99b56248e2c..5b8220e612f9681539b50785aa284ecf390c6100 100644
--- a/src/asmjs/asm-js.cc
+++ b/src/asmjs/asm-js.cc
@@ -209,27 +209,25 @@ MaybeHandle<FixedArray> AsmJs::CompileAsmViaWasm(CompilationInfo* info) {
result->set(kWasmDataScriptPosition,
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) {
- length =
+ MessageLocation location(info->script(), info->literal()->position(),
+ info->literal()->position());
+ char text[100];
+ int length =
base::OS::SNPrintF(text, arraysize(text),
"success, asm->wasm: %0.3f ms, compile: %0.3f ms",
asm_wasm_time, compile_time);
- } else {
- length = base::OS::SNPrintF(text, arraysize(text), "success");
- }
- DCHECK_NE(-1, length);
- USE(length);
- Handle<String> stext(info->isolate()->factory()->InternalizeUtf8String(text));
- Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
- info->isolate(), MessageTemplate::kAsmJsCompiled, &location, stext,
- Handle<JSArray>::null());
- message->set_error_level(v8::Isolate::kMessageInfo);
- if (!FLAG_suppress_asm_messages) {
- MessageHandler::ReportMessage(info->isolate(), &location, message);
+ DCHECK_NE(-1, length);
+ USE(length);
+ Handle<String> stext(
+ info->isolate()->factory()->InternalizeUtf8String(text));
+ Handle<JSMessageObject> message = MessageHandler::MakeMessageObject(
+ info->isolate(), MessageTemplate::kAsmJsCompiled, &location, stext,
+ Handle<JSArray>::null());
+ message->set_error_level(v8::Isolate::kMessageInfo);
+ if (!FLAG_suppress_asm_messages) {
+ MessageHandler::ReportMessage(info->isolate(), &location, message);
+ }
}
return result;
@@ -320,28 +318,29 @@ MaybeHandle<Object> AsmJs::InstantiateAsmWasm(i::Isolate* isolate,
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) {
- length = base::OS::SNPrintF(text, arraysize(text), "success, %0.3f ms",
- instantiate_timer.Elapsed().InMillisecondsF());
- } else {
- length = base::OS::SNPrintF(text, arraysize(text), "success");
+ 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 =
+ 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698