| 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 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 ASSERT(instr->object()->representation().IsTagged()); | 2016 ASSERT(instr->object()->representation().IsTagged()); |
| 2017 ASSERT(instr->key()->representation().IsTagged()); | 2017 ASSERT(instr->key()->representation().IsTagged()); |
| 2018 ASSERT(instr->value()->representation().IsTagged()); | 2018 ASSERT(instr->value()->representation().IsTagged()); |
| 2019 | 2019 |
| 2020 return MarkAsCall(new(zone()) LStoreKeyedGeneric(obj, key, val), instr); | 2020 return MarkAsCall(new(zone()) LStoreKeyedGeneric(obj, key, val), instr); |
| 2021 } | 2021 } |
| 2022 | 2022 |
| 2023 | 2023 |
| 2024 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 2024 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
| 2025 HTransitionElementsKind* instr) { | 2025 HTransitionElementsKind* instr) { |
| 2026 if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS && | 2026 ElementsKind from_kind = instr->original_map()->elements_kind(); |
| 2027 instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) { | 2027 ElementsKind to_kind = instr->transitioned_map()->elements_kind(); |
| 2028 bool simple_map_change = (GetHoleyElementsKind(from_kind) == to_kind) || |
| 2029 (IsFastSmiElementsKind(from_kind) && |
| 2030 IsFastObjectElementsKind(to_kind)); |
| 2031 if (simple_map_change) { |
| 2028 LOperand* object = UseRegister(instr->object()); | 2032 LOperand* object = UseRegister(instr->object()); |
| 2029 LOperand* new_map_reg = TempRegister(); | 2033 LOperand* new_map_reg = TempRegister(); |
| 2030 LTransitionElementsKind* result = | 2034 LTransitionElementsKind* result = |
| 2031 new(zone()) LTransitionElementsKind(object, new_map_reg, NULL); | 2035 new(zone()) LTransitionElementsKind(object, new_map_reg, NULL); |
| 2032 return DefineSameAsFirst(result); | 2036 return DefineSameAsFirst(result); |
| 2033 } else { | 2037 } else { |
| 2034 LOperand* object = UseFixed(instr->object(), a0); | 2038 LOperand* object = UseFixed(instr->object(), a0); |
| 2035 LOperand* fixed_object_reg = FixedTemp(a2); | 2039 LOperand* fixed_object_reg = FixedTemp(a2); |
| 2036 LOperand* new_map_reg = FixedTemp(a3); | 2040 LOperand* new_map_reg = FixedTemp(a3); |
| 2037 LTransitionElementsKind* result = | 2041 LTransitionElementsKind* result = |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2319 | 2323 |
| 2320 | 2324 |
| 2321 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2325 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2322 LOperand* object = UseRegister(instr->object()); | 2326 LOperand* object = UseRegister(instr->object()); |
| 2323 LOperand* index = UseRegister(instr->index()); | 2327 LOperand* index = UseRegister(instr->index()); |
| 2324 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2328 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2325 } | 2329 } |
| 2326 | 2330 |
| 2327 | 2331 |
| 2328 } } // namespace v8::internal | 2332 } } // namespace v8::internal |
| OLD | NEW |