| 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 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 } | 2001 } |
| 2002 result = new(zone()) LLoadKeyed(obj, key); | 2002 result = new(zone()) LLoadKeyed(obj, key); |
| 2003 } else { | 2003 } else { |
| 2004 ASSERT( | 2004 ASSERT( |
| 2005 (instr->representation().IsInteger32() && | 2005 (instr->representation().IsInteger32() && |
| 2006 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && | 2006 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && |
| 2007 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || | 2007 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || |
| 2008 (instr->representation().IsDouble() && | 2008 (instr->representation().IsDouble() && |
| 2009 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || | 2009 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || |
| 2010 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); | 2010 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); |
| 2011 // float->double conversion on non-VFP2 requires an extra scratch | 2011 // float->double conversion on soft float requires an extra scratch |
| 2012 // register. For convenience, just mark the elements register as "UseTemp" | 2012 // register. For convenience, just mark the elements register as "UseTemp" |
| 2013 // so that it can be used as a temp during the float->double conversion | 2013 // so that it can be used as a temp during the float->double conversion |
| 2014 // after it's no longer needed after the float load. | 2014 // after it's no longer needed after the float load. |
| 2015 bool needs_temp = | 2015 bool needs_temp = |
| 2016 !CpuFeatures::IsSupported(FPU) && | 2016 !CpuFeatures::IsSupported(FPU) && |
| 2017 (elements_kind == EXTERNAL_FLOAT_ELEMENTS); | 2017 (elements_kind == EXTERNAL_FLOAT_ELEMENTS); |
| 2018 LOperand* external_pointer = needs_temp | 2018 LOperand* external_pointer = needs_temp |
| 2019 ? UseTempRegister(instr->elements()) | 2019 ? UseTempRegister(instr->elements()) |
| 2020 : UseRegister(instr->elements()); | 2020 : UseRegister(instr->elements()); |
| 2021 result = new(zone()) LLoadKeyed(external_pointer, key); | 2021 result = new(zone()) LLoadKeyed(external_pointer, key); |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2441 | 2441 |
| 2442 | 2442 |
| 2443 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2443 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2444 LOperand* object = UseRegister(instr->object()); | 2444 LOperand* object = UseRegister(instr->object()); |
| 2445 LOperand* index = UseRegister(instr->index()); | 2445 LOperand* index = UseRegister(instr->index()); |
| 2446 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2446 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2447 } | 2447 } |
| 2448 | 2448 |
| 2449 | 2449 |
| 2450 } } // namespace v8::internal | 2450 } } // namespace v8::internal |
| OLD | NEW |