| 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 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2024 } else if (val->HasRange() && val->range()->IsInSmiRange()) { | 2024 } else if (val->HasRange() && val->range()->IsInSmiRange()) { |
| 2025 return DefineAsRegister(new(zone()) LSmiTag(value)); | 2025 return DefineAsRegister(new(zone()) LSmiTag(value)); |
| 2026 } else { | 2026 } else { |
| 2027 LNumberTagI* result = new(zone()) LNumberTagI(value); | 2027 LNumberTagI* result = new(zone()) LNumberTagI(value); |
| 2028 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 2028 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
| 2029 } | 2029 } |
| 2030 } else if (to.IsSmi()) { | 2030 } else if (to.IsSmi()) { |
| 2031 HValue* val = instr->value(); | 2031 HValue* val = instr->value(); |
| 2032 LOperand* value = UseRegister(val); | 2032 LOperand* value = UseRegister(val); |
| 2033 LInstruction* result = val->CheckFlag(HInstruction::kUint32) | 2033 LInstruction* result = val->CheckFlag(HInstruction::kUint32) |
| 2034 ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value)) | 2034 ? DefineAsRegister(new(zone()) LUint32ToSmi(value)) |
| 2035 : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); | 2035 : DefineAsRegister(new(zone()) LInteger32ToSmi(value)); |
| 2036 if (val->HasRange() && val->range()->IsInSmiRange()) { | 2036 if (val->HasRange() && val->range()->IsInSmiRange()) { |
| 2037 return result; | 2037 return result; |
| 2038 } | 2038 } |
| 2039 return AssignEnvironment(result); | 2039 return AssignEnvironment(result); |
| 2040 } else { | 2040 } else { |
| 2041 ASSERT(to.IsDouble()); | 2041 ASSERT(to.IsDouble()); |
| 2042 if (instr->value()->CheckFlag(HInstruction::kUint32)) { | 2042 if (instr->value()->CheckFlag(HInstruction::kUint32)) { |
| 2043 return DefineAsRegister( | 2043 return DefineAsRegister( |
| 2044 new(zone()) LUint32ToDouble(UseRegister(instr->value()))); | 2044 new(zone()) LUint32ToDouble(UseRegister(instr->value()))); |
| 2045 } else { | 2045 } else { |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2675 | 2675 |
| 2676 | 2676 |
| 2677 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2677 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2678 LOperand* object = UseRegister(instr->object()); | 2678 LOperand* object = UseRegister(instr->object()); |
| 2679 LOperand* index = UseRegister(instr->index()); | 2679 LOperand* index = UseRegister(instr->index()); |
| 2680 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2680 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2681 } | 2681 } |
| 2682 | 2682 |
| 2683 | 2683 |
| 2684 } } // namespace v8::internal | 2684 } } // namespace v8::internal |
| OLD | NEW |