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

Side by Side Diff: src/asmjs/asm-typer.h

Issue 2452403003: Changed statement ZoneList to a ZoneChunkList
Patch Set: Created 4 years, 1 month 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/asmjs/asm-typer.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 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_set> 10 #include <unordered_set>
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 AsmTyper* typer_; 179 AsmTyper* typer_;
180 }; 180 };
181 181
182 // FlattenedStatements is an iterator class for ZoneList<Statement*> that 182 // FlattenedStatements is an iterator class for ZoneList<Statement*> that
183 // flattens the Block construct in the AST. This is here because we need it in 183 // flattens the Block construct in the AST. This is here because we need it in
184 // the tests. 184 // the tests.
185 class FlattenedStatements { 185 class FlattenedStatements {
186 public: 186 public:
187 explicit FlattenedStatements(Zone* zone, ZoneList<Statement*>* s); 187 explicit FlattenedStatements(Zone* zone, ZoneChunkList<Statement*>* s);
188 Statement* Next(); 188 Statement* Next();
189 189
190 private: 190 private:
191 struct Context { 191 struct Context {
192 explicit Context(ZoneList<Statement*>* s) : statements_(s) {} 192 explicit Context(ZoneChunkList<Statement*>* s)
193 ZoneList<Statement*>* statements_; 193 : current_(s->begin()), end_(s->end()) {}
194 int next_index_ = 0; 194 ForwardZoneChunkListIterator<Statement*> current_;
195 ForwardZoneChunkListIterator<Statement*> end_;
195 }; 196 };
196 197
197 ZoneVector<Context> context_stack_; 198 ZoneVector<Context> context_stack_;
198 199
199 DISALLOW_IMPLICIT_CONSTRUCTORS(FlattenedStatements); 200 DISALLOW_IMPLICIT_CONSTRUCTORS(FlattenedStatements);
200 }; 201 };
201 202
202 using ObjectTypeMap = ZoneMap<std::string, VariableInfo*>; 203 using ObjectTypeMap = ZoneMap<std::string, VariableInfo*>;
203 void InitializeStdlib(); 204 void InitializeStdlib();
204 void SetTypeOf(AstNode* node, AsmType* type); 205 void SetTypeOf(AstNode* node, AsmType* type);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 StdlibSet stdlib_uses_; 354 StdlibSet stdlib_uses_;
354 355
355 DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper); 356 DISALLOW_IMPLICIT_CONSTRUCTORS(AsmTyper);
356 }; 357 };
357 358
358 } // namespace wasm 359 } // namespace wasm
359 } // namespace internal 360 } // namespace internal
360 } // namespace v8 361 } // namespace v8
361 362
362 #endif // SRC_ASMJS_ASM_TYPER_H_ 363 #endif // SRC_ASMJS_ASM_TYPER_H_
OLDNEW
« no previous file with comments | « no previous file | src/asmjs/asm-typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698