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

Side by Side Diff: src/wasm/ast-decoder.h

Issue 1699793002: [wasm] Clean up some DCHECKS in asm->wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/asm-wasm-builder.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 #ifndef V8_WASM_AST_DECODER_H_ 5 #ifndef V8_WASM_AST_DECODER_H_
6 #define V8_WASM_AST_DECODER_H_ 6 #define V8_WASM_AST_DECODER_H_
7 7
8 #include "src/signature.h" 8 #include "src/signature.h"
9 #include "src/wasm/decoder.h" 9 #include "src/wasm/decoder.h"
10 #include "src/wasm/wasm-opcodes.h" 10 #include "src/wasm/wasm-opcodes.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 case kAstF32: 212 case kAstF32:
213 local_f32_count += count; 213 local_f32_count += count;
214 break; 214 break;
215 case kAstF64: 215 case kAstF64:
216 local_f64_count += count; 216 local_f64_count += count;
217 break; 217 break;
218 default: 218 default:
219 UNREACHABLE(); 219 UNREACHABLE();
220 } 220 }
221 total_locals += count; 221 total_locals += count;
222 DCHECK(total_locals == 222 DCHECK_EQ(total_locals,
223 (sig->parameter_count() + local_i32_count + local_i64_count + 223 (sig->parameter_count() + local_i32_count + local_i64_count +
224 local_f32_count + local_f64_count)); 224 local_f32_count + local_f64_count));
225 } 225 }
226 226
227 void SumLocals() { 227 void SumLocals() {
228 total_locals = static_cast<uint32_t>(sig->parameter_count()) + 228 total_locals = static_cast<uint32_t>(sig->parameter_count()) +
229 local_i32_count + local_i64_count + local_f32_count + 229 local_i32_count + local_i64_count + local_f32_count +
230 local_f64_count; 230 local_f64_count;
231 } 231 }
232 }; 232 };
233 233
234 struct Tree; 234 struct Tree;
(...skipping 29 matching lines...) Expand all
264 // Computes the length of the opcode at the given address. 264 // Computes the length of the opcode at the given address.
265 int OpcodeLength(const byte* pc, const byte* end); 265 int OpcodeLength(const byte* pc, const byte* end);
266 266
267 // Computes the arity (number of sub-nodes) of the opcode at the given address. 267 // Computes the arity (number of sub-nodes) of the opcode at the given address.
268 int OpcodeArity(FunctionEnv* env, const byte* pc, const byte* end); 268 int OpcodeArity(FunctionEnv* env, const byte* pc, const byte* end);
269 } // namespace wasm 269 } // namespace wasm
270 } // namespace internal 270 } // namespace internal
271 } // namespace v8 271 } // namespace v8
272 272
273 #endif // V8_WASM_AST_DECODER_H_ 273 #endif // V8_WASM_AST_DECODER_H_
OLDNEW
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698