| 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/base/platform/elapsed-timer.h" | 7 #include "src/base/platform/elapsed-timer.h" |
| 8 #include "src/bit-vector.h" | 8 #include "src/bit-vector.h" |
| 9 #include "src/flags.h" | 9 #include "src/flags.h" |
| 10 #include "src/handles.h" | 10 #include "src/handles.h" |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 break; | 221 break; |
| 222 case kLocalF32: | 222 case kLocalF32: |
| 223 type = kWasmF32; | 223 type = kWasmF32; |
| 224 break; | 224 break; |
| 225 case kLocalF64: | 225 case kLocalF64: |
| 226 type = kWasmF64; | 226 type = kWasmF64; |
| 227 break; | 227 break; |
| 228 case kLocalS128: | 228 case kLocalS128: |
| 229 type = kWasmS128; | 229 type = kWasmS128; |
| 230 break; | 230 break; |
| 231 case kLocalS1x4: | |
| 232 type = kWasmS1x4; | |
| 233 break; | |
| 234 case kLocalS1x8: | |
| 235 type = kWasmS1x8; | |
| 236 break; | |
| 237 case kLocalS1x16: | |
| 238 type = kWasmS1x16; | |
| 239 break; | |
| 240 default: | 231 default: |
| 241 decoder->error(decoder->pc() - 1, "invalid local type"); | 232 decoder->error(decoder->pc() - 1, "invalid local type"); |
| 242 return false; | 233 return false; |
| 243 } | 234 } |
| 244 type_list->insert(type_list->end(), count, type); | 235 type_list->insert(type_list->end(), count, type); |
| 245 } | 236 } |
| 246 DCHECK(decoder->ok()); | 237 DCHECK(decoder->ok()); |
| 247 return true; | 238 return true; |
| 248 } | 239 } |
| 249 | 240 |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 case kWasmI32: | 745 case kWasmI32: |
| 755 return builder_->Int32Constant(0); | 746 return builder_->Int32Constant(0); |
| 756 case kWasmI64: | 747 case kWasmI64: |
| 757 return builder_->Int64Constant(0); | 748 return builder_->Int64Constant(0); |
| 758 case kWasmF32: | 749 case kWasmF32: |
| 759 return builder_->Float32Constant(0); | 750 return builder_->Float32Constant(0); |
| 760 case kWasmF64: | 751 case kWasmF64: |
| 761 return builder_->Float64Constant(0); | 752 return builder_->Float64Constant(0); |
| 762 case kWasmS128: | 753 case kWasmS128: |
| 763 return builder_->S128Zero(); | 754 return builder_->S128Zero(); |
| 764 case kWasmS1x4: | |
| 765 return builder_->S1x4Zero(); | |
| 766 case kWasmS1x8: | |
| 767 return builder_->S1x8Zero(); | |
| 768 case kWasmS1x16: | |
| 769 return builder_->S1x16Zero(); | |
| 770 default: | 755 default: |
| 771 UNREACHABLE(); | 756 UNREACHABLE(); |
| 772 } | 757 } |
| 773 } | 758 } |
| 774 | 759 |
| 775 char* indentation() { | 760 char* indentation() { |
| 776 static const int kMaxIndent = 64; | 761 static const int kMaxIndent = 64; |
| 777 static char bytes[kMaxIndent + 1]; | 762 static char bytes[kMaxIndent + 1]; |
| 778 for (int i = 0; i < kMaxIndent; ++i) bytes[i] = ' '; | 763 for (int i = 0; i < kMaxIndent; ++i) bytes[i] = ' '; |
| 779 bytes[kMaxIndent] = 0; | 764 bytes[kMaxIndent] = 0; |
| (...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2299 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, | 2284 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, |
| 2300 const byte* start, const byte* end) { | 2285 const byte* start, const byte* end) { |
| 2301 Decoder decoder(start, end); | 2286 Decoder decoder(start, end); |
| 2302 return WasmDecoder::AnalyzeLoopAssignment(&decoder, start, | 2287 return WasmDecoder::AnalyzeLoopAssignment(&decoder, start, |
| 2303 static_cast<int>(num_locals), zone); | 2288 static_cast<int>(num_locals), zone); |
| 2304 } | 2289 } |
| 2305 | 2290 |
| 2306 } // namespace wasm | 2291 } // namespace wasm |
| 2307 } // namespace internal | 2292 } // namespace internal |
| 2308 } // namespace v8 | 2293 } // namespace v8 |
| OLD | NEW |