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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 } | 77 } |
78 | 78 |
79 // Simple accessors. | 79 // Simple accessors. |
80 MacroAssembler* masm() const { return masm_; } | 80 MacroAssembler* masm() const { return masm_; } |
81 CompilationInfo* info() const { return info_; } | 81 CompilationInfo* info() const { return info_; } |
82 Isolate* isolate() const { return info_->isolate(); } | 82 Isolate* isolate() const { return info_->isolate(); } |
83 Factory* factory() const { return isolate()->factory(); } | 83 Factory* factory() const { return isolate()->factory(); } |
84 Heap* heap() const { return isolate()->heap(); } | 84 Heap* heap() const { return isolate()->heap(); } |
85 Zone* zone() const { return zone_; } | 85 Zone* zone() const { return zone_; } |
86 | 86 |
| 87 // TODO(svenpanne) Use this consistently. |
| 88 int LookupDestination(int block_id) const { |
| 89 return chunk()->LookupDestination(block_id); |
| 90 } |
| 91 |
| 92 bool IsNextEmittedBlock(int block_id) const { |
| 93 return LookupDestination(block_id) == GetNextEmittedBlock(); |
| 94 } |
| 95 |
87 bool NeedsEagerFrame() const { | 96 bool NeedsEagerFrame() const { |
88 return GetStackSlotCount() > 0 || | 97 return GetStackSlotCount() > 0 || |
89 info()->is_non_deferred_calling() || | 98 info()->is_non_deferred_calling() || |
90 !info()->IsStub() || | 99 !info()->IsStub() || |
91 info()->requires_frame(); | 100 info()->requires_frame(); |
92 } | 101 } |
93 bool NeedsDeferredFrame() const { | 102 bool NeedsDeferredFrame() const { |
94 return !NeedsEagerFrame() && info()->is_deferred_calling(); | 103 return !NeedsEagerFrame() && info()->is_deferred_calling(); |
95 } | 104 } |
96 | 105 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 bool is_generating() const { return status_ == GENERATING; } | 191 bool is_generating() const { return status_ == GENERATING; } |
183 bool is_done() const { return status_ == DONE; } | 192 bool is_done() const { return status_ == DONE; } |
184 bool is_aborted() const { return status_ == ABORTED; } | 193 bool is_aborted() const { return status_ == ABORTED; } |
185 | 194 |
186 StrictModeFlag strict_mode_flag() const { | 195 StrictModeFlag strict_mode_flag() const { |
187 return info()->is_classic_mode() ? kNonStrictMode : kStrictMode; | 196 return info()->is_classic_mode() ? kNonStrictMode : kStrictMode; |
188 } | 197 } |
189 | 198 |
190 LPlatformChunk* chunk() const { return chunk_; } | 199 LPlatformChunk* chunk() const { return chunk_; } |
191 Scope* scope() const { return scope_; } | 200 Scope* scope() const { return scope_; } |
192 HGraph* graph() const { return chunk_->graph(); } | 201 HGraph* graph() const { return chunk()->graph(); } |
193 | 202 |
194 int GetNextEmittedBlock(); | 203 int GetNextEmittedBlock() const; |
195 | 204 |
196 void EmitClassOfTest(Label* if_true, | 205 void EmitClassOfTest(Label* if_true, |
197 Label* if_false, | 206 Label* if_false, |
198 Handle<String> class_name, | 207 Handle<String> class_name, |
199 Register input, | 208 Register input, |
200 Register temporary, | 209 Register temporary, |
201 Register temporary2); | 210 Register temporary2); |
202 | 211 |
203 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } | 212 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
204 | 213 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 LCodeGen* codegen_; | 488 LCodeGen* codegen_; |
480 Label entry_; | 489 Label entry_; |
481 Label exit_; | 490 Label exit_; |
482 Label* external_exit_; | 491 Label* external_exit_; |
483 int instruction_index_; | 492 int instruction_index_; |
484 }; | 493 }; |
485 | 494 |
486 } } // namespace v8::internal | 495 } } // namespace v8::internal |
487 | 496 |
488 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 497 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
OLD | NEW |