| 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 5420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5431 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { | 5431 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { |
| 5432 __ Ucvtf(ToDoubleRegister(instr->result()), ToRegister32(instr->value())); | 5432 __ Ucvtf(ToDoubleRegister(instr->result()), ToRegister32(instr->value())); |
| 5433 } | 5433 } |
| 5434 | 5434 |
| 5435 | 5435 |
| 5436 void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) { | 5436 void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) { |
| 5437 Register value = ToRegister(instr->value()); | 5437 Register value = ToRegister(instr->value()); |
| 5438 Register result = ToRegister(instr->result()); | 5438 Register result = ToRegister(instr->result()); |
| 5439 | 5439 |
| 5440 if (!instr->hydrogen()->value()->HasRange() || | 5440 if (!instr->hydrogen()->value()->HasRange() || |
| 5441 !instr->hydrogen()->value()->range()->IsInSmiRange()) { | 5441 !instr->hydrogen()->value()->range()->IsInSmiRange() || |
| 5442 instr->hydrogen()->value()->range()->upper() == kMaxInt) { |
| 5443 // The Range class can't express upper bounds in the (kMaxInt, kMaxUint32] |
| 5444 // interval, so we treat kMaxInt as a sentinel for this entire interval. |
| 5442 DeoptimizeIfNegative(value.W(), instr->environment()); | 5445 DeoptimizeIfNegative(value.W(), instr->environment()); |
| 5443 } | 5446 } |
| 5444 __ SmiTag(result, value); | 5447 __ SmiTag(result, value); |
| 5445 } | 5448 } |
| 5446 | 5449 |
| 5447 | 5450 |
| 5448 void LCodeGen::DoValueOf(LValueOf* instr) { | 5451 void LCodeGen::DoValueOf(LValueOf* instr) { |
| 5449 Register input = ToRegister(instr->value()); | 5452 Register input = ToRegister(instr->value()); |
| 5450 Register result = ToRegister(instr->result()); | 5453 Register result = ToRegister(instr->result()); |
| 5451 Register scratch = ToRegister(instr->temp()); | 5454 Register scratch = ToRegister(instr->temp()); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5547 __ Bind(&out_of_object); | 5550 __ Bind(&out_of_object); |
| 5548 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5551 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 5549 // Index is equal to negated out of object property index plus 1. | 5552 // Index is equal to negated out of object property index plus 1. |
| 5550 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5553 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); |
| 5551 __ Ldr(result, FieldMemOperand(result, | 5554 __ Ldr(result, FieldMemOperand(result, |
| 5552 FixedArray::kHeaderSize - kPointerSize)); | 5555 FixedArray::kHeaderSize - kPointerSize)); |
| 5553 __ Bind(&done); | 5556 __ Bind(&done); |
| 5554 } | 5557 } |
| 5555 | 5558 |
| 5556 } } // namespace v8::internal | 5559 } } // namespace v8::internal |
| OLD | NEW |