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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 LoopBuilder builder(this, | 635 LoopBuilder builder(this, |
636 context(), | 636 context(), |
637 LoopBuilder::kPostIncrement); | 637 LoopBuilder::kPostIncrement); |
638 HValue* start = graph()->GetConstant0(); | 638 HValue* start = graph()->GetConstant0(); |
639 HValue* key = builder.BeginBody(start, length, Token::LT); | 639 HValue* key = builder.BeginBody(start, length, Token::LT); |
640 HInstruction* argument_elements = AddInstruction( | 640 HInstruction* argument_elements = AddInstruction( |
641 new(zone()) HArgumentsElements(false)); | 641 new(zone()) HArgumentsElements(false)); |
642 HInstruction* argument = AddInstruction(new(zone()) HAccessArgumentsAt( | 642 HInstruction* argument = AddInstruction(new(zone()) HAccessArgumentsAt( |
643 argument_elements, length, key)); | 643 argument_elements, length, key)); |
644 | 644 |
645 // Checks to prevent incompatible stores | |
646 if (IsFastSmiElementsKind(kind)) { | |
647 AddInstruction(new(zone()) HCheckSmi(argument)); | |
648 } | |
649 | |
650 AddInstruction(new(zone()) HStoreKeyed(elements, key, argument, kind)); | 645 AddInstruction(new(zone()) HStoreKeyed(elements, key, argument, kind)); |
651 builder.EndBody(); | 646 builder.EndBody(); |
652 return new_object; | 647 return new_object; |
653 } | 648 } |
654 | 649 |
655 | 650 |
656 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { | 651 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { |
657 return DoGenerateCode(this); | 652 return DoGenerateCode(this); |
658 } | 653 } |
659 | 654 |
(...skipping 17 matching lines...) Expand all Loading... |
677 ? graph()->GetConstant1() | 672 ? graph()->GetConstant1() |
678 : graph()->GetConstantUndefined(); | 673 : graph()->GetConstantUndefined(); |
679 } | 674 } |
680 | 675 |
681 | 676 |
682 Handle<Code> CompareNilICStub::GenerateCode() { | 677 Handle<Code> CompareNilICStub::GenerateCode() { |
683 return DoGenerateCode(this); | 678 return DoGenerateCode(this); |
684 } | 679 } |
685 | 680 |
686 } } // namespace v8::internal | 681 } } // namespace v8::internal |
OLD | NEW |