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

Side by Side Diff: src/ast/ast-type-bounds.h

Issue 2344143003: Moved zones and zone related stuff in its own directory. (Closed)
Patch Set: Merge branch 'master' into zonefolder Created 4 years, 3 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 | « src/ast/ast-expression-rewriter.h ('k') | src/ast/modules.h » ('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 // A container to associate type bounds with AST Expression nodes. 5 // A container to associate type bounds with AST Expression nodes.
6 6
7 #ifndef V8_AST_AST_TYPE_BOUNDS_H_ 7 #ifndef V8_AST_AST_TYPE_BOUNDS_H_
8 #define V8_AST_AST_TYPE_BOUNDS_H_ 8 #define V8_AST_AST_TYPE_BOUNDS_H_
9 9
10 #include "src/ast/ast-types.h" 10 #include "src/ast/ast-types.h"
11 #include "src/zone-containers.h" 11 #include "src/zone/zone-containers.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 class Expression; 16 class Expression;
17 17
18 class AstTypeBounds { 18 class AstTypeBounds {
19 public: 19 public:
20 explicit AstTypeBounds(Zone* zone) : bounds_map_(zone) {} 20 explicit AstTypeBounds(Zone* zone) : bounds_map_(zone) {}
21 ~AstTypeBounds() {} 21 ~AstTypeBounds() {}
22 22
23 AstBounds get(Expression* expression) const { 23 AstBounds get(Expression* expression) const {
24 ZoneMap<Expression*, AstBounds>::const_iterator i = 24 ZoneMap<Expression*, AstBounds>::const_iterator i =
25 bounds_map_.find(expression); 25 bounds_map_.find(expression);
26 return (i != bounds_map_.end()) ? i->second : AstBounds::Unbounded(); 26 return (i != bounds_map_.end()) ? i->second : AstBounds::Unbounded();
27 } 27 }
28 28
29 void set(Expression* expression, AstBounds bounds) { 29 void set(Expression* expression, AstBounds bounds) {
30 bounds_map_[expression] = bounds; 30 bounds_map_[expression] = bounds;
31 } 31 }
32 32
33 private: 33 private:
34 ZoneMap<Expression*, AstBounds> bounds_map_; 34 ZoneMap<Expression*, AstBounds> bounds_map_;
35 }; 35 };
36 36
37 } // namespace internal 37 } // namespace internal
38 } // namespace v8 38 } // namespace v8
39 39
40 #endif // V8_AST_AST_TYPE_BOUNDS_H_ 40 #endif // V8_AST_AST_TYPE_BOUNDS_H_
OLDNEW
« no previous file with comments | « src/ast/ast-expression-rewriter.h ('k') | src/ast/modules.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698