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

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

Issue 2595733003: [wasm] Remove non-standard kExprI8Const bytecode (Closed)
Patch Set: Created 4 years 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
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698