| OLD | NEW |
| 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/ostreams.h" | 7 #include "src/ostreams.h" |
| 8 #include "src/vector.h" | 8 #include "src/vector.h" |
| 9 #include "src/wasm/ast-decoder.h" | 9 #include "src/wasm/ast-decoder.h" |
| 10 #include "src/wasm/wasm-module.h" | 10 #include "src/wasm/wasm-module.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 break; | 226 break; |
| 227 case kExprBrTable: { | 227 case kExprBrTable: { |
| 228 BranchTableOperand operand(&i, i.pc()); | 228 BranchTableOperand operand(&i, i.pc()); |
| 229 BranchTableIterator iterator(&i, operand); | 229 BranchTableIterator iterator(&i, operand); |
| 230 os << "br_table"; | 230 os << "br_table"; |
| 231 while (iterator.has_next()) os << ' ' << iterator.next(); | 231 while (iterator.has_next()) os << ' ' << iterator.next(); |
| 232 break; | 232 break; |
| 233 } | 233 } |
| 234 case kExprCallIndirect: { | 234 case kExprCallIndirect: { |
| 235 CallIndirectOperand operand(&i, i.pc()); | 235 CallIndirectOperand operand(&i, i.pc()); |
| 236 DCHECK_EQ(0U, operand.table_index); | 236 DCHECK_EQ(0, operand.table_index); |
| 237 os << "call_indirect " << operand.index; | 237 os << "call_indirect " << operand.index; |
| 238 break; | 238 break; |
| 239 } | 239 } |
| 240 case kExprCallFunction: { | 240 case kExprCallFunction: { |
| 241 CallFunctionOperand operand(&i, i.pc()); | 241 CallFunctionOperand operand(&i, i.pc()); |
| 242 os << "call " << operand.index; | 242 os << "call " << operand.index; |
| 243 break; | 243 break; |
| 244 } | 244 } |
| 245 case kExprGetLocal: | 245 case kExprGetLocal: |
| 246 case kExprSetLocal: | 246 case kExprSetLocal: |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 default: | 302 default: |
| 303 UNREACHABLE(); | 303 UNREACHABLE(); |
| 304 break; | 304 break; |
| 305 } | 305 } |
| 306 os << '\n'; | 306 os << '\n'; |
| 307 ++line_nr; | 307 ++line_nr; |
| 308 } | 308 } |
| 309 DCHECK_EQ(0, control_depth); | 309 DCHECK_EQ(0, control_depth); |
| 310 DCHECK(i.ok()); | 310 DCHECK(i.ok()); |
| 311 } | 311 } |
| OLD | NEW |