OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 __ b(eq, false_label); | 1704 __ b(eq, false_label); |
1705 | 1705 |
1706 __ CompareObjectType(input, scratch, scratch, TestType(instr->hydrogen())); | 1706 __ CompareObjectType(input, scratch, scratch, TestType(instr->hydrogen())); |
1707 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen())); | 1707 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen())); |
1708 } | 1708 } |
1709 | 1709 |
1710 | 1710 |
1711 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { | 1711 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { |
1712 Register input = ToRegister(instr->InputAt(0)); | 1712 Register input = ToRegister(instr->InputAt(0)); |
1713 Register result = ToRegister(instr->result()); | 1713 Register result = ToRegister(instr->result()); |
1714 Register scratch = scratch0(); | |
1715 | 1714 |
1716 __ ldr(scratch, FieldMemOperand(input, String::kHashFieldOffset)); | 1715 if (FLAG_debug_code) { |
1717 __ IndexFromHash(scratch, result); | 1716 __ AbortIfNotString(input); |
| 1717 } |
| 1718 |
| 1719 __ ldr(result, FieldMemOperand(input, String::kHashFieldOffset)); |
| 1720 __ IndexFromHash(result, result); |
1718 } | 1721 } |
1719 | 1722 |
1720 | 1723 |
1721 void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) { | 1724 void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) { |
1722 Register input = ToRegister(instr->InputAt(0)); | 1725 Register input = ToRegister(instr->InputAt(0)); |
1723 Register result = ToRegister(instr->result()); | 1726 Register result = ToRegister(instr->result()); |
1724 Register scratch = scratch0(); | 1727 Register scratch = scratch0(); |
1725 | 1728 |
1726 ASSERT(instr->hydrogen()->value()->representation().IsTagged()); | 1729 ASSERT(instr->hydrogen()->value()->representation().IsTagged()); |
1727 __ ldr(scratch, | 1730 __ ldr(scratch, |
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3847 ASSERT(!environment->HasBeenRegistered()); | 3850 ASSERT(!environment->HasBeenRegistered()); |
3848 RegisterEnvironmentForDeoptimization(environment); | 3851 RegisterEnvironmentForDeoptimization(environment); |
3849 ASSERT(osr_pc_offset_ == -1); | 3852 ASSERT(osr_pc_offset_ == -1); |
3850 osr_pc_offset_ = masm()->pc_offset(); | 3853 osr_pc_offset_ = masm()->pc_offset(); |
3851 } | 3854 } |
3852 | 3855 |
3853 | 3856 |
3854 #undef __ | 3857 #undef __ |
3855 | 3858 |
3856 } } // namespace v8::internal | 3859 } } // namespace v8::internal |
OLD | NEW |