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 #ifndef V8_TYPING_ASM_H_ | 5 #ifndef V8_TYPING_ASM_H_ |
6 #define V8_TYPING_ASM_H_ | 6 #define V8_TYPING_ASM_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/effects.h" | 10 #include "src/effects.h" |
11 #include "src/type-info.h" | 11 #include "src/type-info.h" |
12 #include "src/types.h" | 12 #include "src/types.h" |
13 #include "src/zone.h" | 13 #include "src/zone.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 class ZoneTypeCache; | 18 class TypeCache; |
19 | 19 |
20 class AsmTyper : public AstVisitor { | 20 class AsmTyper : public AstVisitor { |
21 public: | 21 public: |
22 explicit AsmTyper(Isolate* isolate, Zone* zone, Script* script, | 22 explicit AsmTyper(Isolate* isolate, Zone* zone, Script* script, |
23 FunctionLiteral* root); | 23 FunctionLiteral* root); |
24 bool Validate(); | 24 bool Validate(); |
25 const char* error_message() { return error_message_; } | 25 const char* error_message() { return error_message_; } |
26 | 26 |
27 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 27 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
28 | 28 |
(...skipping 16 matching lines...) Expand all Loading... |
45 ObjectTypeMap stdlib_heap_types_; | 45 ObjectTypeMap stdlib_heap_types_; |
46 ObjectTypeMap stdlib_math_types_; | 46 ObjectTypeMap stdlib_math_types_; |
47 | 47 |
48 // Map from Variable* to global/local variable Type*. | 48 // Map from Variable* to global/local variable Type*. |
49 ZoneHashMap global_variable_type_; | 49 ZoneHashMap global_variable_type_; |
50 ZoneHashMap local_variable_type_; | 50 ZoneHashMap local_variable_type_; |
51 | 51 |
52 bool in_function_; // In module function? | 52 bool in_function_; // In module function? |
53 bool building_function_tables_; | 53 bool building_function_tables_; |
54 | 54 |
55 ZoneTypeCache const& cache_; | 55 TypeCache const& cache_; |
56 | 56 |
57 static const int kErrorMessageLimit = 100; | 57 static const int kErrorMessageLimit = 100; |
58 char error_message_[kErrorMessageLimit]; | 58 char error_message_[kErrorMessageLimit]; |
59 | 59 |
60 static const int kMaxUncombinedAdditiveSteps = 1 << 20; | 60 static const int kMaxUncombinedAdditiveSteps = 1 << 20; |
61 static const int kMaxUncombinedMultiplicativeSteps = 1; | 61 static const int kMaxUncombinedMultiplicativeSteps = 1; |
62 | 62 |
63 void InitializeStdlib(); | 63 void InitializeStdlib(); |
64 | 64 |
65 void VisitDeclarations(ZoneList<Declaration*>* d) override; | 65 void VisitDeclarations(ZoneList<Declaration*>* d) override; |
(...skipping 23 matching lines...) Expand all Loading... |
89 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) override; | 89 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) override; |
90 AST_NODE_LIST(DECLARE_VISIT) | 90 AST_NODE_LIST(DECLARE_VISIT) |
91 #undef DECLARE_VISIT | 91 #undef DECLARE_VISIT |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(AsmTyper); | 93 DISALLOW_COPY_AND_ASSIGN(AsmTyper); |
94 }; | 94 }; |
95 } // namespace internal | 95 } // namespace internal |
96 } // namespace v8 | 96 } // namespace v8 |
97 | 97 |
98 #endif // V8_TYPING_ASM_H_ | 98 #endif // V8_TYPING_ASM_H_ |
OLD | NEW |