Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: src/lithium-allocator.h

Issue 10701157: Rename LChunkBase to LChunk, LChunk to LPlatformChunk and remove some unneeded explicit constructor… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/lithium.cc ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 30 matching lines...) Expand all
41 class HBasicBlock; 41 class HBasicBlock;
42 class HGraph; 42 class HGraph;
43 class HInstruction; 43 class HInstruction;
44 class HPhi; 44 class HPhi;
45 class HTracer; 45 class HTracer;
46 class HValue; 46 class HValue;
47 class BitVector; 47 class BitVector;
48 class StringStream; 48 class StringStream;
49 49
50 class LArgument; 50 class LArgument;
51 class LChunk; 51 class LPlatformChunk;
52 class LOperand; 52 class LOperand;
53 class LUnallocated; 53 class LUnallocated;
54 class LConstantOperand; 54 class LConstantOperand;
55 class LGap; 55 class LGap;
56 class LParallelMove; 56 class LParallelMove;
57 class LPointerMap; 57 class LPointerMap;
58 class LStackSlot; 58 class LStackSlot;
59 class LRegister; 59 class LRegister;
60 60
61 61
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 LAllocator(int first_virtual_register, HGraph* graph); 438 LAllocator(int first_virtual_register, HGraph* graph);
439 439
440 static void TraceAlloc(const char* msg, ...); 440 static void TraceAlloc(const char* msg, ...);
441 441
442 // Checks whether the value of a given virtual register is tagged. 442 // Checks whether the value of a given virtual register is tagged.
443 bool HasTaggedValue(int virtual_register) const; 443 bool HasTaggedValue(int virtual_register) const;
444 444
445 // Returns the register kind required by the given virtual register. 445 // Returns the register kind required by the given virtual register.
446 RegisterKind RequiredRegisterKind(int virtual_register) const; 446 RegisterKind RequiredRegisterKind(int virtual_register) const;
447 447
448 bool Allocate(LChunkBase* chunk); 448 bool Allocate(LChunk* chunk);
449 449
450 const ZoneList<LiveRange*>* live_ranges() const { return &live_ranges_; } 450 const ZoneList<LiveRange*>* live_ranges() const { return &live_ranges_; }
451 const Vector<LiveRange*>* fixed_live_ranges() const { 451 const Vector<LiveRange*>* fixed_live_ranges() const {
452 return &fixed_live_ranges_; 452 return &fixed_live_ranges_;
453 } 453 }
454 const Vector<LiveRange*>* fixed_double_live_ranges() const { 454 const Vector<LiveRange*>* fixed_double_live_ranges() const {
455 return &fixed_double_live_ranges_; 455 return &fixed_double_live_ranges_;
456 } 456 }
457 457
458 LChunk* chunk() const { return chunk_; } 458 LPlatformChunk* chunk() const { return chunk_; }
459 HGraph* graph() const { return graph_; } 459 HGraph* graph() const { return graph_; }
460 Zone* zone() const { return zone_; } 460 Zone* zone() const { return zone_; }
461 461
462 int GetVirtualRegister() { 462 int GetVirtualRegister() {
463 if (next_virtual_register_ > LUnallocated::kMaxVirtualRegisters) { 463 if (next_virtual_register_ > LUnallocated::kMaxVirtualRegisters) {
464 allocation_ok_ = false; 464 allocation_ok_ = false;
465 } 465 }
466 return next_virtual_register_++; 466 return next_virtual_register_++;
467 } 467 }
468 468
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 const char* RegisterName(int allocation_index); 591 const char* RegisterName(int allocation_index);
592 592
593 inline bool IsGapAt(int index); 593 inline bool IsGapAt(int index);
594 594
595 inline LInstruction* InstructionAt(int index); 595 inline LInstruction* InstructionAt(int index);
596 596
597 inline LGap* GapAt(int index); 597 inline LGap* GapAt(int index);
598 598
599 Zone* zone_; 599 Zone* zone_;
600 600
601 LChunk* chunk_; 601 LPlatformChunk* chunk_;
602 602
603 // During liveness analysis keep a mapping from block id to live_in sets 603 // During liveness analysis keep a mapping from block id to live_in sets
604 // for blocks already analyzed. 604 // for blocks already analyzed.
605 ZoneList<BitVector*> live_in_sets_; 605 ZoneList<BitVector*> live_in_sets_;
606 606
607 // Liveness analysis results. 607 // Liveness analysis results.
608 ZoneList<LiveRange*> live_ranges_; 608 ZoneList<LiveRange*> live_ranges_;
609 609
610 // Lists of live ranges 610 // Lists of live ranges
611 EmbeddedVector<LiveRange*, Register::kNumAllocatableRegisters> 611 EmbeddedVector<LiveRange*, Register::kNumAllocatableRegisters>
(...skipping 20 matching lines...) Expand all
632 // Indicates success or failure during register allocation. 632 // Indicates success or failure during register allocation.
633 bool allocation_ok_; 633 bool allocation_ok_;
634 634
635 DISALLOW_COPY_AND_ASSIGN(LAllocator); 635 DISALLOW_COPY_AND_ASSIGN(LAllocator);
636 }; 636 };
637 637
638 638
639 } } // namespace v8::internal 639 } } // namespace v8::internal
640 640
641 #endif // V8_LITHIUM_ALLOCATOR_H_ 641 #endif // V8_LITHIUM_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « src/lithium.cc ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698