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

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

Issue 2591903003: [wasm] Use Param and Return methods consistently (Closed)
Patch Set: Created 3 years, 12 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/compiler/wasm-compiler.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 #include "src/signature.h" 5 #include "src/signature.h"
6 6
7 #include "src/bit-vector.h" 7 #include "src/bit-vector.h"
8 #include "src/flags.h" 8 #include "src/flags.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/zone/zone-containers.h" 10 #include "src/zone/zone-containers.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 size_t size = sizeof(TFNode*) * EnvironmentCount(); 517 size_t size = sizeof(TFNode*) * EnvironmentCount();
518 ssa_env->state = SsaEnv::kReached; 518 ssa_env->state = SsaEnv::kReached;
519 ssa_env->locals = 519 ssa_env->locals =
520 size > 0 ? reinterpret_cast<TFNode**>(zone_->New(size)) : nullptr; 520 size > 0 ? reinterpret_cast<TFNode**>(zone_->New(size)) : nullptr;
521 521
522 if (builder_) { 522 if (builder_) {
523 start = builder_->Start(static_cast<int>(sig_->parameter_count() + 1)); 523 start = builder_->Start(static_cast<int>(sig_->parameter_count() + 1));
524 // Initialize local variables. 524 // Initialize local variables.
525 uint32_t index = 0; 525 uint32_t index = 0;
526 while (index < sig_->parameter_count()) { 526 while (index < sig_->parameter_count()) {
527 ssa_env->locals[index] = builder_->Param(index, local_type_vec_[index]); 527 ssa_env->locals[index] = builder_->Param(index);
528 index++; 528 index++;
529 } 529 }
530 while (index < local_type_vec_.size()) { 530 while (index < local_type_vec_.size()) {
531 LocalType type = local_type_vec_[index]; 531 LocalType type = local_type_vec_[index];
532 TFNode* node = DefaultValue(type); 532 TFNode* node = DefaultValue(type);
533 while (index < local_type_vec_.size() && 533 while (index < local_type_vec_.size() &&
534 local_type_vec_[index] == type) { 534 local_type_vec_[index] == type) {
535 // Do a whole run of like-typed locals at a time. 535 // Do a whole run of like-typed locals at a time.
536 ssa_env->locals[index++] = node; 536 ssa_env->locals[index++] = node;
537 } 537 }
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, 2059 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals,
2060 const byte* start, const byte* end) { 2060 const byte* start, const byte* end) {
2061 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; 2061 FunctionBody body = {nullptr, nullptr, nullptr, start, end};
2062 WasmFullDecoder decoder(zone, nullptr, body); 2062 WasmFullDecoder decoder(zone, nullptr, body);
2063 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); 2063 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals);
2064 } 2064 }
2065 2065
2066 } // namespace wasm 2066 } // namespace wasm
2067 } // namespace internal 2067 } // namespace internal
2068 } // namespace v8 2068 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698