OLD | NEW |
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/asmjs/asm-typer.h" | 5 #include "src/asmjs/asm-typer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 } | 421 } |
422 | 422 |
423 return AsmType::None(); | 423 return AsmType::None(); |
424 } | 424 } |
425 | 425 |
426 AsmTyper::StandardMember AsmTyper::VariableAsStandardMember(Variable* var) { | 426 AsmTyper::StandardMember AsmTyper::VariableAsStandardMember(Variable* var) { |
427 auto* var_info = Lookup(var); | 427 auto* var_info = Lookup(var); |
428 if (var_info == nullptr) { | 428 if (var_info == nullptr) { |
429 return kNone; | 429 return kNone; |
430 } | 430 } |
431 return var_info->standard_member(); | 431 StandardMember member = var_info->standard_member(); |
| 432 stdlib_uses_.insert(member); |
| 433 return member; |
432 } | 434 } |
433 | 435 |
434 bool AsmTyper::Validate() { | 436 bool AsmTyper::Validate() { |
435 if (!AsmType::None()->IsExactly(ValidateModule(root_))) { | 437 if (!AsmType::None()->IsExactly(ValidateModule(root_))) { |
436 return true; | 438 return true; |
437 } | 439 } |
438 return false; | 440 return false; |
439 } | 441 } |
440 | 442 |
441 namespace { | 443 namespace { |
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2744 return true; | 2746 return true; |
2745 } | 2747 } |
2746 | 2748 |
2747 *error_message = typer.error_message(); | 2749 *error_message = typer.error_message(); |
2748 return false; | 2750 return false; |
2749 } | 2751 } |
2750 | 2752 |
2751 } // namespace wasm | 2753 } // namespace wasm |
2752 } // namespace internal | 2754 } // namespace internal |
2753 } // namespace v8 | 2755 } // namespace v8 |
OLD | NEW |