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 3830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3841 Handle<Map> map, | 3841 Handle<Map> map, |
3842 CompareMapMode mode, | 3842 CompareMapMode mode, |
3843 LEnvironment* env) { | 3843 LEnvironment* env) { |
3844 Label success; | 3844 Label success; |
3845 __ CompareMap(reg, map, &success, mode); | 3845 __ CompareMap(reg, map, &success, mode); |
3846 DeoptimizeIf(not_equal, env); | 3846 DeoptimizeIf(not_equal, env); |
3847 __ bind(&success); | 3847 __ bind(&success); |
3848 } | 3848 } |
3849 | 3849 |
3850 | 3850 |
3851 void LCodeGen::DoCheckMap(LCheckMap* instr) { | 3851 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { |
3852 LOperand* input = instr->InputAt(0); | 3852 LOperand* input = instr->InputAt(0); |
3853 ASSERT(input->IsRegister()); | 3853 ASSERT(input->IsRegister()); |
3854 Register reg = ToRegister(input); | 3854 Register reg = ToRegister(input); |
3855 Handle<Map> map = instr->hydrogen()->map(); | 3855 |
3856 DoCheckMapCommon(reg, map, instr->hydrogen()->mode(), instr->environment()); | 3856 Label success; |
| 3857 SmallMapList* map_set = instr->hydrogen()->map_set(); |
| 3858 for (int i = 0; i < map_set->length() - 1; i++) { |
| 3859 Handle<Map> map = map_set->at(i); |
| 3860 __ CompareMap(reg, map, &success, REQUIRE_EXACT_MAP); |
| 3861 __ j(equal, &success); |
| 3862 } |
| 3863 Handle<Map> map = map_set->last(); |
| 3864 DoCheckMapCommon(reg, map, REQUIRE_EXACT_MAP, instr->environment()); |
| 3865 __ bind(&success); |
3857 } | 3866 } |
3858 | 3867 |
3859 | 3868 |
3860 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { | 3869 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { |
3861 XMMRegister value_reg = ToDoubleRegister(instr->unclamped()); | 3870 XMMRegister value_reg = ToDoubleRegister(instr->unclamped()); |
3862 Register result_reg = ToRegister(instr->result()); | 3871 Register result_reg = ToRegister(instr->result()); |
3863 Register temp_reg = ToRegister(instr->TempAt(0)); | 3872 Register temp_reg = ToRegister(instr->TempAt(0)); |
3864 __ ClampDoubleToUint8(value_reg, xmm0, result_reg, temp_reg); | 3873 __ ClampDoubleToUint8(value_reg, xmm0, result_reg, temp_reg); |
3865 } | 3874 } |
3866 | 3875 |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4637 FixedArray::kHeaderSize - kPointerSize)); | 4646 FixedArray::kHeaderSize - kPointerSize)); |
4638 __ bind(&done); | 4647 __ bind(&done); |
4639 } | 4648 } |
4640 | 4649 |
4641 | 4650 |
4642 #undef __ | 4651 #undef __ |
4643 | 4652 |
4644 } } // namespace v8::internal | 4653 } } // namespace v8::internal |
4645 | 4654 |
4646 #endif // V8_TARGET_ARCH_X64 | 4655 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |