OLD | NEW |
---|---|
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_COMPILER_TYPER_H_ | 5 #ifndef V8_COMPILER_TYPER_H_ |
6 #define V8_COMPILER_TYPER_H_ | 6 #define V8_COMPILER_TYPER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
11 #include "src/compiler/opcodes.h" | 11 #include "src/compiler/opcodes.h" |
12 #include "src/types.h" | 12 #include "src/types.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 namespace compiler { | 16 namespace compiler { |
17 | 17 |
18 // Forward declarations. | 18 // Forward declarations. |
19 class LazyTypeCache; | 19 class LazyTypeCache; |
20 | 20 |
21 | 21 |
22 class Typer { | 22 class Typer { |
23 public: | 23 public: |
24 explicit Typer(Graph* graph, MaybeHandle<Context> context); | 24 explicit Typer(Isolate* isolate, Graph* graph, MaybeHandle<Context> context); |
Michael Starzinger
2015/01/23 14:21:10
nit: No longer needs to be marked "explicit".
danno
2015/01/23 14:45:20
Done.
| |
25 ~Typer(); | 25 ~Typer(); |
26 | 26 |
27 void Run(); | 27 void Run(); |
28 | 28 |
29 Graph* graph() { return graph_; } | 29 Graph* graph() { return graph_; } |
30 MaybeHandle<Context> context() { return context_; } | 30 MaybeHandle<Context> context() { return context_; } |
31 Zone* zone() { return graph_->zone(); } | 31 Zone* zone() { return graph_->zone(); } |
32 Isolate* isolate() { return zone()->isolate(); } | 32 Isolate* isolate() { return isolate_; } |
33 | 33 |
34 private: | 34 private: |
35 class Visitor; | 35 class Visitor; |
36 class Decorator; | 36 class Decorator; |
37 | 37 |
38 Isolate* isolate_; | |
38 Graph* graph_; | 39 Graph* graph_; |
39 MaybeHandle<Context> context_; | 40 MaybeHandle<Context> context_; |
40 Decorator* decorator_; | 41 Decorator* decorator_; |
41 | 42 |
42 Zone* zone_; | 43 Zone* zone_; |
43 Type* boolean_or_number; | 44 Type* boolean_or_number; |
44 Type* undefined_or_null; | 45 Type* undefined_or_null; |
45 Type* undefined_or_number; | 46 Type* undefined_or_number; |
46 Type* negative_signed32; | 47 Type* negative_signed32; |
47 Type* non_negative_signed32; | 48 Type* non_negative_signed32; |
(...skipping 19 matching lines...) Expand all Loading... | |
67 ZoneVector<Handle<Object> > weaken_min_limits_; | 68 ZoneVector<Handle<Object> > weaken_min_limits_; |
68 ZoneVector<Handle<Object> > weaken_max_limits_; | 69 ZoneVector<Handle<Object> > weaken_max_limits_; |
69 DISALLOW_COPY_AND_ASSIGN(Typer); | 70 DISALLOW_COPY_AND_ASSIGN(Typer); |
70 }; | 71 }; |
71 | 72 |
72 } // namespace compiler | 73 } // namespace compiler |
73 } // namespace internal | 74 } // namespace internal |
74 } // namespace v8 | 75 } // namespace v8 |
75 | 76 |
76 #endif // V8_COMPILER_TYPER_H_ | 77 #endif // V8_COMPILER_TYPER_H_ |
OLD | NEW |