| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 | 562 |
| 563 bool AsmTyper::ValidateAfterFunctionsPhase() { | 563 bool AsmTyper::ValidateAfterFunctionsPhase() { |
| 564 if (!AsmType::None()->IsExactly(ValidateModuleAfterFunctionsPhase(root_))) { | 564 if (!AsmType::None()->IsExactly(ValidateModuleAfterFunctionsPhase(root_))) { |
| 565 return true; | 565 return true; |
| 566 } | 566 } |
| 567 return false; | 567 return false; |
| 568 } | 568 } |
| 569 | 569 |
| 570 void AsmTyper::ClearFunctionNodeTypes() { function_node_types_.clear(); } | 570 void AsmTyper::ClearFunctionNodeTypes() { function_node_types_.clear(); } |
| 571 | 571 |
| 572 AsmType* AsmTyper::TriggerParsingError() { FAIL(root_, "Parsing error"); } |
| 573 |
| 572 namespace { | 574 namespace { |
| 573 bool IsUseAsmDirective(Statement* first_statement) { | 575 bool IsUseAsmDirective(Statement* first_statement) { |
| 574 ExpressionStatement* use_asm = first_statement->AsExpressionStatement(); | 576 ExpressionStatement* use_asm = first_statement->AsExpressionStatement(); |
| 575 if (use_asm == nullptr) { | 577 if (use_asm == nullptr) { |
| 576 return false; | 578 return false; |
| 577 } | 579 } |
| 578 | 580 |
| 579 Literal* use_asm_literal = use_asm->expression()->AsLiteral(); | 581 Literal* use_asm_literal = use_asm->expression()->AsLiteral(); |
| 580 | 582 |
| 581 if (use_asm_literal == nullptr) { | 583 if (use_asm_literal == nullptr) { |
| (...skipping 2352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2934 "Heap view creation parameter should be the module's heap parameter."); | 2936 "Heap view creation parameter should be the module's heap parameter."); |
| 2935 } | 2937 } |
| 2936 | 2938 |
| 2937 DCHECK(heap_view_info->type()->IsA(AsmType::Heap())); | 2939 DCHECK(heap_view_info->type()->IsA(AsmType::Heap())); |
| 2938 return heap_view_info->type(); | 2940 return heap_view_info->type(); |
| 2939 } | 2941 } |
| 2940 | 2942 |
| 2941 } // namespace wasm | 2943 } // namespace wasm |
| 2942 } // namespace internal | 2944 } // namespace internal |
| 2943 } // namespace v8 | 2945 } // namespace v8 |
| OLD | NEW |