OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) | 46 LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) |
47 : chunk_(chunk), | 47 : chunk_(chunk), |
48 masm_(assembler), | 48 masm_(assembler), |
49 info_(info), | 49 info_(info), |
50 current_block_(-1), | 50 current_block_(-1), |
51 current_instruction_(-1), | 51 current_instruction_(-1), |
52 instructions_(chunk->instructions()), | 52 instructions_(chunk->instructions()), |
53 deoptimizations_(4), | 53 deoptimizations_(4), |
54 deoptimization_literals_(8), | 54 deoptimization_literals_(8), |
55 inlined_function_count_(0), | 55 inlined_function_count_(0), |
56 scope_(chunk->graph()->info()->scope()), | 56 scope_(info->scope()), |
57 status_(UNUSED), | 57 status_(UNUSED), |
58 deferred_(8), | 58 deferred_(8), |
59 osr_pc_offset_(-1), | 59 osr_pc_offset_(-1), |
60 resolver_(this) { | 60 resolver_(this) { |
61 PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 61 PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
62 } | 62 } |
63 | 63 |
64 | 64 |
65 // Simple accessors. | 65 // Simple accessors. |
66 MacroAssembler* masm() const { return masm_; } | 66 MacroAssembler* masm() const { return masm_; } |
| 67 CompilationInfo* info() const { return info_; } |
67 | 68 |
68 // Support for converting LOperands to assembler types. | 69 // Support for converting LOperands to assembler types. |
69 // LOperand must be a register. | 70 // LOperand must be a register. |
70 Register ToRegister(LOperand* op) const; | 71 Register ToRegister(LOperand* op) const; |
71 | 72 |
72 // LOperand is loaded into scratch, unless already a register. | 73 // LOperand is loaded into scratch, unless already a register. |
73 Register EmitLoadRegister(LOperand* op, Register scratch); | 74 Register EmitLoadRegister(LOperand* op, Register scratch); |
74 | 75 |
75 // LOperand must be a double register. | 76 // LOperand must be a double register. |
76 DoubleRegister ToDoubleRegister(LOperand* op) const; | 77 DoubleRegister ToDoubleRegister(LOperand* op) const; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 DONE, | 126 DONE, |
126 ABORTED | 127 ABORTED |
127 }; | 128 }; |
128 | 129 |
129 bool is_unused() const { return status_ == UNUSED; } | 130 bool is_unused() const { return status_ == UNUSED; } |
130 bool is_generating() const { return status_ == GENERATING; } | 131 bool is_generating() const { return status_ == GENERATING; } |
131 bool is_done() const { return status_ == DONE; } | 132 bool is_done() const { return status_ == DONE; } |
132 bool is_aborted() const { return status_ == ABORTED; } | 133 bool is_aborted() const { return status_ == ABORTED; } |
133 | 134 |
134 int strict_mode_flag() const { | 135 int strict_mode_flag() const { |
135 return info_->is_strict() ? kStrictMode : kNonStrictMode; | 136 return info()->is_strict() ? kStrictMode : kNonStrictMode; |
136 } | 137 } |
137 | 138 |
138 LChunk* chunk() const { return chunk_; } | 139 LChunk* chunk() const { return chunk_; } |
139 Scope* scope() const { return scope_; } | 140 Scope* scope() const { return scope_; } |
140 HGraph* graph() const { return chunk_->graph(); } | 141 HGraph* graph() const { return chunk_->graph(); } |
141 | 142 |
142 Register scratch0() { return r9; } | 143 Register scratch0() { return r9; } |
143 DwVfpRegister double_scratch0() { return d0; } | 144 DwVfpRegister double_scratch0() { return d0; } |
144 | 145 |
145 int GetNextEmittedBlock(int block); | 146 int GetNextEmittedBlock(int block); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 private: | 307 private: |
307 LCodeGen* codegen_; | 308 LCodeGen* codegen_; |
308 Label entry_; | 309 Label entry_; |
309 Label exit_; | 310 Label exit_; |
310 Label* external_exit_; | 311 Label* external_exit_; |
311 }; | 312 }; |
312 | 313 |
313 } } // namespace v8::internal | 314 } } // namespace v8::internal |
314 | 315 |
315 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 316 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
OLD | NEW |