| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 Operand index = ToOperand32I(instr->index()); | 1412 Operand index = ToOperand32I(instr->index()); |
| 1413 // There are two words between the frame pointer and the last arguments. | 1413 // There are two words between the frame pointer and the last arguments. |
| 1414 // Subtracting from length accounts for only one, so we add one more. | 1414 // Subtracting from length accounts for only one, so we add one more. |
| 1415 __ Sub(temp, length, index); | 1415 __ Sub(temp, length, index); |
| 1416 __ Add(temp, temp, 1); | 1416 __ Add(temp, temp, 1); |
| 1417 __ Ldr(result, MemOperand(arguments, temp, UXTW, kPointerSizeLog2)); | 1417 __ Ldr(result, MemOperand(arguments, temp, UXTW, kPointerSizeLog2)); |
| 1418 } | 1418 } |
| 1419 } | 1419 } |
| 1420 | 1420 |
| 1421 | 1421 |
| 1422 void LCodeGen::DoAddE(LAddE* instr) { |
| 1423 Register result = ToRegister(instr->result()); |
| 1424 Register left = ToRegister(instr->left()); |
| 1425 Operand right = (instr->right()->IsConstantOperand()) |
| 1426 ? ToInteger32(LConstantOperand::cast(instr->right())) |
| 1427 : Operand(ToRegister32(instr->right()), SXTW); |
| 1428 |
| 1429 ASSERT(!instr->hydrogen()->CheckFlag(HValue::kCanOverflow)); |
| 1430 __ Add(result, left, right); |
| 1431 } |
| 1432 |
| 1433 |
| 1422 void LCodeGen::DoAddI(LAddI* instr) { | 1434 void LCodeGen::DoAddI(LAddI* instr) { |
| 1423 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); | 1435 bool can_overflow = instr->hydrogen()->CheckFlag(HValue::kCanOverflow); |
| 1424 Register result = ToRegister32(instr->result()); | 1436 Register result = ToRegister32(instr->result()); |
| 1425 Register left = ToRegister32(instr->left()); | 1437 Register left = ToRegister32(instr->left()); |
| 1426 Operand right = ToOperand32I(instr->right()); | 1438 Operand right = ToOperand32I(instr->right()); |
| 1427 if (can_overflow) { | 1439 if (can_overflow) { |
| 1428 __ Adds(result, left, right); | 1440 __ Adds(result, left, right); |
| 1429 DeoptimizeIf(vs, instr->environment()); | 1441 DeoptimizeIf(vs, instr->environment()); |
| 1430 } else { | 1442 } else { |
| 1431 __ Add(result, left, right); | 1443 __ Add(result, left, right); |
| (...skipping 4241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5673 __ Bind(&out_of_object); | 5685 __ Bind(&out_of_object); |
| 5674 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5686 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5675 // Index is equal to negated out of object property index plus 1. | 5687 // Index is equal to negated out of object property index plus 1. |
| 5676 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5688 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5677 __ Ldr(result, FieldMemOperand(result, | 5689 __ Ldr(result, FieldMemOperand(result, |
| 5678 FixedArray::kHeaderSize - kPointerSize)); | 5690 FixedArray::kHeaderSize - kPointerSize)); |
| 5679 __ Bind(&done); | 5691 __ Bind(&done); |
| 5680 } | 5692 } |
| 5681 | 5693 |
| 5682 } } // namespace v8::internal | 5694 } } // namespace v8::internal |
| OLD | NEW |