| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 static const int kNoVar = INT_MIN; | 64 static const int kNoVar = INT_MIN; |
| 65 typedef v8::internal::Effects<int, kNoVar> Effects; | 65 typedef v8::internal::Effects<int, kNoVar> Effects; |
| 66 typedef v8::internal::NestedEffects<int, kNoVar> Store; | 66 typedef v8::internal::NestedEffects<int, kNoVar> Store; |
| 67 | 67 |
| 68 CompilationInfo* info_; | 68 CompilationInfo* info_; |
| 69 TypeFeedbackOracle oracle_; | 69 TypeFeedbackOracle oracle_; |
| 70 Store store_; | 70 Store store_; |
| 71 | 71 |
| 72 TypeFeedbackOracle* oracle() { return &oracle_; } | 72 TypeFeedbackOracle* oracle() { return &oracle_; } |
| 73 Zone* zone() const { return info_->zone(); } | |
| 74 | 73 |
| 75 void NarrowType(Expression* e, Bounds b) { | 74 void NarrowType(Expression* e, Bounds b) { |
| 76 e->set_bounds(Bounds::Both(e->bounds(), b, isolate_)); | 75 e->set_bounds(Bounds::Both(e->bounds(), b, zone())); |
| 77 } | 76 } |
| 78 void NarrowLowerType(Expression* e, Handle<Type> t) { | 77 void NarrowLowerType(Expression* e, Type* t) { |
| 79 e->set_bounds(Bounds::NarrowLower(e->bounds(), t, isolate_)); | 78 e->set_bounds(Bounds::NarrowLower(e->bounds(), t, zone())); |
| 80 } | 79 } |
| 81 | 80 |
| 82 Effects EnterEffects() { | 81 Effects EnterEffects() { |
| 83 store_ = store_.Push(); | 82 store_ = store_.Push(); |
| 84 return store_.Top(); | 83 return store_.Top(); |
| 85 } | 84 } |
| 86 void ExitEffects() { store_ = store_.Pop(); } | 85 void ExitEffects() { store_ = store_.Pop(); } |
| 87 | 86 |
| 88 int parameter_index(int index) { return -index - 2; } | 87 int parameter_index(int index) { return -index - 2; } |
| 89 int stack_local_index(int index) { return index; } | 88 int stack_local_index(int index) { return index; } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 102 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); | 101 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
| 103 AST_NODE_LIST(DECLARE_VISIT) | 102 AST_NODE_LIST(DECLARE_VISIT) |
| 104 #undef DECLARE_VISIT | 103 #undef DECLARE_VISIT |
| 105 | 104 |
| 106 DISALLOW_COPY_AND_ASSIGN(AstTyper); | 105 DISALLOW_COPY_AND_ASSIGN(AstTyper); |
| 107 }; | 106 }; |
| 108 | 107 |
| 109 } } // namespace v8::internal | 108 } } // namespace v8::internal |
| 110 | 109 |
| 111 #endif // V8_TYPING_H_ | 110 #endif // V8_TYPING_H_ |
| OLD | NEW |