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 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2629 | 2629 |
2630 Comment(";;; deoptimize: %s", instr->hydrogen()->reason()); | 2630 Comment(";;; deoptimize: %s", instr->hydrogen()->reason()); |
2631 Deoptimize(instr->environment(), &type); | 2631 Deoptimize(instr->environment(), &type); |
2632 } | 2632 } |
2633 | 2633 |
2634 | 2634 |
2635 void LCodeGen::DoDivByPowerOf2I(LDivByPowerOf2I* instr) { | 2635 void LCodeGen::DoDivByPowerOf2I(LDivByPowerOf2I* instr) { |
2636 Register dividend = ToRegister32(instr->dividend()); | 2636 Register dividend = ToRegister32(instr->dividend()); |
2637 int32_t divisor = instr->divisor(); | 2637 int32_t divisor = instr->divisor(); |
2638 Register result = ToRegister32(instr->result()); | 2638 Register result = ToRegister32(instr->result()); |
2639 ASSERT(divisor == kMinInt || (divisor != 0 && IsPowerOf2(Abs(divisor)))); | 2639 ASSERT(divisor == kMinInt || IsPowerOf2(Abs(divisor))); |
2640 ASSERT(!result.is(dividend)); | 2640 ASSERT(!result.is(dividend)); |
2641 | 2641 |
2642 // Check for (0 / -x) that will produce negative zero. | 2642 // Check for (0 / -x) that will produce negative zero. |
2643 HDiv* hdiv = instr->hydrogen(); | 2643 HDiv* hdiv = instr->hydrogen(); |
2644 if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) { | 2644 if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) { |
2645 __ Cmp(dividend, 0); | 2645 __ Cmp(dividend, 0); |
2646 DeoptimizeIf(eq, instr->environment()); | 2646 DeoptimizeIf(eq, instr->environment()); |
2647 } | 2647 } |
2648 // Check for (kMinInt / -1). | 2648 // Check for (kMinInt / -1). |
2649 if (hdiv->CheckFlag(HValue::kCanOverflow) && divisor == -1) { | 2649 if (hdiv->CheckFlag(HValue::kCanOverflow) && divisor == -1) { |
(...skipping 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5947 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5947 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
5948 // Index is equal to negated out of object property index plus 1. | 5948 // Index is equal to negated out of object property index plus 1. |
5949 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5949 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
5950 __ Ldr(result, FieldMemOperand(result, | 5950 __ Ldr(result, FieldMemOperand(result, |
5951 FixedArray::kHeaderSize - kPointerSize)); | 5951 FixedArray::kHeaderSize - kPointerSize)); |
5952 __ Bind(deferred->exit()); | 5952 __ Bind(deferred->exit()); |
5953 __ Bind(&done); | 5953 __ Bind(&done); |
5954 } | 5954 } |
5955 | 5955 |
5956 } } // namespace v8::internal | 5956 } } // namespace v8::internal |
OLD | NEW |