| 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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1899 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
| 1900 } else if (val->HasRange() && val->range()->IsInSmiRange()) { | 1900 } else if (val->HasRange() && val->range()->IsInSmiRange()) { |
| 1901 return DefineAsRegister(new(zone()) LSmiTag(value)); | 1901 return DefineAsRegister(new(zone()) LSmiTag(value)); |
| 1902 } else { | 1902 } else { |
| 1903 LNumberTagI* result = new(zone()) LNumberTagI(value); | 1903 LNumberTagI* result = new(zone()) LNumberTagI(value); |
| 1904 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 1904 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
| 1905 } | 1905 } |
| 1906 } else if (to.IsSmi()) { | 1906 } else if (to.IsSmi()) { |
| 1907 HValue* val = instr->value(); | 1907 HValue* val = instr->value(); |
| 1908 LOperand* value = UseRegister(val); | 1908 LOperand* value = UseRegister(val); |
| 1909 LInstruction* result = | 1909 LInstruction* result = val->CheckFlag(HInstruction::kUint32) |
| 1910 DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); | 1910 ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value)) |
| 1911 : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); |
| 1911 if (val->HasRange() && val->range()->IsInSmiRange()) { | 1912 if (val->HasRange() && val->range()->IsInSmiRange()) { |
| 1912 return result; | 1913 return result; |
| 1913 } | 1914 } |
| 1914 return AssignEnvironment(result); | 1915 return AssignEnvironment(result); |
| 1915 } else { | 1916 } else { |
| 1916 ASSERT(to.IsDouble()); | 1917 ASSERT(to.IsDouble()); |
| 1917 if (instr->value()->CheckFlag(HInstruction::kUint32)) { | 1918 if (instr->value()->CheckFlag(HInstruction::kUint32)) { |
| 1918 return DefineAsRegister( | 1919 return DefineAsRegister( |
| 1919 new(zone()) LUint32ToDouble(UseRegister(instr->value()))); | 1920 new(zone()) LUint32ToDouble(UseRegister(instr->value()))); |
| 1920 } else { | 1921 } else { |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2526 | 2527 |
| 2527 | 2528 |
| 2528 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2529 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2529 LOperand* object = UseRegister(instr->object()); | 2530 LOperand* object = UseRegister(instr->object()); |
| 2530 LOperand* index = UseRegister(instr->index()); | 2531 LOperand* index = UseRegister(instr->index()); |
| 2531 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2532 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2532 } | 2533 } |
| 2533 | 2534 |
| 2534 | 2535 |
| 2535 } } // namespace v8::internal | 2536 } } // namespace v8::internal |
| OLD | NEW |