OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 Map* updated = map->CurrentMapForDeprecated(); | 284 Map* updated = map->CurrentMapForDeprecated(); |
285 if (updated == NULL) return; | 285 if (updated == NULL) return; |
286 map = Handle<Map>(updated); | 286 map = Handle<Map>(updated); |
287 for (int i = 0; i < length(); ++i) { | 287 for (int i = 0; i < length(); ++i) { |
288 if (at(i).is_identical_to(map)) return; | 288 if (at(i).is_identical_to(map)) return; |
289 } | 289 } |
290 Add(map, zone); | 290 Add(map, zone); |
291 } | 291 } |
292 | 292 |
293 void Add(Handle<Map> handle, Zone* zone) { | 293 void Add(Handle<Map> handle, Zone* zone) { |
| 294 ASSERT(!handle->is_deprecated()); |
294 list_.Add(handle.location(), zone); | 295 list_.Add(handle.location(), zone); |
295 } | 296 } |
296 | 297 |
297 Handle<Map> at(int i) const { | 298 Handle<Map> at(int i) const { |
298 return Handle<Map>(list_.at(i)); | 299 return Handle<Map>(list_.at(i)); |
299 } | 300 } |
300 | 301 |
301 Handle<Map> first() const { return at(0); } | 302 Handle<Map> first() const { return at(0); } |
302 Handle<Map> last() const { return at(length() - 1); } | 303 Handle<Map> last() const { return at(length() - 1); } |
303 | 304 |
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1819 Handle<String> name_; | 1820 Handle<String> name_; |
1820 const Runtime::Function* function_; | 1821 const Runtime::Function* function_; |
1821 ZoneList<Expression*>* arguments_; | 1822 ZoneList<Expression*>* arguments_; |
1822 }; | 1823 }; |
1823 | 1824 |
1824 | 1825 |
1825 class UnaryOperation: public Expression { | 1826 class UnaryOperation: public Expression { |
1826 public: | 1827 public: |
1827 DECLARE_NODE_TYPE(UnaryOperation) | 1828 DECLARE_NODE_TYPE(UnaryOperation) |
1828 | 1829 |
| 1830 virtual bool ResultOverwriteAllowed(); |
| 1831 |
1829 Token::Value op() const { return op_; } | 1832 Token::Value op() const { return op_; } |
1830 Expression* expression() const { return expression_; } | 1833 Expression* expression() const { return expression_; } |
1831 virtual int position() const { return pos_; } | 1834 virtual int position() const { return pos_; } |
1832 | 1835 |
1833 BailoutId MaterializeTrueId() { return materialize_true_id_; } | 1836 BailoutId MaterializeTrueId() { return materialize_true_id_; } |
1834 BailoutId MaterializeFalseId() { return materialize_false_id_; } | 1837 BailoutId MaterializeFalseId() { return materialize_false_id_; } |
1835 | 1838 |
| 1839 TypeFeedbackId UnaryOperationFeedbackId() const { return reuse(id()); } |
| 1840 |
1836 virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); | 1841 virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); |
1837 | 1842 |
1838 protected: | 1843 protected: |
1839 UnaryOperation(Isolate* isolate, | 1844 UnaryOperation(Isolate* isolate, |
1840 Token::Value op, | 1845 Token::Value op, |
1841 Expression* expression, | 1846 Expression* expression, |
1842 int pos) | 1847 int pos) |
1843 : Expression(isolate), | 1848 : Expression(isolate), |
1844 op_(op), | 1849 op_(op), |
1845 expression_(expression), | 1850 expression_(expression), |
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3204 private: | 3209 private: |
3205 Isolate* isolate_; | 3210 Isolate* isolate_; |
3206 Zone* zone_; | 3211 Zone* zone_; |
3207 Visitor visitor_; | 3212 Visitor visitor_; |
3208 }; | 3213 }; |
3209 | 3214 |
3210 | 3215 |
3211 } } // namespace v8::internal | 3216 } } // namespace v8::internal |
3212 | 3217 |
3213 #endif // V8_AST_H_ | 3218 #endif // V8_AST_H_ |
OLD | NEW |