Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Side by Side Diff: src/typing-asm.h

Issue 1642993002: Accurately type foreign functions, and variables. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/typing-asm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/effects.h" 10 #include "src/effects.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 VariableInfo* stdlib_simd_##name##_constructor_type_; 106 VariableInfo* stdlib_simd_##name##_constructor_type_;
107 SIMD128_TYPES(V) 107 SIMD128_TYPES(V)
108 #undef V 108 #undef V
109 109
110 // Map from Variable* to global/local variable Type*. 110 // Map from Variable* to global/local variable Type*.
111 ZoneHashMap global_variable_type_; 111 ZoneHashMap global_variable_type_;
112 ZoneHashMap local_variable_type_; 112 ZoneHashMap local_variable_type_;
113 113
114 bool in_function_; // In module function? 114 bool in_function_; // In module function?
115 bool building_function_tables_; 115 bool building_function_tables_;
116 bool visiting_exports_;
116 117
117 TypeCache const& cache_; 118 TypeCache const& cache_;
118 119
119 static const int kErrorMessageLimit = 100; 120 static const int kErrorMessageLimit = 100;
120 char error_message_[kErrorMessageLimit]; 121 char error_message_[kErrorMessageLimit];
121 122
122 static const int kMaxUncombinedAdditiveSteps = 1 << 20; 123 static const int kMaxUncombinedAdditiveSteps = 1 << 20;
123 static const int kMaxUncombinedMultiplicativeSteps = 1; 124 static const int kMaxUncombinedMultiplicativeSteps = 1;
124 125
125 void InitializeStdlib(); 126 void InitializeStdlib();
(...skipping 28 matching lines...) Expand all
154 void VisitLibraryAccess(ObjectTypeMap* map, Property* expr); 155 void VisitLibraryAccess(ObjectTypeMap* map, Property* expr);
155 156
156 void SetResult(Expression* expr, Type* type); 157 void SetResult(Expression* expr, Type* type);
157 void IntersectResult(Expression* expr, Type* type); 158 void IntersectResult(Expression* expr, Type* type);
158 159
159 void VisitWithExpectation(Expression* expr, Type* expected_type, 160 void VisitWithExpectation(Expression* expr, Type* expected_type,
160 const char* msg); 161 const char* msg);
161 162
162 void VisitLiteral(Literal* expr, bool is_return); 163 void VisitLiteral(Literal* expr, bool is_return);
163 164
165 void VisitVariableProxy(VariableProxy* expr, bool assignment);
aseemgarg 2016/01/28 23:09:59 make this private?
bradn 2016/01/29 01:03:38 It is?
166
164 void VisitIntegerBitwiseOperator(BinaryOperation* expr, Type* left_expected, 167 void VisitIntegerBitwiseOperator(BinaryOperation* expr, Type* left_expected,
165 Type* right_expected, Type* result_type, 168 Type* right_expected, Type* result_type,
166 bool conversion); 169 bool conversion);
167 170
168 Zone* zone() const { return zone_; } 171 Zone* zone() const { return zone_; }
169 172
170 #define DECLARE_VISIT(type) void Visit##type(type* node) override; 173 #define DECLARE_VISIT(type) void Visit##type(type* node) override;
171 AST_NODE_LIST(DECLARE_VISIT) 174 AST_NODE_LIST(DECLARE_VISIT)
172 #undef DECLARE_VISIT 175 #undef DECLARE_VISIT
173 176
174 DISALLOW_COPY_AND_ASSIGN(AsmTyper); 177 DISALLOW_COPY_AND_ASSIGN(AsmTyper);
175 }; 178 };
176 } // namespace internal 179 } // namespace internal
177 } // namespace v8 180 } // namespace v8
178 181
179 #endif // V8_TYPING_ASM_H_ 182 #endif // V8_TYPING_ASM_H_
OLDNEW
« no previous file with comments | « no previous file | src/typing-asm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698