| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_CODE_GENERATOR_H_ | 5 #ifndef V8_COMPILER_CODE_GENERATOR_H_ |
| 6 #define V8_COMPILER_CODE_GENERATOR_H_ | 6 #define V8_COMPILER_CODE_GENERATOR_H_ |
| 7 | 7 |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/instruction.h" | 10 #include "src/compiler/instruction.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void FinishFrame(Frame* frame); | 77 void FinishFrame(Frame* frame); |
| 78 | 78 |
| 79 // Checks if {block} will appear directly after {current_block_} when | 79 // Checks if {block} will appear directly after {current_block_} when |
| 80 // assembling code, in which case, a fall-through can be used. | 80 // assembling code, in which case, a fall-through can be used. |
| 81 bool IsNextInAssemblyOrder(RpoNumber block) const; | 81 bool IsNextInAssemblyOrder(RpoNumber block) const; |
| 82 | 82 |
| 83 // Record a safepoint with the given pointer map. | 83 // Record a safepoint with the given pointer map. |
| 84 void RecordSafepoint(ReferenceMap* references, Safepoint::Kind kind, | 84 void RecordSafepoint(ReferenceMap* references, Safepoint::Kind kind, |
| 85 int arguments, Safepoint::DeoptMode deopt_mode); | 85 int arguments, Safepoint::DeoptMode deopt_mode); |
| 86 | 86 |
| 87 // Check if a heap object can be materialized by loading from the frame, which | |
| 88 // is usually way cheaper than materializing the actual heap object constant. | |
| 89 bool IsMaterializableFromFrame(Handle<HeapObject> object, int* slot_return); | |
| 90 // Check if a heap object can be materialized by loading from a heap root, | 87 // Check if a heap object can be materialized by loading from a heap root, |
| 91 // which is cheaper on some platforms than materializing the actual heap | 88 // which is cheaper on some platforms than materializing the actual heap |
| 92 // object constant. | 89 // object constant. |
| 93 bool IsMaterializableFromRoot(Handle<HeapObject> object, | 90 bool IsMaterializableFromRoot(Handle<HeapObject> object, |
| 94 Heap::RootListIndex* index_return); | 91 Heap::RootListIndex* index_return); |
| 95 | 92 |
| 96 enum CodeGenResult { kSuccess, kTooManyDeoptimizationBailouts }; | 93 enum CodeGenResult { kSuccess, kTooManyDeoptimizationBailouts }; |
| 97 | 94 |
| 98 // Assemble instructions for the specified block. | 95 // Assemble instructions for the specified block. |
| 99 CodeGenResult AssembleBlock(const InstructionBlock* block); | 96 CodeGenResult AssembleBlock(const InstructionBlock* block); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 OutOfLineCode* ools_; | 277 OutOfLineCode* ools_; |
| 281 int osr_pc_offset_; | 278 int osr_pc_offset_; |
| 282 SourcePositionTableBuilder source_position_table_builder_; | 279 SourcePositionTableBuilder source_position_table_builder_; |
| 283 }; | 280 }; |
| 284 | 281 |
| 285 } // namespace compiler | 282 } // namespace compiler |
| 286 } // namespace internal | 283 } // namespace internal |
| 287 } // namespace v8 | 284 } // namespace v8 |
| 288 | 285 |
| 289 #endif // V8_COMPILER_CODE_GENERATOR_H | 286 #endif // V8_COMPILER_CODE_GENERATOR_H |
| OLD | NEW |