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

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

Issue 1968383002: Remove Expression::bounds_, in order to conserve memory during parsing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove Expression::bounds_ Created 4 years, 7 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
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-type-bounds.h"
9 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
10 #include "src/effects.h" 11 #include "src/effects.h"
11 #include "src/type-info.h" 12 #include "src/type-info.h"
12 #include "src/types.h" 13 #include "src/types.h"
13 #include "src/zone.h" 14 #include "src/zone.h"
14 15
15 namespace v8 { 16 namespace v8 {
16 namespace internal { 17 namespace internal {
17 18
18 class TypeCache; 19 class TypeCache;
19 20
20 class AsmTyper : public AstVisitor { 21 class AsmTyper : public AstVisitor {
21 public: 22 public:
22 explicit AsmTyper(Isolate* isolate, Zone* zone, Script* script, 23 explicit AsmTyper(Isolate* isolate, Zone* zone, Script* script,
23 FunctionLiteral* root); 24 FunctionLiteral* root);
24 bool Validate(); 25 bool Validate();
25 void set_allow_simd(bool simd) { allow_simd_ = simd; } 26 void set_allow_simd(bool simd) { allow_simd_ = simd; }
26 const char* error_message() { return error_message_; } 27 const char* error_message() { return error_message_; }
28 const AstTypeBounds* bounds() { return &bounds_; }
27 29
28 enum StandardMember { 30 enum StandardMember {
29 kNone = 0, 31 kNone = 0,
30 kStdlib, 32 kStdlib,
31 kInfinity, 33 kInfinity,
32 kNaN, 34 kNaN,
33 kMathAcos, 35 kMathAcos,
34 kMathAsin, 36 kMathAsin,
35 kMathAtan, 37 kMathAtan,
36 kMathCos, 38 kMathCos,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // Map from Variable* to global/local variable Type*. 112 // Map from Variable* to global/local variable Type*.
111 ZoneHashMap global_variable_type_; 113 ZoneHashMap global_variable_type_;
112 ZoneHashMap local_variable_type_; 114 ZoneHashMap local_variable_type_;
113 115
114 bool in_function_; // In module function? 116 bool in_function_; // In module function?
115 bool building_function_tables_; 117 bool building_function_tables_;
116 bool visiting_exports_; 118 bool visiting_exports_;
117 119
118 TypeCache const& cache_; 120 TypeCache const& cache_;
119 121
122 AstTypeBounds bounds_;
123
120 static const int kErrorMessageLimit = 100; 124 static const int kErrorMessageLimit = 100;
121 char error_message_[kErrorMessageLimit]; 125 char error_message_[kErrorMessageLimit];
122 126
123 static const int kMaxUncombinedAdditiveSteps = 1 << 20; 127 static const int kMaxUncombinedAdditiveSteps = 1 << 20;
124 static const int kMaxUncombinedMultiplicativeSteps = 1; 128 static const int kMaxUncombinedMultiplicativeSteps = 1;
125 129
126 void InitializeStdlib(); 130 void InitializeStdlib();
127 void InitializeStdlibSIMD(); 131 void InitializeStdlibSIMD();
128 132
129 void VisitDeclarations(ZoneList<Declaration*>* d) override; 133 void VisitDeclarations(ZoneList<Declaration*>* d) override;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 #define DECLARE_VISIT(type) void Visit##type(type* node) override; 179 #define DECLARE_VISIT(type) void Visit##type(type* node) override;
176 AST_NODE_LIST(DECLARE_VISIT) 180 AST_NODE_LIST(DECLARE_VISIT)
177 #undef DECLARE_VISIT 181 #undef DECLARE_VISIT
178 182
179 DISALLOW_COPY_AND_ASSIGN(AsmTyper); 183 DISALLOW_COPY_AND_ASSIGN(AsmTyper);
180 }; 184 };
181 } // namespace internal 185 } // namespace internal
182 } // namespace v8 186 } // namespace v8
183 187
184 #endif // V8_TYPING_ASM_H_ 188 #endif // V8_TYPING_ASM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698