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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 | 492 |
493 // Nothing to do, just change the map. | 493 // Nothing to do, just change the map. |
494 | 494 |
495 if_builder.Else(); | 495 if_builder.Else(); |
496 | 496 |
497 HInstruction* elements = AddLoadElements(js_array); | 497 HInstruction* elements = AddLoadElements(js_array); |
498 | 498 |
499 HInstruction* elements_length = | 499 HInstruction* elements_length = |
500 AddInstruction(new(zone) HFixedArrayBaseLength(elements)); | 500 AddInstruction(new(zone) HFixedArrayBaseLength(elements)); |
501 | 501 |
502 HValue* new_elements = | 502 HValue* new_elements = BuildAllocateElementsAndInitializeElementsHeader( |
503 BuildAllocateAndInitializeElements(context(), to_kind, elements_length); | 503 context(), to_kind, elements_length); |
504 | 504 |
505 BuildCopyElements(context(), elements, | 505 BuildCopyElements(context(), elements, |
506 casted_stub()->from_kind(), new_elements, | 506 casted_stub()->from_kind(), new_elements, |
507 to_kind, array_length, elements_length); | 507 to_kind, array_length, elements_length); |
508 | 508 |
509 AddStore(js_array, HObjectAccess::ForElementsPointer(), new_elements); | 509 AddStore(js_array, HObjectAccess::ForElementsPointer(), new_elements); |
510 | 510 |
511 if_builder.End(); | 511 if_builder.End(); |
512 | 512 |
513 AddStore(js_array, HObjectAccess::ForMap(), map); | 513 AddStore(js_array, HObjectAccess::ForMap(), map); |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 ? graph()->GetConstant1() | 670 ? graph()->GetConstant1() |
671 : graph()->GetConstantUndefined(); | 671 : graph()->GetConstantUndefined(); |
672 } | 672 } |
673 | 673 |
674 | 674 |
675 Handle<Code> CompareNilICStub::GenerateCode() { | 675 Handle<Code> CompareNilICStub::GenerateCode() { |
676 return DoGenerateCode(this); | 676 return DoGenerateCode(this); |
677 } | 677 } |
678 | 678 |
679 } } // namespace v8::internal | 679 } } // namespace v8::internal |
OLD | NEW |