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

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

Issue 2651903002: [wasm] No need to use multiple inheritance for `ModuleBytesEnv` (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/common/wasm/wasm-module-runner.cc » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/wasm/wasm-text.h" 5 #include "src/wasm/wasm-text.h"
6 6
7 #include "src/debug/interface-types.h" 7 #include "src/debug/interface-types.h"
8 #include "src/ostreams.h" 8 #include "src/ostreams.h"
9 #include "src/vector.h" 9 #include "src/vector.h"
10 #include "src/wasm/function-body-decoder.h" 10 #include "src/wasm/function-body-decoder.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 os << " (result"; 62 os << " (result";
63 for (size_t i = 0; i < return_count; ++i) 63 for (size_t i = 0; i < return_count; ++i)
64 os << ' ' << WasmOpcodes::TypeName(fun->sig->GetReturn(i)); 64 os << ' ' << WasmOpcodes::TypeName(fun->sig->GetReturn(i));
65 os << ')'; 65 os << ')';
66 } 66 }
67 os << "\n"; 67 os << "\n";
68 ++line_nr; 68 ++line_nr;
69 69
70 // Print the local declarations. 70 // Print the local declarations.
71 BodyLocalDecls decls(&zone); 71 BodyLocalDecls decls(&zone);
72 Vector<const byte> func_bytes = wire_bytes.module_bytes.SubVector( 72 Vector<const byte> func_bytes = wire_bytes.GetFunctionBytes(fun);
73 fun->code_start_offset, fun->code_end_offset);
74 BytecodeIterator i(func_bytes.begin(), func_bytes.end(), &decls); 73 BytecodeIterator i(func_bytes.begin(), func_bytes.end(), &decls);
75 DCHECK_LT(func_bytes.begin(), i.pc()); 74 DCHECK_LT(func_bytes.begin(), i.pc());
76 if (!decls.type_list.empty()) { 75 if (!decls.type_list.empty()) {
77 os << "(local"; 76 os << "(local";
78 for (const ValueType &v : decls.type_list) { 77 for (const ValueType &v : decls.type_list) {
79 os << ' ' << WasmOpcodes::TypeName(v); 78 os << ' ' << WasmOpcodes::TypeName(v);
80 } 79 }
81 os << ")\n"; 80 os << ")\n";
82 ++line_nr; 81 ++line_nr;
83 } 82 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 default: 201 default:
203 UNREACHABLE(); 202 UNREACHABLE();
204 break; 203 break;
205 } 204 }
206 os << '\n'; 205 os << '\n';
207 ++line_nr; 206 ++line_nr;
208 } 207 }
209 DCHECK_EQ(0, control_depth); 208 DCHECK_EQ(0, control_depth);
210 DCHECK(i.ok()); 209 DCHECK(i.ok());
211 } 210 }
OLDNEW
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | test/common/wasm/wasm-module-runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698