| 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); | 1586 HValue* constructor_function = NULL); |
| 1587 | 1587 |
| 1588 HValue* AllocateEmptyArray(); | 1588 HValue* AllocateEmptyArray(); |
| 1589 HValue* AllocateArray(HValue* capacity, HValue* length_field, | 1589 HValue* AllocateArray(HValue* capacity, HValue* length_field, |
| 1590 bool fill_with_hole); | 1590 bool fill_with_hole); |
| 1591 HValue* GetElementsLocation() { return elements_location_; } | 1591 HValue* GetElementsLocation() { return elements_location_; } |
| 1592 HValue* EmitMapCode(); |
| 1592 | 1593 |
| 1593 private: | 1594 private: |
| 1594 Zone* zone() const { return builder_->zone(); } | 1595 Zone* zone() const { return builder_->zone(); } |
| 1595 int elements_size() const { | 1596 int elements_size() const { |
| 1596 return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize; | 1597 return IsFastDoubleElementsKind(kind_) ? kDoubleSize : kPointerSize; |
| 1597 } | 1598 } |
| 1598 HGraphBuilder* builder() { return builder_; } | 1599 HGraphBuilder* builder() { return builder_; } |
| 1599 HGraph* graph() { return builder_->graph(); } | 1600 HGraph* graph() { return builder_->graph(); } |
| 1600 int initial_capacity() { | 1601 int initial_capacity() { |
| 1601 STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0); | 1602 STATIC_ASSERT(JSArray::kPreallocatedArrayElements > 0); |
| 1602 return JSArray::kPreallocatedArrayElements; | 1603 return JSArray::kPreallocatedArrayElements; |
| 1603 } | 1604 } |
| 1604 | 1605 |
| 1605 HValue* EmitMapCode(); | |
| 1606 HValue* EmitInternalMapCode(); | 1606 HValue* EmitInternalMapCode(); |
| 1607 HValue* EstablishEmptyArrayAllocationSize(); | 1607 HValue* EstablishEmptyArrayAllocationSize(); |
| 1608 HValue* EstablishAllocationSize(HValue* length_node); | 1608 HValue* EstablishAllocationSize(HValue* length_node); |
| 1609 HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity, | 1609 HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity, |
| 1610 HValue* length_field, bool fill_with_hole); | 1610 HValue* length_field, bool fill_with_hole); |
| 1611 | 1611 |
| 1612 HGraphBuilder* builder_; | 1612 HGraphBuilder* builder_; |
| 1613 ElementsKind kind_; | 1613 ElementsKind kind_; |
| 1614 AllocationSiteMode mode_; | 1614 AllocationSiteMode mode_; |
| 1615 HValue* allocation_site_payload_; | 1615 HValue* allocation_site_payload_; |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2522 } | 2522 } |
| 2523 | 2523 |
| 2524 private: | 2524 private: |
| 2525 HGraphBuilder* builder_; | 2525 HGraphBuilder* builder_; |
| 2526 }; | 2526 }; |
| 2527 | 2527 |
| 2528 | 2528 |
| 2529 } } // namespace v8::internal | 2529 } } // namespace v8::internal |
| 2530 | 2530 |
| 2531 #endif // V8_HYDROGEN_H_ | 2531 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |