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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 enum InnerPosition { | 326 enum InnerPosition { |
327 BEFORE, | 327 BEFORE, |
328 START, | 328 START, |
329 END, | 329 END, |
330 AFTER, | 330 AFTER, |
331 FIRST_INNER_POSITION = BEFORE, | 331 FIRST_INNER_POSITION = BEFORE, |
332 LAST_INNER_POSITION = AFTER | 332 LAST_INNER_POSITION = AFTER |
333 }; | 333 }; |
334 | 334 |
335 LParallelMove* GetOrCreateParallelMove(InnerPosition pos) { | 335 LParallelMove* GetOrCreateParallelMove(InnerPosition pos, Zone* zone) { |
336 if (parallel_moves_[pos] == NULL) parallel_moves_[pos] = new LParallelMove; | 336 if (parallel_moves_[pos] == NULL) { |
| 337 parallel_moves_[pos] = new(zone) LParallelMove(zone); |
| 338 } |
337 return parallel_moves_[pos]; | 339 return parallel_moves_[pos]; |
338 } | 340 } |
339 | 341 |
340 LParallelMove* GetParallelMove(InnerPosition pos) { | 342 LParallelMove* GetParallelMove(InnerPosition pos) { |
341 return parallel_moves_[pos]; | 343 return parallel_moves_[pos]; |
342 } | 344 } |
343 | 345 |
344 private: | 346 private: |
345 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; | 347 LParallelMove* parallel_moves_[LAST_INNER_POSITION + 1]; |
346 HBasicBlock* block_; | 348 HBasicBlock* block_; |
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2226 LLabel* label = GetLabel(block_id); | 2228 LLabel* label = GetLabel(block_id); |
2227 ASSERT(!label->HasReplacement()); | 2229 ASSERT(!label->HasReplacement()); |
2228 return label->label(); | 2230 return label->label(); |
2229 } | 2231 } |
2230 | 2232 |
2231 const ZoneList<Handle<JSFunction> >* inlined_closures() const { | 2233 const ZoneList<Handle<JSFunction> >* inlined_closures() const { |
2232 return &inlined_closures_; | 2234 return &inlined_closures_; |
2233 } | 2235 } |
2234 | 2236 |
2235 void AddInlinedClosure(Handle<JSFunction> closure) { | 2237 void AddInlinedClosure(Handle<JSFunction> closure) { |
2236 inlined_closures_.Add(closure); | 2238 inlined_closures_.Add(closure, zone()); |
2237 } | 2239 } |
2238 | 2240 |
| 2241 Zone* zone() const { return graph_->zone(); } |
| 2242 |
2239 private: | 2243 private: |
2240 int spill_slot_count_; | 2244 int spill_slot_count_; |
2241 CompilationInfo* info_; | 2245 CompilationInfo* info_; |
2242 HGraph* const graph_; | 2246 HGraph* const graph_; |
2243 ZoneList<LInstruction*> instructions_; | 2247 ZoneList<LInstruction*> instructions_; |
2244 ZoneList<LPointerMap*> pointer_maps_; | 2248 ZoneList<LPointerMap*> pointer_maps_; |
2245 ZoneList<Handle<JSFunction> > inlined_closures_; | 2249 ZoneList<Handle<JSFunction> > inlined_closures_; |
2246 }; | 2250 }; |
2247 | 2251 |
2248 | 2252 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2396 | 2400 |
2397 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2401 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2398 }; | 2402 }; |
2399 | 2403 |
2400 #undef DECLARE_HYDROGEN_ACCESSOR | 2404 #undef DECLARE_HYDROGEN_ACCESSOR |
2401 #undef DECLARE_CONCRETE_INSTRUCTION | 2405 #undef DECLARE_CONCRETE_INSTRUCTION |
2402 | 2406 |
2403 } } // namespace v8::internal | 2407 } } // namespace v8::internal |
2404 | 2408 |
2405 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2409 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |