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_ASMJS_TYPING_ASM_H_ |
6 #define V8_TYPING_ASM_H_ | 6 #define V8_ASMJS_TYPING_ASM_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast/ast-type-bounds.h" | 9 #include "src/ast/ast-type-bounds.h" |
10 #include "src/ast/ast.h" | 10 #include "src/ast/ast.h" |
11 #include "src/effects.h" | 11 #include "src/effects.h" |
12 #include "src/type-info.h" | 12 #include "src/type-info.h" |
13 #include "src/types.h" | 13 #include "src/types.h" |
14 #include "src/zone.h" | 14 #include "src/zone.h" |
15 | 15 |
16 namespace v8 { | 16 namespace v8 { |
17 namespace internal { | 17 namespace internal { |
18 | 18 |
19 class TypeCache; | 19 class TypeCache; |
20 | 20 |
21 class AsmTyper : public AstVisitor { | 21 class AsmTyper : public AstVisitor { |
22 public: | 22 public: |
23 explicit AsmTyper(Isolate* isolate, Zone* zone, Script* script, | 23 explicit AsmTyper(Isolate* isolate, Zone* zone, Script* script, |
24 FunctionLiteral* root); | 24 FunctionLiteral* root); |
25 bool Validate(); | 25 bool Validate(); |
26 void set_allow_simd(bool simd) { allow_simd_ = simd; } | 26 void set_allow_simd(bool simd) { allow_simd_ = simd; } |
| 27 void set_fixed_signature(bool fixed) { fixed_signature_ = fixed; } |
27 const char* error_message() { return error_message_; } | 28 const char* error_message() { return error_message_; } |
28 const AstTypeBounds* bounds() { return &bounds_; } | 29 const AstTypeBounds* bounds() { return &bounds_; } |
29 | 30 |
30 enum StandardMember { | 31 enum StandardMember { |
31 kNone = 0, | 32 kNone = 0, |
32 kStdlib, | 33 kStdlib, |
33 kInfinity, | 34 kInfinity, |
34 kNaN, | 35 kNaN, |
35 kMathAcos, | 36 kMathAcos, |
36 kMathAsin, | 37 kMathAsin, |
(...skipping 27 matching lines...) Expand all Loading... |
64 | 65 |
65 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 66 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
66 | 67 |
67 private: | 68 private: |
68 Zone* zone_; | 69 Zone* zone_; |
69 Isolate* isolate_; | 70 Isolate* isolate_; |
70 Script* script_; | 71 Script* script_; |
71 FunctionLiteral* root_; | 72 FunctionLiteral* root_; |
72 bool valid_; | 73 bool valid_; |
73 bool allow_simd_; | 74 bool allow_simd_; |
| 75 bool fixed_signature_; |
74 | 76 |
75 struct VariableInfo : public ZoneObject { | 77 struct VariableInfo : public ZoneObject { |
76 Type* type; | 78 Type* type; |
77 bool is_check_function; | 79 bool is_check_function; |
78 bool is_constructor_function; | 80 bool is_constructor_function; |
79 StandardMember standard_member; | 81 StandardMember standard_member; |
80 | 82 |
81 VariableInfo() | 83 VariableInfo() |
82 : type(NULL), | 84 : type(NULL), |
83 is_check_function(false), | 85 is_check_function(false), |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 #define DECLARE_VISIT(type) void Visit##type(type* node) override; | 181 #define DECLARE_VISIT(type) void Visit##type(type* node) override; |
180 AST_NODE_LIST(DECLARE_VISIT) | 182 AST_NODE_LIST(DECLARE_VISIT) |
181 #undef DECLARE_VISIT | 183 #undef DECLARE_VISIT |
182 | 184 |
183 DISALLOW_COPY_AND_ASSIGN(AsmTyper); | 185 DISALLOW_COPY_AND_ASSIGN(AsmTyper); |
184 }; | 186 }; |
185 } // namespace internal | 187 } // namespace internal |
186 } // namespace v8 | 188 } // namespace v8 |
187 | 189 |
188 #endif // V8_TYPING_ASM_H_ | 190 #endif // V8_TYPING_ASM_H_ |
OLD | NEW |