OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 bool GenerateBody(); | 60 bool GenerateBody(); |
61 virtual void GenerateBodyInstructionPre(LInstruction* instr) {} | 61 virtual void GenerateBodyInstructionPre(LInstruction* instr) {} |
62 virtual void GenerateBodyInstructionPost(LInstruction* instr) {} | 62 virtual void GenerateBodyInstructionPost(LInstruction* instr) {} |
63 | 63 |
64 virtual void EnsureSpaceForLazyDeopt(int space_needed) = 0; | 64 virtual void EnsureSpaceForLazyDeopt(int space_needed) = 0; |
65 virtual void RecordAndWritePosition(int position) = 0; | 65 virtual void RecordAndWritePosition(int position) = 0; |
66 | 66 |
67 int GetNextEmittedBlock() const; | 67 int GetNextEmittedBlock() const; |
68 | 68 |
69 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code); | 69 void RegisterWeakObjectsInOptimizedCode(Handle<Code> code); |
70 | 70 |
71 protected: | 71 protected: |
72 enum Status { | 72 enum Status { |
73 UNUSED, | 73 UNUSED, |
74 GENERATING, | 74 GENERATING, |
75 DONE, | 75 DONE, |
76 ABORTED | 76 ABORTED |
77 }; | 77 }; |
78 | 78 |
79 LPlatformChunk* const chunk_; | 79 LPlatformChunk* const chunk_; |
80 MacroAssembler* const masm_; | 80 MacroAssembler* const masm_; |
81 CompilationInfo* const info_; | 81 CompilationInfo* const info_; |
82 Zone* zone_; | 82 Zone* zone_; |
83 Status status_; | 83 Status status_; |
84 int current_block_; | 84 int current_block_; |
85 int current_instruction_; | 85 int current_instruction_; |
86 const ZoneList<LInstruction*>* instructions_; | 86 const ZoneList<LInstruction*>* instructions_; |
87 int last_lazy_deopt_pc_; | 87 int last_lazy_deopt_pc_; |
88 | 88 |
89 bool is_unused() const { return status_ == UNUSED; } | 89 bool is_unused() const { return status_ == UNUSED; } |
90 bool is_generating() const { return status_ == GENERATING; } | 90 bool is_generating() const { return status_ == GENERATING; } |
91 bool is_done() const { return status_ == DONE; } | 91 bool is_done() const { return status_ == DONE; } |
92 bool is_aborted() const { return status_ == ABORTED; } | 92 bool is_aborted() const { return status_ == ABORTED; } |
93 }; | 93 }; |
94 | 94 |
95 | 95 |
96 } } // namespace v8::internal | 96 } } // namespace v8::internal |
97 | 97 |
98 #endif // V8_LITHIUM_CODEGEN_H_ | 98 #endif // V8_LITHIUM_CODEGEN_H_ |
OLD | NEW |