| 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 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2195 instr->key()->representation().IsTagged()); | 2195 instr->key()->representation().IsTagged()); |
| 2196 ElementsKind elements_kind = instr->elements_kind(); | 2196 ElementsKind elements_kind = instr->elements_kind(); |
| 2197 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2197 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 2198 LLoadKeyed* result = NULL; | 2198 LLoadKeyed* result = NULL; |
| 2199 | 2199 |
| 2200 if (!instr->is_external()) { | 2200 if (!instr->is_external()) { |
| 2201 LOperand* obj = NULL; | 2201 LOperand* obj = NULL; |
| 2202 if (instr->representation().IsDouble()) { | 2202 if (instr->representation().IsDouble()) { |
| 2203 obj = UseTempRegister(instr->elements()); | 2203 obj = UseTempRegister(instr->elements()); |
| 2204 } else { | 2204 } else { |
| 2205 ASSERT(instr->representation().IsTagged()); | 2205 ASSERT(instr->representation().IsSmiOrTagged()); |
| 2206 obj = UseRegisterAtStart(instr->elements()); | 2206 obj = UseRegisterAtStart(instr->elements()); |
| 2207 } | 2207 } |
| 2208 result = new(zone()) LLoadKeyed(obj, key); | 2208 result = new(zone()) LLoadKeyed(obj, key); |
| 2209 } else { | 2209 } else { |
| 2210 ASSERT( | 2210 ASSERT( |
| 2211 (instr->representation().IsInteger32() && | 2211 (instr->representation().IsInteger32() && |
| 2212 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && | 2212 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && |
| 2213 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || | 2213 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || |
| 2214 (instr->representation().IsDouble() && | 2214 (instr->representation().IsDouble() && |
| 2215 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || | 2215 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 | 2646 |
| 2647 | 2647 |
| 2648 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2648 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2649 LOperand* object = UseRegister(instr->object()); | 2649 LOperand* object = UseRegister(instr->object()); |
| 2650 LOperand* index = UseRegister(instr->index()); | 2650 LOperand* index = UseRegister(instr->index()); |
| 2651 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2651 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2652 } | 2652 } |
| 2653 | 2653 |
| 2654 | 2654 |
| 2655 } } // namespace v8::internal | 2655 } } // namespace v8::internal |
| OLD | NEW |