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 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1990 : NULL; | 1990 : NULL; |
1991 LNumberTagU* result = new(zone()) LNumberTagU(value, temp); | 1991 LNumberTagU* result = new(zone()) LNumberTagU(value, temp); |
1992 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1992 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
1993 } else { | 1993 } else { |
1994 LNumberTagI* result = new(zone()) LNumberTagI(value); | 1994 LNumberTagI* result = new(zone()) LNumberTagI(value); |
1995 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1995 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
1996 } | 1996 } |
1997 } else if (to.IsSmi()) { | 1997 } else if (to.IsSmi()) { |
1998 HValue* val = instr->value(); | 1998 HValue* val = instr->value(); |
1999 LOperand* value = UseRegister(val); | 1999 LOperand* value = UseRegister(val); |
2000 LInstruction* result = | 2000 LInstruction* result = val->CheckFlag(HInstruction::kUint32) |
2001 DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); | 2001 ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value)) |
| 2002 : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); |
2002 if (val->HasRange() && val->range()->IsInSmiRange()) { | 2003 if (val->HasRange() && val->range()->IsInSmiRange()) { |
2003 return result; | 2004 return result; |
2004 } | 2005 } |
2005 return AssignEnvironment(result); | 2006 return AssignEnvironment(result); |
2006 } else { | 2007 } else { |
2007 ASSERT(to.IsDouble()); | 2008 ASSERT(to.IsDouble()); |
2008 if (instr->value()->CheckFlag(HInstruction::kUint32)) { | 2009 if (instr->value()->CheckFlag(HInstruction::kUint32)) { |
2009 LOperand* temp = FixedTemp(xmm1); | 2010 LOperand* temp = FixedTemp(xmm1); |
2010 return DefineAsRegister( | 2011 return DefineAsRegister( |
2011 new(zone()) LUint32ToDouble(UseRegister(instr->value()), temp)); | 2012 new(zone()) LUint32ToDouble(UseRegister(instr->value()), temp)); |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2726 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2727 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2727 LOperand* object = UseRegister(instr->object()); | 2728 LOperand* object = UseRegister(instr->object()); |
2728 LOperand* index = UseTempRegister(instr->index()); | 2729 LOperand* index = UseTempRegister(instr->index()); |
2729 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2730 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2730 } | 2731 } |
2731 | 2732 |
2732 | 2733 |
2733 } } // namespace v8::internal | 2734 } } // namespace v8::internal |
2734 | 2735 |
2735 #endif // V8_TARGET_ARCH_IA32 | 2736 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |