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

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

Issue 1802353002: [wasm] Add --trace-wasm-ast-start and --trace-wasm-ast-end options and improve tracing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « src/wasm/ast-decoder.cc ('k') | no next file » | 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/macro-assembler.h" 5 #include "src/macro-assembler.h"
6 #include "src/objects.h" 6 #include "src/objects.h"
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/simulator.h" 9 #include "src/simulator.h"
10 10
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 instance.import_code.push_back(code); 452 instance.import_code.push_back(code);
453 index++; 453 index++;
454 } 454 }
455 } 455 }
456 456
457 //------------------------------------------------------------------------- 457 //-------------------------------------------------------------------------
458 // Compile all functions in the module. 458 // Compile all functions in the module.
459 //------------------------------------------------------------------------- 459 //-------------------------------------------------------------------------
460 460
461 // First pass: compile each function and initialize the code table. 461 // First pass: compile each function and initialize the code table.
462 index = 0; 462 index = FLAG_skip_compiling_wasm_funcs;
463 for (const WasmFunction& func : functions) { 463 while (index < functions.size()) {
464 const WasmFunction& func = functions[index];
464 if (thrower.error()) break; 465 if (thrower.error()) break;
465 DCHECK_EQ(index, func.func_index); 466 DCHECK_EQ(index, func.func_index);
466 467
467 WasmName str = GetName(func.name_offset, func.name_length); 468 WasmName str = GetName(func.name_offset, func.name_length);
468 WasmName str_null = {nullptr, 0}; 469 WasmName str_null = {nullptr, 0};
469 Handle<String> name = factory->InternalizeUtf8String( 470 Handle<String> name = factory->InternalizeUtf8String(
470 Vector<const char>(str.name, str.length)); 471 Vector<const char>(str.name, str.length));
471 Handle<Code> code = Handle<Code>::null(); 472 Handle<Code> code = Handle<Code>::null();
472 Handle<JSFunction> function = Handle<JSFunction>::null(); 473 Handle<JSFunction> function = Handle<JSFunction>::null();
473 if (func.external) { 474 if (func.external) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } 689 }
689 if (result->IsHeapNumber()) { 690 if (result->IsHeapNumber()) {
690 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); 691 return static_cast<int32_t>(HeapNumber::cast(*result)->value());
691 } 692 }
692 thrower.Error("WASM.compileRun() failed: Return value should be number"); 693 thrower.Error("WASM.compileRun() failed: Return value should be number");
693 return -1; 694 return -1;
694 } 695 }
695 } // namespace wasm 696 } // namespace wasm
696 } // namespace internal 697 } // namespace internal
697 } // namespace v8 698 } // namespace v8
OLDNEW
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698