Chromium Code Reviews| 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 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2151 ASSERT(instr->value()->representation().IsTagged()); | 2151 ASSERT(instr->value()->representation().IsTagged()); |
| 2152 | 2152 |
| 2153 LStoreKeyedGeneric* result = | 2153 LStoreKeyedGeneric* result = |
| 2154 new(zone()) LStoreKeyedGeneric(context, object, key, value); | 2154 new(zone()) LStoreKeyedGeneric(context, object, key, value); |
| 2155 return MarkAsCall(result, instr); | 2155 return MarkAsCall(result, instr); |
| 2156 } | 2156 } |
| 2157 | 2157 |
| 2158 | 2158 |
| 2159 LInstruction* LChunkBuilder::DoTransitionElementsKind( | 2159 LInstruction* LChunkBuilder::DoTransitionElementsKind( |
| 2160 HTransitionElementsKind* instr) { | 2160 HTransitionElementsKind* instr) { |
| 2161 LOperand* object = UseRegister(instr->object()); | |
| 2161 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { | 2162 if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) { |
| 2162 LOperand* object = UseRegister(instr->object()); | 2163 LOperand* object = UseRegister(instr->object()); |
| 2163 LOperand* new_map_reg = TempRegister(); | 2164 LOperand* new_map_reg = TempRegister(); |
| 2164 LOperand* temp_reg = TempRegister(); | 2165 LOperand* temp_reg = TempRegister(); |
| 2165 LTransitionElementsKind* result = | 2166 LTransitionElementsKind* result = |
| 2166 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); | 2167 new(zone()) LTransitionElementsKind(object, NULL, |
| 2167 return DefineSameAsFirst(result); | 2168 new_map_reg, temp_reg); |
| 2169 return result; | |
| 2168 } else { | 2170 } else { |
| 2169 LOperand* object = UseFixed(instr->object(), eax); | 2171 LOperand* context = UseRegister(instr->context()); |
| 2170 LOperand* fixed_object_reg = FixedTemp(edx); | |
| 2171 LOperand* new_map_reg = FixedTemp(ebx); | |
| 2172 LTransitionElementsKind* result = | 2172 LTransitionElementsKind* result = |
| 2173 new(zone()) LTransitionElementsKind(object, | 2173 new(zone()) LTransitionElementsKind(object, context, NULL, NULL); |
| 2174 new_map_reg, | 2174 return AssignPointerMap(result); |
| 2175 fixed_object_reg); | |
| 2176 return MarkAsCall(DefineFixed(result, eax), instr); | |
| 2177 } | 2175 } |
| 2178 } | 2176 } |
| 2179 | 2177 |
| 2180 | 2178 |
| 2179 LInstruction* LChunkBuilder::DoTrapAllocationMemento( | |
| 2180 HTrapAllocationMemento* instr) { | |
| 2181 LOperand* object = UseRegister(instr->object()); | |
| 2182 LOperand* temp = TempRegister(); | |
| 2183 LTrapAllocationMemento* result = | |
| 2184 new(zone()) LTrapAllocationMemento(object, temp); | |
| 2185 return AssignEnvironment(result); | |
| 2186 } | |
| 2187 | |
| 2188 | |
| 2181 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { | 2189 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { |
| 2182 bool needs_write_barrier = instr->NeedsWriteBarrier(); | 2190 bool needs_write_barrier = instr->NeedsWriteBarrier(); |
| 2183 bool needs_write_barrier_for_map = !instr->transition().is_null() && | 2191 bool needs_write_barrier_for_map = !instr->transition().is_null() && |
| 2184 instr->NeedsWriteBarrierForMap(); | 2192 instr->NeedsWriteBarrierForMap(); |
| 2185 | 2193 |
| 2186 LOperand* obj; | 2194 LOperand* obj; |
| 2187 if (needs_write_barrier) { | 2195 if (needs_write_barrier) { |
| 2188 obj = instr->is_in_object() | 2196 obj = instr->is_in_object() |
| 2189 ? UseRegister(instr->object()) | 2197 ? UseRegister(instr->object()) |
| 2190 : UseTempRegister(instr->object()); | 2198 : UseTempRegister(instr->object()); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2249 } | 2257 } |
| 2250 | 2258 |
| 2251 | 2259 |
| 2252 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 2260 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
| 2253 LOperand* string = UseRegisterAtStart(instr->value()); | 2261 LOperand* string = UseRegisterAtStart(instr->value()); |
| 2254 return DefineAsRegister(new(zone()) LStringLength(string)); | 2262 return DefineAsRegister(new(zone()) LStringLength(string)); |
| 2255 } | 2263 } |
| 2256 | 2264 |
| 2257 | 2265 |
| 2258 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { | 2266 LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) { |
| 2259 LOperand* context = UseFixed(instr->context(), esi); | 2267 LOperand* context = UseAny(instr->context()); |
|
Michael Starzinger
2013/01/31 13:15:10
It seems info()->MarkAsDeferredCalling() is missin
danno
2013/01/31 15:53:25
Done.
| |
| 2260 LOperand* temp = TempRegister(); | 2268 LOperand* temp = TempRegister(); |
| 2261 LAllocateObject* result = new(zone()) LAllocateObject(context, temp); | 2269 LAllocateObject* result = new(zone()) LAllocateObject(context, temp); |
| 2262 return AssignPointerMap(DefineAsRegister(result)); | 2270 return AssignPointerMap(DefineAsRegister(result)); |
| 2263 } | 2271 } |
| 2264 | 2272 |
| 2265 | 2273 |
| 2274 LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { | |
| 2275 info()->MarkAsDeferredCalling(); | |
| 2276 LOperand* context = UseAny(instr->context()); | |
| 2277 LOperand* size = UseTempRegister(instr->size()); | |
| 2278 LOperand* temp = TempRegister(); | |
| 2279 LAllocate* result = new(zone()) LAllocate(context, size, temp); | |
| 2280 return AssignPointerMap(DefineAsRegister(result)); | |
| 2281 } | |
| 2282 | |
| 2283 | |
| 2266 LInstruction* LChunkBuilder::DoFastLiteral(HFastLiteral* instr) { | 2284 LInstruction* LChunkBuilder::DoFastLiteral(HFastLiteral* instr) { |
| 2267 LOperand* context = UseFixed(instr->context(), esi); | 2285 LOperand* context = UseFixed(instr->context(), esi); |
| 2268 return MarkAsCall( | 2286 return MarkAsCall( |
| 2269 DefineFixed(new(zone()) LFastLiteral(context), eax), instr); | 2287 DefineFixed(new(zone()) LFastLiteral(context), eax), instr); |
| 2270 } | 2288 } |
| 2271 | 2289 |
| 2272 | 2290 |
| 2273 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { | 2291 LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) { |
| 2274 LOperand* context = UseFixed(instr->context(), esi); | 2292 LOperand* context = UseFixed(instr->context(), esi); |
| 2275 return MarkAsCall( | 2293 return MarkAsCall( |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2511 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2529 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2512 LOperand* object = UseRegister(instr->object()); | 2530 LOperand* object = UseRegister(instr->object()); |
| 2513 LOperand* index = UseTempRegister(instr->index()); | 2531 LOperand* index = UseTempRegister(instr->index()); |
| 2514 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2532 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2515 } | 2533 } |
| 2516 | 2534 |
| 2517 | 2535 |
| 2518 } } // namespace v8::internal | 2536 } } // namespace v8::internal |
| 2519 | 2537 |
| 2520 #endif // V8_TARGET_ARCH_IA32 | 2538 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |