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 4816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4827 DeoptimizeIf(ne, instr->environment()); | 4827 DeoptimizeIf(ne, instr->environment()); |
4828 } | 4828 } |
4829 | 4829 |
4830 | 4830 |
4831 void LCodeGen::DoCheckMapCommon(Register reg, | 4831 void LCodeGen::DoCheckMapCommon(Register reg, |
4832 Register scratch, | 4832 Register scratch, |
4833 Handle<Map> map, | 4833 Handle<Map> map, |
4834 CompareMapMode mode, | 4834 CompareMapMode mode, |
4835 LEnvironment* env) { | 4835 LEnvironment* env) { |
4836 Label success; | 4836 Label success; |
4837 __ CompareMap(reg, scratch, map, &success, mode); | 4837 __ CompareMap(reg, scratch, map, &success, mode); |
danno
2012/11/07 22:42:41
Why not pass in the map register here, too (to avo
| |
4838 DeoptimizeIf(ne, env); | 4838 DeoptimizeIf(ne, env); |
4839 __ bind(&success); | 4839 __ bind(&success); |
4840 } | 4840 } |
4841 | 4841 |
4842 | 4842 |
4843 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { | 4843 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { |
4844 Register scratch = scratch0(); | 4844 Register scratch = scratch0(); |
4845 LOperand* input = instr->value(); | 4845 LOperand* input = instr->value(); |
4846 ASSERT(input->IsRegister()); | 4846 ASSERT(input->IsRegister()); |
4847 Register reg = ToRegister(input); | 4847 Register reg = ToRegister(input); |
4848 | 4848 |
4849 Label success; | 4849 Label success; |
4850 SmallMapList* map_set = instr->hydrogen()->map_set(); | 4850 SmallMapList* map_set = instr->hydrogen()->map_set(); |
4851 __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset)); | |
4851 for (int i = 0; i < map_set->length() - 1; i++) { | 4852 for (int i = 0; i < map_set->length() - 1; i++) { |
4852 Handle<Map> map = map_set->at(i); | 4853 Handle<Map> map = map_set->at(i); |
4853 __ CompareMap(reg, scratch, map, &success, REQUIRE_EXACT_MAP); | 4854 __ CompareMap(scratch, map, &success, REQUIRE_EXACT_MAP); |
4854 __ b(eq, &success); | 4855 __ b(eq, &success); |
4855 } | 4856 } |
4856 Handle<Map> map = map_set->last(); | 4857 Handle<Map> map = map_set->last(); |
4857 DoCheckMapCommon(reg, scratch, map, REQUIRE_EXACT_MAP, instr->environment()); | 4858 DoCheckMapCommon(reg, scratch, map, REQUIRE_EXACT_MAP, instr->environment()); |
4858 __ bind(&success); | 4859 __ bind(&success); |
4859 } | 4860 } |
4860 | 4861 |
4861 | 4862 |
4862 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { | 4863 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { |
4863 DoubleRegister value_reg = ToDoubleRegister(instr->unclamped()); | 4864 DoubleRegister value_reg = ToDoubleRegister(instr->unclamped()); |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5680 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5681 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
5681 __ ldr(result, FieldMemOperand(scratch, | 5682 __ ldr(result, FieldMemOperand(scratch, |
5682 FixedArray::kHeaderSize - kPointerSize)); | 5683 FixedArray::kHeaderSize - kPointerSize)); |
5683 __ bind(&done); | 5684 __ bind(&done); |
5684 } | 5685 } |
5685 | 5686 |
5686 | 5687 |
5687 #undef __ | 5688 #undef __ |
5688 | 5689 |
5689 } } // namespace v8::internal | 5690 } } // namespace v8::internal |
OLD | NEW |