| 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 class Typer { | 18 class Typer { |
| 19 public: | 19 public: |
| 20 explicit Typer(Graph* graph, MaybeHandle<Context> context); | 20 explicit Typer(Graph* graph, MaybeHandle<Context> context); |
| 21 ~Typer(); | 21 ~Typer(); |
| 22 | 22 |
| 23 void Run(); | 23 void Run(); |
| 24 void Narrow(Node* node); | |
| 25 | 24 |
| 26 Graph* graph() { return graph_; } | 25 Graph* graph() { return graph_; } |
| 27 MaybeHandle<Context> context() { return context_; } | 26 MaybeHandle<Context> context() { return context_; } |
| 28 Zone* zone() { return graph_->zone(); } | 27 Zone* zone() { return graph_->zone(); } |
| 29 Isolate* isolate() { return zone()->isolate(); } | 28 Isolate* isolate() { return zone()->isolate(); } |
| 30 | 29 |
| 31 private: | 30 private: |
| 32 class Visitor; | 31 class Visitor; |
| 33 class RunVisitor; | 32 class RunVisitor; |
| 34 class NarrowVisitor; | |
| 35 class WidenVisitor; | 33 class WidenVisitor; |
| 36 class Decorator; | 34 class Decorator; |
| 37 | 35 |
| 38 Graph* graph_; | 36 Graph* graph_; |
| 39 MaybeHandle<Context> context_; | 37 MaybeHandle<Context> context_; |
| 40 Decorator* decorator_; | 38 Decorator* decorator_; |
| 41 | 39 |
| 42 Zone* zone_; | 40 Zone* zone_; |
| 43 Type* negative_signed32; | 41 Type* negative_signed32; |
| 44 Type* non_negative_signed32; | 42 Type* non_negative_signed32; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 71 | 69 |
| 72 ZoneVector<Handle<Object> > weaken_min_limits_; | 70 ZoneVector<Handle<Object> > weaken_min_limits_; |
| 73 ZoneVector<Handle<Object> > weaken_max_limits_; | 71 ZoneVector<Handle<Object> > weaken_max_limits_; |
| 74 DISALLOW_COPY_AND_ASSIGN(Typer); | 72 DISALLOW_COPY_AND_ASSIGN(Typer); |
| 75 }; | 73 }; |
| 76 } | 74 } |
| 77 } | 75 } |
| 78 } // namespace v8::internal::compiler | 76 } // namespace v8::internal::compiler |
| 79 | 77 |
| 80 #endif // V8_COMPILER_TYPER_H_ | 78 #endif // V8_COMPILER_TYPER_H_ |
| OLD | NEW |