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 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1759 HConstant(Context::ARRAY_FUNCTION_INDEX, Representation::Integer32())); | 1759 HConstant(Context::ARRAY_FUNCTION_INDEX, Representation::Integer32())); |
1760 | 1760 |
1761 return AddInstruction(new (zone()) | 1761 return AddInstruction(new (zone()) |
1762 HLoadKeyed(native_context, index, NULL, FAST_ELEMENTS)); | 1762 HLoadKeyed(native_context, index, NULL, FAST_ELEMENTS)); |
1763 } | 1763 } |
1764 | 1764 |
1765 | 1765 |
1766 HGraphBuilder::JSArrayBuilder::JSArrayBuilder(HGraphBuilder* builder, | 1766 HGraphBuilder::JSArrayBuilder::JSArrayBuilder(HGraphBuilder* builder, |
1767 ElementsKind kind, | 1767 ElementsKind kind, |
1768 HValue* allocation_site_payload, | 1768 HValue* allocation_site_payload, |
1769 AllocationSiteMode mode) : | 1769 bool disable_allocation_sites) : |
1770 builder_(builder), | 1770 builder_(builder), |
1771 kind_(kind), | 1771 kind_(kind), |
1772 allocation_site_payload_(allocation_site_payload) { | 1772 allocation_site_payload_(allocation_site_payload) { |
1773 if (mode == DONT_TRACK_ALLOCATION_SITE) { | 1773 mode_ = disable_allocation_sites |
1774 mode_ = mode; | 1774 ? DONT_TRACK_ALLOCATION_SITE |
1775 } else { | 1775 : AllocationSiteInfo::GetMode(kind); |
1776 mode_ = AllocationSiteInfo::GetMode(kind); | |
1777 } | |
1778 } | 1776 } |
1779 | 1777 |
1780 | 1778 |
1781 HValue* HGraphBuilder::JSArrayBuilder::EmitMapCode(HValue* context) { | 1779 HValue* HGraphBuilder::JSArrayBuilder::EmitMapCode(HValue* context) { |
1782 HInstruction* native_context = builder()->BuildGetNativeContext(context); | 1780 HInstruction* native_context = builder()->BuildGetNativeContext(context); |
1783 | 1781 |
1784 HInstruction* index = builder()->AddInstruction(new(zone()) | 1782 HInstruction* index = builder()->AddInstruction(new(zone()) |
1785 HConstant(Context::JS_ARRAY_MAPS_INDEX, Representation::Integer32())); | 1783 HConstant(Context::JS_ARRAY_MAPS_INDEX, Representation::Integer32())); |
1786 | 1784 |
1787 HInstruction* map_array = builder()->AddInstruction(new(zone()) | 1785 HInstruction* map_array = builder()->AddInstruction(new(zone()) |
(...skipping 9710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11498 } | 11496 } |
11499 } | 11497 } |
11500 | 11498 |
11501 #ifdef DEBUG | 11499 #ifdef DEBUG |
11502 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11500 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
11503 if (allocator_ != NULL) allocator_->Verify(); | 11501 if (allocator_ != NULL) allocator_->Verify(); |
11504 #endif | 11502 #endif |
11505 } | 11503 } |
11506 | 11504 |
11507 } } // namespace v8::internal | 11505 } } // namespace v8::internal |
OLD | NEW |