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

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 2050213002: [wasm] Implement AST printing into an ostream (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@refactor-function-names-table
Patch Set: address ahaas' comments Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/ostreams.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after
3145 return nullptr; 3145 return nullptr;
3146 } 3146 }
3147 3147
3148 if (machine->Is32()) { 3148 if (machine->Is32()) {
3149 Int64Lowering r(graph, machine, common, jsgraph_->zone(), function_->sig); 3149 Int64Lowering r(graph, machine, common, jsgraph_->zone(), function_->sig);
3150 r.LowerGraph(); 3150 r.LowerGraph();
3151 } 3151 }
3152 3152
3153 int index = static_cast<int>(function_->func_index); 3153 int index = static_cast<int>(function_->func_index);
3154 if (index >= FLAG_trace_wasm_ast_start && index < FLAG_trace_wasm_ast_end) { 3154 if (index >= FLAG_trace_wasm_ast_start && index < FLAG_trace_wasm_ast_end) {
3155 PrintAst(isolate_->allocator(), body); 3155 OFStream os(stdout);
3156 PrintAst(isolate_->allocator(), body, os, nullptr);
3156 } 3157 }
3157 if (FLAG_trace_wasm_decode_time) { 3158 if (FLAG_trace_wasm_decode_time) {
3158 *decode_ms = decode_timer.Elapsed().InMillisecondsF(); 3159 *decode_ms = decode_timer.Elapsed().InMillisecondsF();
3159 } 3160 }
3160 return source_position_table; 3161 return source_position_table;
3161 } 3162 }
3162 3163
3163 WasmCompilationUnit::WasmCompilationUnit(wasm::ErrorThrower* thrower, 3164 WasmCompilationUnit::WasmCompilationUnit(wasm::ErrorThrower* thrower,
3164 Isolate* isolate, 3165 Isolate* isolate,
3165 wasm::ModuleEnv* module_env, 3166 wasm::ModuleEnv* module_env,
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3286 function_->code_start_offset), 3287 function_->code_start_offset),
3287 compile_ms); 3288 compile_ms);
3288 } 3289 }
3289 3290
3290 return code; 3291 return code;
3291 } 3292 }
3292 3293
3293 } // namespace compiler 3294 } // namespace compiler
3294 } // namespace internal 3295 } // namespace internal
3295 } // namespace v8 3296 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ostreams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698