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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 // the array because they aren't compatible with a smi array. | 756 // the array because they aren't compatible with a smi array. |
757 // If it's a double array, no problem, and if it's fast then no | 757 // If it's a double array, no problem, and if it's fast then no |
758 // problem either because doubles are boxed. | 758 // problem either because doubles are boxed. |
759 // | 759 // |
760 // TODO(mvstanton): consider an instruction to memset fill the array | 760 // TODO(mvstanton): consider an instruction to memset fill the array |
761 // with zero in this case instead. | 761 // with zero in this case instead. |
762 JSArrayBuilder::FillMode fill_mode = IsFastSmiElementsKind(kind) | 762 JSArrayBuilder::FillMode fill_mode = IsFastSmiElementsKind(kind) |
763 ? JSArrayBuilder::FILL_WITH_HOLE | 763 ? JSArrayBuilder::FILL_WITH_HOLE |
764 : JSArrayBuilder::DONT_FILL_WITH_HOLE; | 764 : JSArrayBuilder::DONT_FILL_WITH_HOLE; |
765 HValue* new_object = array_builder->AllocateArray(checked_length, | 765 HValue* new_object = array_builder->AllocateArray(checked_length, |
| 766 max_alloc_length, |
766 checked_length, | 767 checked_length, |
767 fill_mode); | 768 fill_mode); |
768 HValue* elements = array_builder->GetElementsLocation(); | 769 HValue* elements = array_builder->GetElementsLocation(); |
769 ASSERT(elements != NULL); | 770 ASSERT(elements != NULL); |
770 | 771 |
771 // Now populate the elements correctly. | 772 // Now populate the elements correctly. |
772 LoopBuilder builder(this, | 773 LoopBuilder builder(this, |
773 context(), | 774 context(), |
774 LoopBuilder::kPostIncrement); | 775 LoopBuilder::kPostIncrement); |
775 HValue* start = graph()->GetConstant0(); | 776 HValue* start = graph()->GetConstant0(); |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 return BuildUncheckedDictionaryElementLoad(receiver, key); | 1347 return BuildUncheckedDictionaryElementLoad(receiver, key); |
1347 } | 1348 } |
1348 | 1349 |
1349 | 1350 |
1350 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { | 1351 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { |
1351 return DoGenerateCode(isolate, this); | 1352 return DoGenerateCode(isolate, this); |
1352 } | 1353 } |
1353 | 1354 |
1354 | 1355 |
1355 } } // namespace v8::internal | 1356 } } // namespace v8::internal |
OLD | NEW |