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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 enum InnerPosition { | 327 enum InnerPosition { |
328 BEFORE, | 328 BEFORE, |
329 START, | 329 START, |
330 END, | 330 END, |
331 AFTER, | 331 AFTER, |
332 FIRST_INNER_POSITION = BEFORE, | 332 FIRST_INNER_POSITION = BEFORE, |
333 LAST_INNER_POSITION = AFTER | 333 LAST_INNER_POSITION = AFTER |
334 }; | 334 }; |
335 | 335 |
336 LParallelMove* GetOrCreateParallelMove(InnerPosition pos) { | 336 LParallelMove* GetOrCreateParallelMove(InnerPosition pos, Zone* zone) { |
337 if (parallel_moves_[pos] == NULL) parallel_moves_[pos] = new LParallelMove; | 337 if (parallel_moves_[pos] == NULL) { |
| 338 parallel_moves_[pos] = new(zone) LParallelMove(zone); |
| 339 } |
338 return parallel_moves_[pos]; | 340 return parallel_moves_[pos]; |
339 } | 341 } |
340 | 342 |
341 LParallelMove* GetParallelMove(InnerPosition pos) { | 343 LParallelMove* GetParallelMove(InnerPosition pos) { |
342 return parallel_moves_[pos]; | 344 return parallel_moves_[pos]; |
343 } | 345 } |
344 | 346 |
345 private: | 347 private: |
346 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; | 348 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; |
347 HBasicBlock* block_; | 349 HBasicBlock* block_; |
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 LLabel* label = GetLabel(block_id); | 2262 LLabel* label = GetLabel(block_id); |
2261 ASSERT(!label->HasReplacement()); | 2263 ASSERT(!label->HasReplacement()); |
2262 return label->label(); | 2264 return label->label(); |
2263 } | 2265 } |
2264 | 2266 |
2265 const ZoneList<Handle<JSFunction> >* inlined_closures() const { | 2267 const ZoneList<Handle<JSFunction> >* inlined_closures() const { |
2266 return &inlined_closures_; | 2268 return &inlined_closures_; |
2267 } | 2269 } |
2268 | 2270 |
2269 void AddInlinedClosure(Handle<JSFunction> closure) { | 2271 void AddInlinedClosure(Handle<JSFunction> closure) { |
2270 inlined_closures_.Add(closure); | 2272 inlined_closures_.Add(closure, zone()); |
2271 } | 2273 } |
2272 | 2274 |
| 2275 Zone* zone() { return graph_->zone(); } |
| 2276 |
2273 private: | 2277 private: |
2274 int spill_slot_count_; | 2278 int spill_slot_count_; |
2275 CompilationInfo* info_; | 2279 CompilationInfo* info_; |
2276 HGraph* const graph_; | 2280 HGraph* const graph_; |
2277 ZoneList<LInstruction*> instructions_; | 2281 ZoneList<LInstruction*> instructions_; |
2278 ZoneList<LPointerMap*> pointer_maps_; | 2282 ZoneList<LPointerMap*> pointer_maps_; |
2279 ZoneList<Handle<JSFunction> > inlined_closures_; | 2283 ZoneList<Handle<JSFunction> > inlined_closures_; |
2280 }; | 2284 }; |
2281 | 2285 |
2282 | 2286 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2433 | 2437 |
2434 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2438 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2435 }; | 2439 }; |
2436 | 2440 |
2437 #undef DECLARE_HYDROGEN_ACCESSOR | 2441 #undef DECLARE_HYDROGEN_ACCESSOR |
2438 #undef DECLARE_CONCRETE_INSTRUCTION | 2442 #undef DECLARE_CONCRETE_INSTRUCTION |
2439 | 2443 |
2440 } } // namespace v8::internal | 2444 } } // namespace v8::internal |
2441 | 2445 |
2442 #endif // V8_ARM_LITHIUM_ARM_H_ | 2446 #endif // V8_ARM_LITHIUM_ARM_H_ |
OLD | NEW |