OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_H_ | 5 #ifndef V8_TYPING_H_ |
6 #define V8_TYPING_H_ | 6 #define V8_TYPING_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/effects.h" | 10 #include "src/effects.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 private: | 28 private: |
29 Effect ObservedOnStack(Object* value); | 29 Effect ObservedOnStack(Object* value); |
30 void ObserveTypesAtOsrEntry(IterationStatement* stmt); | 30 void ObserveTypesAtOsrEntry(IterationStatement* stmt); |
31 | 31 |
32 static const int kNoVar = INT_MIN; | 32 static const int kNoVar = INT_MIN; |
33 typedef v8::internal::Effects<int, kNoVar> Effects; | 33 typedef v8::internal::Effects<int, kNoVar> Effects; |
34 typedef v8::internal::NestedEffects<int, kNoVar> Store; | 34 typedef v8::internal::NestedEffects<int, kNoVar> Store; |
35 | 35 |
36 Isolate* isolate_; | 36 Isolate* isolate_; |
| 37 Zone* zone_; |
37 Handle<JSFunction> closure_; | 38 Handle<JSFunction> closure_; |
38 Scope* scope_; | 39 Scope* scope_; |
39 BailoutId osr_ast_id_; | 40 BailoutId osr_ast_id_; |
40 FunctionLiteral* root_; | 41 FunctionLiteral* root_; |
41 TypeFeedbackOracle oracle_; | 42 TypeFeedbackOracle oracle_; |
42 Store store_; | 43 Store store_; |
43 | 44 |
| 45 Zone* zone() const { return zone_; } |
44 TypeFeedbackOracle* oracle() { return &oracle_; } | 46 TypeFeedbackOracle* oracle() { return &oracle_; } |
45 | 47 |
46 void NarrowType(Expression* e, Bounds b) { | 48 void NarrowType(Expression* e, Bounds b) { |
47 e->set_bounds(Bounds::Both(e->bounds(), b, zone())); | 49 e->set_bounds(Bounds::Both(e->bounds(), b, zone())); |
48 } | 50 } |
49 void NarrowLowerType(Expression* e, Type* t) { | 51 void NarrowLowerType(Expression* e, Type* t) { |
50 e->set_bounds(Bounds::NarrowLower(e->bounds(), t, zone())); | 52 e->set_bounds(Bounds::NarrowLower(e->bounds(), t, zone())); |
51 } | 53 } |
52 | 54 |
53 Effects EnterEffects() { | 55 Effects EnterEffects() { |
(...skipping 20 matching lines...) Expand all Loading... |
74 AST_NODE_LIST(DECLARE_VISIT) | 76 AST_NODE_LIST(DECLARE_VISIT) |
75 #undef DECLARE_VISIT | 77 #undef DECLARE_VISIT |
76 | 78 |
77 DISALLOW_COPY_AND_ASSIGN(AstTyper); | 79 DISALLOW_COPY_AND_ASSIGN(AstTyper); |
78 }; | 80 }; |
79 | 81 |
80 } // namespace internal | 82 } // namespace internal |
81 } // namespace v8 | 83 } // namespace v8 |
82 | 84 |
83 #endif // V8_TYPING_H_ | 85 #endif // V8_TYPING_H_ |
OLD | NEW |