Chromium Code Reviews| 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 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1635 return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize; | 1635 return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize; |
| 1636 } | 1636 } |
| 1637 HGraphBuilder* builder() { return builder_; } | 1637 HGraphBuilder* builder() { return builder_; } |
| 1638 HGraph* graph() { return builder_->graph(); } | 1638 HGraph* graph() { return builder_->graph(); } |
| 1639 int initial_capacity() { | 1639 int initial_capacity() { |
| 1640 STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0); | 1640 STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0); |
| 1641 return JSArray::kPreallocatedArrayElements; | 1641 return JSArray::kPreallocatedArrayElements; |
| 1642 } | 1642 } |
| 1643 | 1643 |
| 1644 HValue* EmitInternalMapCode(); | 1644 HValue* EmitInternalMapCode(); |
| 1645 HValue* EstablishEmptyArrayAllocationSize(); | 1645 HValue* EstablishHeaderAllocationSize(); |
| 1646 HValue* EstablishAllocationSize(HValue* length_node); | |
| 1647 HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity, | 1646 HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity, |
| 1648 HValue* length_field, | 1647 HValue* length_field, |
| 1649 FillMode fill_mode = FILL_WITH_HOLE); | 1648 FillMode fill_mode = FILL_WITH_HOLE); |
| 1650 | 1649 |
| 1651 HGraphBuilder* builder_; | 1650 HGraphBuilder* builder_; |
| 1652 ElementsKind kind_; | 1651 ElementsKind kind_; |
| 1653 AllocationSiteMode mode_; | 1652 AllocationSiteMode mode_; |
| 1654 HValue* allocation_site_payload_; | 1653 HValue* allocation_site_payload_; |
| 1655 HValue* constructor_function_; | 1654 HValue* constructor_function_; |
| 1656 HInnerAllocatedObject* elements_location_; | 1655 HValue* elements_location_; |
| 1657 }; | 1656 }; |
| 1658 | 1657 |
| 1659 HValue* BuildAllocateArrayFromLength(JSArrayBuilder* array_builder, | 1658 HValue* BuildAllocateArrayFromLength(JSArrayBuilder* array_builder, |
| 1660 HValue* length_argument); | 1659 HValue* length_argument); |
| 1660 HValue* BuildCalculateElementsSize(ElementsKind kind, | |
| 1661 HValue* capacity); | |
| 1661 | 1662 |
| 1662 HValue* BuildAllocateElements(ElementsKind kind, | 1663 HValue* BuildAllocateElements(ElementsKind kind, |
| 1663 HValue* capacity); | 1664 HValue* size_in_bytes, |
| 1665 PretenureFlag pretenure); | |
| 1664 | 1666 |
| 1665 void BuildInitializeElementsHeader(HValue* elements, | 1667 void BuildInitializeElementsHeader(HValue* elements, |
| 1666 ElementsKind kind, | 1668 ElementsKind kind, |
| 1667 HValue* capacity); | 1669 HValue* capacity); |
| 1668 | 1670 |
| 1669 HValue* BuildAllocateElementsAndInitializeElementsHeader(ElementsKind kind, | 1671 HValue* BuildAllocateElementsAndInitializeElementsHeader(ElementsKind kind, |
| 1670 HValue* capacity); | 1672 HValue* capacity); |
| 1671 | 1673 |
| 1672 // array must have been allocated with enough room for | 1674 // array must have been allocated with enough room for |
|
Hannes Payer (out of office)
2013/11/21 12:07:19
Can you change "array" to "Array".
Igor Sheludko
2013/11/27 12:52:01
Done.
| |
| 1673 // 1) the JSArray, 2) a AllocationMemento if mode requires it, | 1675 // 1) the JSArray, 2) a AllocationMemento if mode requires it. |
|
Hannes Payer (out of office)
2013/11/21 12:07:19
-instead of "," -> "and"
-an AllocationMemento
Igor Sheludko
2013/11/27 12:52:01
Done.
| |
| 1674 // 3) a FixedArray or FixedDoubleArray. | 1676 // Initially the array elements storage is initialized with empty array. |
| 1675 // A pointer to the Fixed(Double)Array is returned. | 1677 void BuildJSArrayHeader(HValue* array, |
| 1676 HInnerAllocatedObject* BuildJSArrayHeader(HValue* array, | 1678 HValue* array_map, |
| 1677 HValue* array_map, | 1679 AllocationSiteMode mode, |
| 1678 AllocationSiteMode mode, | 1680 ElementsKind elements_kind, |
| 1679 ElementsKind elements_kind, | 1681 HValue* allocation_site_payload, |
| 1680 HValue* allocation_site_payload, | 1682 HValue* length_field); |
| 1681 HValue* length_field); | |
| 1682 | 1683 |
| 1683 HValue* BuildGrowElementsCapacity(HValue* object, | 1684 HValue* BuildGrowElementsCapacity(HValue* object, |
| 1684 HValue* elements, | 1685 HValue* elements, |
| 1685 ElementsKind kind, | 1686 ElementsKind kind, |
| 1686 ElementsKind new_kind, | 1687 ElementsKind new_kind, |
| 1687 HValue* length, | 1688 HValue* length, |
| 1688 HValue* new_capacity); | 1689 HValue* new_capacity); |
| 1689 | 1690 |
| 1690 void BuildFillElementsWithHole(HValue* elements, | 1691 void BuildFillElementsWithHole(HValue* elements, |
| 1691 ElementsKind elements_kind, | 1692 ElementsKind elements_kind, |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2578 } | 2579 } |
| 2579 | 2580 |
| 2580 private: | 2581 private: |
| 2581 HGraphBuilder* builder_; | 2582 HGraphBuilder* builder_; |
| 2582 }; | 2583 }; |
| 2583 | 2584 |
| 2584 | 2585 |
| 2585 } } // namespace v8::internal | 2586 } } // namespace v8::internal |
| 2586 | 2587 |
| 2587 #endif // V8_HYDROGEN_H_ | 2588 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |