| 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 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2093 LStoreKeyedGeneric* result = | 2093 LStoreKeyedGeneric* result = |
| 2094 new(zone()) LStoreKeyedGeneric(context, object, key, value); | 2094 new(zone()) LStoreKeyedGeneric(context, object, key, value); |
| 2095 return MarkAsCall(result, instr); | 2095 return MarkAsCall(result, instr); |
| 2096 } | 2096 } |
| 2097 | 2097 |
| 2098 | 2098 |
| 2099 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 2099 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
| 2100 HTransitionElementsKind* instr) { | 2100 HTransitionElementsKind* instr) { |
| 2101 ElementsKind from_kind = instr->original_map()->elements_kind(); | 2101 ElementsKind from_kind = instr->original_map()->elements_kind(); |
| 2102 ElementsKind to_kind = instr->transitioned_map()->elements_kind(); | 2102 ElementsKind to_kind = instr->transitioned_map()->elements_kind(); |
| 2103 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { | 2103 bool needs_pointer_map = !IsSimpleMapChangeTransition(from_kind, to_kind); |
| 2104 LOperand* object = UseRegister(instr->object()); | 2104 |
| 2105 LOperand* new_map_reg = TempRegister(); | 2105 LOperand* object = UseRegister(instr->object()); |
| 2106 LOperand* temp_reg = TempRegister(); | 2106 LOperand* new_map_reg = TempRegister(); |
| 2107 LTransitionElementsKind* result = | 2107 LOperand* temp_reg = TempRegister(); |
| 2108 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); | 2108 LTransitionElementsKind* result = |
| 2109 return DefineSameAsFirst(result); | 2109 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); |
| 2110 } else { | 2110 if (needs_pointer_map) { |
| 2111 LOperand* object = UseFixed(instr->object(), eax); | 2111 AssignPointerMap(result); |
| 2112 LOperand* fixed_object_reg = FixedTemp(edx); | |
| 2113 LOperand* new_map_reg = FixedTemp(ebx); | |
| 2114 LTransitionElementsKind* result = | |
| 2115 new(zone()) LTransitionElementsKind(object, | |
| 2116 new_map_reg, | |
| 2117 fixed_object_reg); | |
| 2118 return MarkAsCall(DefineFixed(result, eax), instr); | |
| 2119 } | 2112 } |
| 2113 return DefineSameAsFirst(result); |
| 2114 |
| 2115 /* |
| 2116 // Old needs_pointer_map case |
| 2117 LOperand* object = UseFixed(instr->object(), eax); |
| 2118 LOperand* fixed_object_reg = FixedTemp(edx); |
| 2119 LOperand* new_map_reg = FixedTemp(ebx); |
| 2120 LTransitionElementsKind* result = |
| 2121 new(zone()) LTransitionElementsKind(object, |
| 2122 new_map_reg, |
| 2123 fixed_object_reg); |
| 2124 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2125 */ |
| 2120 } | 2126 } |
| 2121 | 2127 |
| 2122 | 2128 |
| 2123 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2129 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
| 2124 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2130 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
| 2125 bool needs_write_barrier_for_map = !instr->transition().is_null() && | 2131 bool needs_write_barrier_for_map = !instr->transition().is_null() && |
| 2126 instr->NeedsWriteBarrierForMap(); | 2132 instr->NeedsWriteBarrierForMap(); |
| 2127 | 2133 |
| 2128 LOperand* obj; | 2134 LOperand* obj; |
| 2129 if (needs_write_barrier) { | 2135 if (needs_write_barrier) { |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2443 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2449 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2444 LOperand* object = UseRegister(instr->object()); | 2450 LOperand* object = UseRegister(instr->object()); |
| 2445 LOperand* index = UseTempRegister(instr->index()); | 2451 LOperand* index = UseTempRegister(instr->index()); |
| 2446 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2452 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2447 } | 2453 } |
| 2448 | 2454 |
| 2449 | 2455 |
| 2450 } } // namespace v8::internal | 2456 } } // namespace v8::internal |
| 2451 | 2457 |
| 2452 #endif // V8_TARGET_ARCH_IA32 | 2458 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |