| 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 4220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4231 Handle<Map> map, | 4231 Handle<Map> map, |
| 4232 CompareMapMode mode, | 4232 CompareMapMode mode, |
| 4233 LEnvironment* env) { | 4233 LEnvironment* env) { |
| 4234 Label success; | 4234 Label success; |
| 4235 __ CompareMap(reg, scratch, map, &success, mode); | 4235 __ CompareMap(reg, scratch, map, &success, mode); |
| 4236 DeoptimizeIf(ne, env); | 4236 DeoptimizeIf(ne, env); |
| 4237 __ bind(&success); | 4237 __ bind(&success); |
| 4238 } | 4238 } |
| 4239 | 4239 |
| 4240 | 4240 |
| 4241 void LCodeGen::DoCheckMap(LCheckMap* instr) { | 4241 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { |
| 4242 Register scratch = scratch0(); | 4242 Register scratch = scratch0(); |
| 4243 LOperand* input = instr->InputAt(0); | 4243 LOperand* input = instr->InputAt(0); |
| 4244 ASSERT(input->IsRegister()); | 4244 ASSERT(input->IsRegister()); |
| 4245 Register reg = ToRegister(input); | 4245 Register reg = ToRegister(input); |
| 4246 Handle<Map> map = instr->hydrogen()->map(); | 4246 |
| 4247 DoCheckMapCommon(reg, scratch, map, instr->hydrogen()->mode(), | 4247 Label success; |
| 4248 instr->environment()); | 4248 SmallMapList* map_set = instr->hydrogen()->map_set(); |
| 4249 for (int i = 0; i < map_set->length() - 1; i++) { |
| 4250 Handle<Map> map = map_set->at(i); |
| 4251 __ CompareMap(reg, scratch, map, &success, REQUIRE_EXACT_MAP); |
| 4252 __ b(eq, &success); |
| 4253 } |
| 4254 Handle<Map> map = map_set->last(); |
| 4255 DoCheckMapCommon(reg, scratch, map, REQUIRE_EXACT_MAP, instr->environment()); |
| 4256 __ bind(&success); |
| 4249 } | 4257 } |
| 4250 | 4258 |
| 4251 | 4259 |
| 4252 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { | 4260 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { |
| 4253 DoubleRegister value_reg = ToDoubleRegister(instr->unclamped()); | 4261 DoubleRegister value_reg = ToDoubleRegister(instr->unclamped()); |
| 4254 Register result_reg = ToRegister(instr->result()); | 4262 Register result_reg = ToRegister(instr->result()); |
| 4255 DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0)); | 4263 DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0)); |
| 4256 __ ClampDoubleToUint8(result_reg, value_reg, temp_reg); | 4264 __ ClampDoubleToUint8(result_reg, value_reg, temp_reg); |
| 4257 } | 4265 } |
| 4258 | 4266 |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5012 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5020 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 5013 __ ldr(result, FieldMemOperand(scratch, | 5021 __ ldr(result, FieldMemOperand(scratch, |
| 5014 FixedArray::kHeaderSize - kPointerSize)); | 5022 FixedArray::kHeaderSize - kPointerSize)); |
| 5015 __ bind(&done); | 5023 __ bind(&done); |
| 5016 } | 5024 } |
| 5017 | 5025 |
| 5018 | 5026 |
| 5019 #undef __ | 5027 #undef __ |
| 5020 | 5028 |
| 5021 } } // namespace v8::internal | 5029 } } // namespace v8::internal |
| OLD | NEW |