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 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 ZoneList<Expression*>* values() const { return values_; } | 1597 ZoneList<Expression*>* values() const { return values_; } |
1598 | 1598 |
1599 // Return an AST id for an element that is used in simulate instructions. | 1599 // Return an AST id for an element that is used in simulate instructions. |
1600 BailoutId GetIdForElement(int i) { | 1600 BailoutId GetIdForElement(int i) { |
1601 return BailoutId(first_element_id_.ToInt() + i); | 1601 return BailoutId(first_element_id_.ToInt() + i); |
1602 } | 1602 } |
1603 | 1603 |
1604 // Populate the constant elements fixed array. | 1604 // Populate the constant elements fixed array. |
1605 void BuildConstantElements(Isolate* isolate); | 1605 void BuildConstantElements(Isolate* isolate); |
1606 | 1606 |
| 1607 enum Flags { |
| 1608 kNoFlags = 0, |
| 1609 kShallowElements = 1, |
| 1610 kDisableMementos = 1 << 1 |
| 1611 }; |
| 1612 |
1607 protected: | 1613 protected: |
1608 ArrayLiteral(Isolate* isolate, | 1614 ArrayLiteral(Isolate* isolate, |
1609 ZoneList<Expression*>* values, | 1615 ZoneList<Expression*>* values, |
1610 int literal_index, | 1616 int literal_index, |
1611 int pos) | 1617 int pos) |
1612 : MaterializedLiteral(isolate, literal_index, pos), | 1618 : MaterializedLiteral(isolate, literal_index, pos), |
1613 values_(values), | 1619 values_(values), |
1614 first_element_id_(ReserveIdRange(isolate, values->length())) {} | 1620 first_element_id_(ReserveIdRange(isolate, values->length())) {} |
1615 | 1621 |
1616 private: | 1622 private: |
(...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3285 private: | 3291 private: |
3286 Isolate* isolate_; | 3292 Isolate* isolate_; |
3287 Zone* zone_; | 3293 Zone* zone_; |
3288 Visitor visitor_; | 3294 Visitor visitor_; |
3289 }; | 3295 }; |
3290 | 3296 |
3291 | 3297 |
3292 } } // namespace v8::internal | 3298 } } // namespace v8::internal |
3293 | 3299 |
3294 #endif // V8_AST_H_ | 3300 #endif // V8_AST_H_ |
OLD | NEW |