| 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/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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  257         GlobalIndexOperand operand(&i, i.pc()); |  257         GlobalIndexOperand operand(&i, i.pc()); | 
|  258         os << GetOpName(opcode) << ' ' << operand.index; |  258         os << GetOpName(opcode) << ' ' << operand.index; | 
|  259         break; |  259         break; | 
|  260       } |  260       } | 
|  261 #define CASE_CONST(type, str, cast_type)                           \ |  261 #define CASE_CONST(type, str, cast_type)                           \ | 
|  262   case kExpr##type##Const: {                                       \ |  262   case kExpr##type##Const: {                                       \ | 
|  263     Imm##type##Operand operand(&i, i.pc());                        \ |  263     Imm##type##Operand operand(&i, i.pc());                        \ | 
|  264     os << #str ".const " << static_cast<cast_type>(operand.value); \ |  264     os << #str ".const " << static_cast<cast_type>(operand.value); \ | 
|  265     break;                                                         \ |  265     break;                                                         \ | 
|  266   } |  266   } | 
|  267         CASE_CONST(I8, i8, int32_t) |  | 
|  268         CASE_CONST(I32, i32, int32_t) |  267         CASE_CONST(I32, i32, int32_t) | 
|  269         CASE_CONST(I64, i64, int64_t) |  268         CASE_CONST(I64, i64, int64_t) | 
|  270         CASE_CONST(F32, f32, float) |  269         CASE_CONST(F32, f32, float) | 
|  271         CASE_CONST(F64, f64, double) |  270         CASE_CONST(F64, f64, double) | 
|  272  |  271  | 
|  273 #define CASE_OPCODE(opcode, _, __) case kExpr##opcode: |  272 #define CASE_OPCODE(opcode, _, __) case kExpr##opcode: | 
|  274         FOREACH_LOAD_MEM_OPCODE(CASE_OPCODE) |  273         FOREACH_LOAD_MEM_OPCODE(CASE_OPCODE) | 
|  275         FOREACH_STORE_MEM_OPCODE(CASE_OPCODE) { |  274         FOREACH_STORE_MEM_OPCODE(CASE_OPCODE) { | 
|  276           MemoryAccessOperand operand(&i, i.pc(), kMaxUInt32); |  275           MemoryAccessOperand operand(&i, i.pc(), kMaxUInt32); | 
|  277           os << GetOpName(opcode) << " offset=" << operand.offset |  276           os << GetOpName(opcode) << " offset=" << operand.offset | 
| (...skipping 27 matching lines...) Expand all  Loading... | 
|  305       default: |  304       default: | 
|  306         UNREACHABLE(); |  305         UNREACHABLE(); | 
|  307         break; |  306         break; | 
|  308     } |  307     } | 
|  309     os << '\n'; |  308     os << '\n'; | 
|  310     ++line_nr; |  309     ++line_nr; | 
|  311   } |  310   } | 
|  312   DCHECK_EQ(0, control_depth); |  311   DCHECK_EQ(0, control_depth); | 
|  313   DCHECK(i.ok()); |  312   DCHECK(i.ok()); | 
|  314 } |  313 } | 
| OLD | NEW |