| 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 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 class JSArrayBuilder V8_FINAL { | 1576 class JSArrayBuilder V8_FINAL { |
| 1577 public: | 1577 public: |
| 1578 JSArrayBuilder(HGraphBuilder* builder, | 1578 JSArrayBuilder(HGraphBuilder* builder, |
| 1579 ElementsKind kind, | 1579 ElementsKind kind, |
| 1580 HValue* allocation_site_payload, | 1580 HValue* allocation_site_payload, |
| 1581 HValue* constructor_function, | 1581 HValue* constructor_function, |
| 1582 AllocationSiteOverrideMode override_mode); | 1582 AllocationSiteOverrideMode override_mode); |
| 1583 | 1583 |
| 1584 JSArrayBuilder(HGraphBuilder* builder, | 1584 JSArrayBuilder(HGraphBuilder* builder, |
| 1585 ElementsKind kind, | 1585 ElementsKind kind, |
| 1586 HValue* constructor_function = NULL); | 1586 HValue* constructor_function); |
| 1587 | 1587 |
| 1588 enum FillMode { | 1588 enum FillMode { |
| 1589 DONT_FILL_WITH_HOLE, | 1589 DONT_FILL_WITH_HOLE, |
| 1590 FILL_WITH_HOLE | 1590 FILL_WITH_HOLE |
| 1591 }; | 1591 }; |
| 1592 | 1592 |
| 1593 ElementsKind kind() { return kind_; } | 1593 ElementsKind kind() { return kind_; } |
| 1594 | 1594 |
| 1595 HValue* AllocateEmptyArray(); | 1595 HValue* AllocateEmptyArray(); |
| 1596 HValue* AllocateArray(HValue* capacity, HValue* length_field, | 1596 HValue* AllocateArray(HValue* capacity, HValue* length_field, |
| 1597 FillMode fill_mode = FILL_WITH_HOLE); | 1597 FillMode fill_mode = FILL_WITH_HOLE); |
| 1598 HValue* GetElementsLocation() { return elements_location_; } | 1598 HValue* GetElementsLocation() { return elements_location_; } |
| 1599 HValue* EmitMapCode(); | |
| 1600 | 1599 |
| 1601 private: | 1600 private: |
| 1602 Zone* zone() const { return builder_->zone(); } | 1601 Zone* zone() const { return builder_->zone(); } |
| 1603 int elements_size() const { | 1602 int elements_size() const { |
| 1604 return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize; | 1603 return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize; |
| 1605 } | 1604 } |
| 1606 HGraphBuilder* builder() { return builder_; } | 1605 HGraphBuilder* builder() { return builder_; } |
| 1607 HGraph* graph() { return builder_->graph(); } | 1606 HGraph* graph() { return builder_->graph(); } |
| 1608 int initial_capacity() { | 1607 int initial_capacity() { |
| 1609 STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0); | 1608 STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0); |
| 1610 return JSArray::kPreallocatedArrayElements; | 1609 return JSArray::kPreallocatedArrayElements; |
| 1611 } | 1610 } |
| 1612 | 1611 |
| 1612 HValue* EmitMapCode(); |
| 1613 HValue* EmitInternalMapCode(); | 1613 HValue* EmitInternalMapCode(); |
| 1614 HValue* EstablishEmptyArrayAllocationSize(); | 1614 HValue* EstablishEmptyArrayAllocationSize(); |
| 1615 HValue* EstablishAllocationSize(HValue* length_node); | 1615 HValue* EstablishAllocationSize(HValue* length_node); |
| 1616 HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity, | 1616 HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity, |
| 1617 HValue* length_field, | 1617 HValue* length_field, |
| 1618 FillMode fill_mode = FILL_WITH_HOLE); | 1618 FillMode fill_mode = FILL_WITH_HOLE); |
| 1619 | 1619 |
| 1620 HGraphBuilder* builder_; | 1620 HGraphBuilder* builder_; |
| 1621 ElementsKind kind_; | 1621 ElementsKind kind_; |
| 1622 AllocationSiteMode mode_; | 1622 AllocationSiteMode mode_; |
| (...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 } | 2536 } |
| 2537 | 2537 |
| 2538 private: | 2538 private: |
| 2539 HGraphBuilder* builder_; | 2539 HGraphBuilder* builder_; |
| 2540 }; | 2540 }; |
| 2541 | 2541 |
| 2542 | 2542 |
| 2543 } } // namespace v8::internal | 2543 } } // namespace v8::internal |
| 2544 | 2544 |
| 2545 #endif // V8_HYDROGEN_H_ | 2545 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |