| OLD | NEW | 
|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "src/compiler/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" | 
| 6 | 6 | 
| 7 #include "src/isolate-inl.h" | 7 #include "src/isolate-inl.h" | 
| 8 | 8 | 
| 9 #include "src/base/platform/elapsed-timer.h" | 9 #include "src/base/platform/elapsed-timer.h" | 
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" | 
| (...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2587     // Add the function as another context for the exception | 2587     // Add the function as another context for the exception | 
| 2588     ScopedVector<char> buffer(128); | 2588     ScopedVector<char> buffer(128); | 
| 2589     wasm::WasmName name = | 2589     wasm::WasmName name = | 
| 2590         module_env->module->GetName(function.name_offset, function.name_length); | 2590         module_env->module->GetName(function.name_offset, function.name_length); | 
| 2591     SNPrintF(buffer, "Compiling WASM function #%d:%.*s failed:", | 2591     SNPrintF(buffer, "Compiling WASM function #%d:%.*s failed:", | 
| 2592              function.func_index, name.length, name.name); | 2592              function.func_index, name.length, name.name); | 
| 2593     thrower.Failed(buffer.start(), result); | 2593     thrower.Failed(buffer.start(), result); | 
| 2594     return Handle<Code>::null(); | 2594     return Handle<Code>::null(); | 
| 2595   } | 2595   } | 
| 2596 | 2596 | 
|  | 2597   int index = static_cast<int>(function.func_index); | 
|  | 2598   if (index >= FLAG_trace_wasm_ast_start && index < FLAG_trace_wasm_ast_end) { | 
|  | 2599     PrintAst(body); | 
|  | 2600   } | 
|  | 2601 | 
| 2597   if (FLAG_trace_wasm_decode_time) { | 2602   if (FLAG_trace_wasm_decode_time) { | 
| 2598     decode_ms = decode_timer.Elapsed().InMillisecondsF(); | 2603     decode_ms = decode_timer.Elapsed().InMillisecondsF(); | 
| 2599   } | 2604   } | 
| 2600 | 2605 | 
| 2601   base::ElapsedTimer compile_timer; | 2606   base::ElapsedTimer compile_timer; | 
| 2602   if (FLAG_trace_wasm_decode_time) { | 2607   if (FLAG_trace_wasm_decode_time) { | 
| 2603     compile_timer.Start(); | 2608     compile_timer.Start(); | 
| 2604   } | 2609   } | 
| 2605   // Run the compiler pipeline to generate machine code. | 2610   // Run the compiler pipeline to generate machine code. | 
| 2606   CallDescriptor* descriptor = | 2611   CallDescriptor* descriptor = | 
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2648         static_cast<int>(function.code_end_offset - function.code_start_offset), | 2653         static_cast<int>(function.code_end_offset - function.code_start_offset), | 
| 2649         decode_ms, static_cast<int>(graph.NodeCount()), compile_ms); | 2654         decode_ms, static_cast<int>(graph.NodeCount()), compile_ms); | 
| 2650   } | 2655   } | 
| 2651   return code; | 2656   return code; | 
| 2652 } | 2657 } | 
| 2653 | 2658 | 
| 2654 | 2659 | 
| 2655 }  // namespace compiler | 2660 }  // namespace compiler | 
| 2656 }  // namespace internal | 2661 }  // namespace internal | 
| 2657 }  // namespace v8 | 2662 }  // namespace v8 | 
| OLD | NEW | 
|---|