| 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 #ifndef SRC_ASMJS_ASM_TYPER_H_ | 5 #ifndef SRC_ASMJS_ASM_TYPER_H_ |
| 6 #define SRC_ASMJS_ASM_TYPER_H_ | 6 #define SRC_ASMJS_ASM_TYPER_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <unordered_map> | 10 #include <unordered_map> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 bool ValidateAfterFunctionsPhase(); | 79 bool ValidateAfterFunctionsPhase(); |
| 80 void ClearFunctionNodeTypes(); | 80 void ClearFunctionNodeTypes(); |
| 81 | 81 |
| 82 Handle<JSMessageObject> error_message() const { return error_message_; } | 82 Handle<JSMessageObject> error_message() const { return error_message_; } |
| 83 const MessageLocation* message_location() const { return &message_location_; } | 83 const MessageLocation* message_location() const { return &message_location_; } |
| 84 | 84 |
| 85 AsmType* TypeOf(AstNode* node) const; | 85 AsmType* TypeOf(AstNode* node) const; |
| 86 AsmType* TypeOf(Variable* v) const; | 86 AsmType* TypeOf(Variable* v) const; |
| 87 StandardMember VariableAsStandardMember(Variable* var); | 87 StandardMember VariableAsStandardMember(Variable* var); |
| 88 | 88 |
| 89 // Allow the asm-wasm-builder to trigger failures (for interleaved |
| 90 // validating). |
| 91 AsmType* FailWithMessage(const char* text); |
| 92 |
| 89 typedef std::unordered_set<StandardMember, std::hash<int> > StdlibSet; | 93 typedef std::unordered_set<StandardMember, std::hash<int> > StdlibSet; |
| 90 | 94 |
| 91 StdlibSet StdlibUses() const { return stdlib_uses_; } | 95 StdlibSet StdlibUses() const { return stdlib_uses_; } |
| 92 | 96 |
| 93 // Each FFI import has a usage-site signature associated with it. | 97 // Each FFI import has a usage-site signature associated with it. |
| 94 struct FFIUseSignature { | 98 struct FFIUseSignature { |
| 95 Variable* var; | 99 Variable* var; |
| 96 ZoneVector<AsmType*> arg_types_; | 100 ZoneVector<AsmType*> arg_types_; |
| 97 AsmType* return_type_; | 101 AsmType* return_type_; |
| 98 FFIUseSignature(Variable* v, Zone* zone) | 102 FFIUseSignature(Variable* v, Zone* zone) |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 ZoneVector<Assignment*> function_pointer_tables_; | 409 ZoneVector<Assignment*> function_pointer_tables_; |
| 406 | 410 |
| 407 DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper); | 411 DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper); |
| 408 }; | 412 }; |
| 409 | 413 |
| 410 } // namespace wasm | 414 } // namespace wasm |
| 411 } // namespace internal | 415 } // namespace internal |
| 412 } // namespace v8 | 416 } // namespace v8 |
| 413 | 417 |
| 414 #endif // SRC_ASMJS_ASM_TYPER_H_ | 418 #endif // SRC_ASMJS_ASM_TYPER_H_ |
| OLD | NEW |