OLD | NEW |
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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 for (int i = 0; i < kMaxIndent; ++i) bytes[i] = ' '; | 567 for (int i = 0; i < kMaxIndent; ++i) bytes[i] = ' '; |
568 bytes[kMaxIndent] = 0; | 568 bytes[kMaxIndent] = 0; |
569 if (stack_.size() < kMaxIndent / 2) { | 569 if (stack_.size() < kMaxIndent / 2) { |
570 bytes[stack_.size() * 2] = 0; | 570 bytes[stack_.size() * 2] = 0; |
571 } | 571 } |
572 return bytes; | 572 return bytes; |
573 } | 573 } |
574 | 574 |
575 // Decodes the locals declarations, if any, populating {local_type_vec_}. | 575 // Decodes the locals declarations, if any, populating {local_type_vec_}. |
576 void DecodeLocalDecls() { | 576 void DecodeLocalDecls() { |
577 DCHECK_EQ(0, local_type_vec_.size()); | 577 DCHECK_EQ(0u, local_type_vec_.size()); |
578 // Initialize {local_type_vec} from signature. | 578 // Initialize {local_type_vec} from signature. |
579 if (sig_) { | 579 if (sig_) { |
580 local_type_vec_.reserve(sig_->parameter_count()); | 580 local_type_vec_.reserve(sig_->parameter_count()); |
581 for (size_t i = 0; i < sig_->parameter_count(); ++i) { | 581 for (size_t i = 0; i < sig_->parameter_count(); ++i) { |
582 local_type_vec_.push_back(sig_->GetParam(i)); | 582 local_type_vec_.push_back(sig_->GetParam(i)); |
583 } | 583 } |
584 } | 584 } |
585 // Decode local declarations, if any. | 585 // Decode local declarations, if any. |
586 uint32_t entries = consume_u32v("local decls count"); | 586 uint32_t entries = consume_u32v("local decls count"); |
587 TRACE("local decls count: %u\n", entries); | 587 TRACE("local decls count: %u\n", entries); |
(...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2035 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, | 2035 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, |
2036 const byte* start, const byte* end) { | 2036 const byte* start, const byte* end) { |
2037 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; | 2037 FunctionBody body = {nullptr, nullptr, nullptr, start, end}; |
2038 WasmFullDecoder decoder(zone, nullptr, body); | 2038 WasmFullDecoder decoder(zone, nullptr, body); |
2039 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); | 2039 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); |
2040 } | 2040 } |
2041 | 2041 |
2042 } // namespace wasm | 2042 } // namespace wasm |
2043 } // namespace internal | 2043 } // namespace internal |
2044 } // namespace v8 | 2044 } // namespace v8 |
OLD | NEW |