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_set> | 11 #include <unordered_set> |
11 | 12 |
12 #include "src/allocation.h" | 13 #include "src/allocation.h" |
13 #include "src/asmjs/asm-types.h" | 14 #include "src/asmjs/asm-types.h" |
14 #include "src/ast/ast-type-bounds.h" | 15 #include "src/ast/ast-type-bounds.h" |
15 #include "src/ast/ast-types.h" | 16 #include "src/ast/ast-types.h" |
16 #include "src/ast/ast.h" | 17 #include "src/ast/ast.h" |
17 #include "src/effects.h" | 18 #include "src/effects.h" |
18 #include "src/type-info.h" | 19 #include "src/type-info.h" |
19 #include "src/zone/zone-containers.h" | 20 #include "src/zone/zone-containers.h" |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 // the module name. | 384 // the module name. |
384 VariableInfo* module_info_; | 385 VariableInfo* module_info_; |
385 Handle<String> module_name_; | 386 Handle<String> module_name_; |
386 | 387 |
387 // 3 Environments | 388 // 3 Environments |
388 ZoneHashMap global_scope_; // 3.1 Global environment | 389 ZoneHashMap global_scope_; // 3.1 Global environment |
389 ZoneHashMap local_scope_; // 3.2 Variable environment | 390 ZoneHashMap local_scope_; // 3.2 Variable environment |
390 | 391 |
391 std::uintptr_t stack_limit_; | 392 std::uintptr_t stack_limit_; |
392 bool stack_overflow_ = false; | 393 bool stack_overflow_ = false; |
393 ZoneMap<AstNode*, AsmType*> module_node_types_; | 394 std::unordered_map<AstNode*, AsmType*> module_node_types_; |
394 ZoneMap<AstNode*, AsmType*> function_node_types_; | 395 std::unordered_map<AstNode*, AsmType*> function_node_types_; |
395 static const int kErrorMessageLimit = 128; | 396 static const int kErrorMessageLimit = 128; |
396 AsmType* fround_type_; | 397 AsmType* fround_type_; |
397 AsmType* ffi_type_; | 398 AsmType* ffi_type_; |
398 char error_message_[kErrorMessageLimit]; | 399 char error_message_[kErrorMessageLimit]; |
399 StdlibSet stdlib_uses_; | 400 StdlibSet stdlib_uses_; |
400 | 401 |
401 SourceLayoutTracker source_layout_; | 402 SourceLayoutTracker source_layout_; |
402 ReturnStatement* module_return_; | 403 ReturnStatement* module_return_; |
403 ZoneVector<Assignment*> function_pointer_tables_; | 404 ZoneVector<Assignment*> function_pointer_tables_; |
404 | 405 |
405 DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper); | 406 DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper); |
406 }; | 407 }; |
407 | 408 |
408 } // namespace wasm | 409 } // namespace wasm |
409 } // namespace internal | 410 } // namespace internal |
410 } // namespace v8 | 411 } // namespace v8 |
411 | 412 |
412 #endif // SRC_ASMJS_ASM_TYPER_H_ | 413 #endif // SRC_ASMJS_ASM_TYPER_H_ |
OLD | NEW |