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 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2000 } | 2000 } |
2001 } | 2001 } |
2002 } | 2002 } |
2003 UNREACHABLE(); | 2003 UNREACHABLE(); |
2004 return NULL; | 2004 return NULL; |
2005 } | 2005 } |
2006 | 2006 |
2007 | 2007 |
2008 LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) { | 2008 LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) { |
2009 LOperand* value = UseAtStart(instr->value()); | 2009 LOperand* value = UseAtStart(instr->value()); |
2010 return AssignEnvironment(new(zone()) LCheckNonSmi(value)); | 2010 LInstruction* result = new(zone()) LCheckNonSmi(value); |
| 2011 if (!instr->value()->IsHeapObject()) result = AssignEnvironment(result); |
| 2012 return result; |
2011 } | 2013 } |
2012 | 2014 |
2013 | 2015 |
2014 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | 2016 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { |
2015 LOperand* value = UseRegisterAtStart(instr->value()); | 2017 LOperand* value = UseRegisterAtStart(instr->value()); |
2016 return AssignEnvironment(new(zone()) LCheckSmi(value)); | 2018 return AssignEnvironment(new(zone()) LCheckSmi(value)); |
2017 } | 2019 } |
2018 | 2020 |
2019 | 2021 |
2020 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { | 2022 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2709 LOperand* index = UseTempRegister(instr->index()); | 2711 LOperand* index = UseTempRegister(instr->index()); |
2710 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2712 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2711 LInstruction* result = DefineSameAsFirst(load); | 2713 LInstruction* result = DefineSameAsFirst(load); |
2712 return AssignPointerMap(result); | 2714 return AssignPointerMap(result); |
2713 } | 2715 } |
2714 | 2716 |
2715 | 2717 |
2716 } } // namespace v8::internal | 2718 } } // namespace v8::internal |
2717 | 2719 |
2718 #endif // V8_TARGET_ARCH_IA32 | 2720 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |