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 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2005 ASSERT(instr->value()->representation().IsTagged()); | 2005 ASSERT(instr->value()->representation().IsTagged()); |
2006 | 2006 |
2007 LStoreKeyedGeneric* result = | 2007 LStoreKeyedGeneric* result = |
2008 new(zone()) LStoreKeyedGeneric(object, key, value); | 2008 new(zone()) LStoreKeyedGeneric(object, key, value); |
2009 return MarkAsCall(result, instr); | 2009 return MarkAsCall(result, instr); |
2010 } | 2010 } |
2011 | 2011 |
2012 | 2012 |
2013 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 2013 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
2014 HTransitionElementsKind* instr) { | 2014 HTransitionElementsKind* instr) { |
2015 if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS && | 2015 ElementsKind from_kind = instr->original_map()->elements_kind(); |
2016 instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) { | 2016 ElementsKind to_kind = instr->transitioned_map()->elements_kind(); |
| 2017 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
2017 LOperand* object = UseRegister(instr->object()); | 2018 LOperand* object = UseRegister(instr->object()); |
2018 LOperand* new_map_reg = TempRegister(); | 2019 LOperand* new_map_reg = TempRegister(); |
2019 LOperand* temp_reg = TempRegister(); | 2020 LOperand* temp_reg = TempRegister(); |
2020 LTransitionElementsKind* result = | 2021 LTransitionElementsKind* result = |
2021 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); | 2022 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); |
2022 return DefineSameAsFirst(result); | 2023 return DefineSameAsFirst(result); |
2023 } else { | 2024 } else { |
2024 LOperand* object = UseFixed(instr->object(), rax); | 2025 LOperand* object = UseFixed(instr->object(), rax); |
2025 LOperand* fixed_object_reg = FixedTemp(rdx); | 2026 LOperand* fixed_object_reg = FixedTemp(rdx); |
2026 LOperand* new_map_reg = FixedTemp(rbx); | 2027 LOperand* new_map_reg = FixedTemp(rbx); |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2315 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2316 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2316 LOperand* object = UseRegister(instr->object()); | 2317 LOperand* object = UseRegister(instr->object()); |
2317 LOperand* index = UseTempRegister(instr->index()); | 2318 LOperand* index = UseTempRegister(instr->index()); |
2318 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2319 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2319 } | 2320 } |
2320 | 2321 |
2321 | 2322 |
2322 } } // namespace v8::internal | 2323 } } // namespace v8::internal |
2323 | 2324 |
2324 #endif // V8_TARGET_ARCH_X64 | 2325 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |