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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Try to generate code for the entire chunk, but it may fail if the | 103 // Try to generate code for the entire chunk, but it may fail if the |
104 // chunk contains constructs we cannot handle. Returns true if the | 104 // chunk contains constructs we cannot handle. Returns true if the |
105 // code generation attempt succeeded. | 105 // code generation attempt succeeded. |
106 bool GenerateCode(); | 106 bool GenerateCode(); |
107 | 107 |
108 // Finish the code by setting stack height, safepoint, and bailout | 108 // Finish the code by setting stack height, safepoint, and bailout |
109 // information on it. | 109 // information on it. |
110 void FinishCode(Handle<Code> code); | 110 void FinishCode(Handle<Code> code); |
111 | 111 |
112 // Deferred code support. | 112 // Deferred code support. |
113 void DoDeferredBinaryOpStub(LPointerMap* pointer_map, | 113 template<int T> |
114 LOperand* left_argument, | 114 void DoDeferredBinaryOpStub(LTemplateInstruction<1, 2, T>* instr, |
115 LOperand* right_argument, | |
116 Token::Value op); | 115 Token::Value op); |
117 void DoDeferredNumberTagD(LNumberTagD* instr); | 116 void DoDeferredNumberTagD(LNumberTagD* instr); |
118 | 117 |
119 enum IntegerSignedness { SIGNED_INT32, UNSIGNED_INT32 }; | 118 enum IntegerSignedness { SIGNED_INT32, UNSIGNED_INT32 }; |
120 void DoDeferredNumberTagI(LInstruction* instr, | 119 void DoDeferredNumberTagI(LInstruction* instr, |
121 LOperand* value, | 120 LOperand* value, |
122 IntegerSignedness signedness); | 121 IntegerSignedness signedness); |
123 | 122 |
124 void DoDeferredTaggedToI(LTaggedToI* instr); | 123 void DoDeferredTaggedToI(LTaggedToI* instr); |
125 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); | 124 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); |
(...skipping 15 matching lines...) Expand all Loading... |
141 MemOperand PrepareKeyedOperand(Register key, | 140 MemOperand PrepareKeyedOperand(Register key, |
142 Register base, | 141 Register base, |
143 bool key_is_constant, | 142 bool key_is_constant, |
144 int constant_key, | 143 int constant_key, |
145 int element_size, | 144 int element_size, |
146 int shift_size, | 145 int shift_size, |
147 int additional_index, | 146 int additional_index, |
148 int additional_offset); | 147 int additional_offset); |
149 | 148 |
150 // Emit frame translation commands for an environment. | 149 // Emit frame translation commands for an environment. |
151 void WriteTranslation(LEnvironment* environment, | 150 void WriteTranslation(LEnvironment* environment, Translation* translation); |
152 Translation* translation, | |
153 int* arguments_index, | |
154 int* arguments_count); | |
155 | 151 |
156 // Declare methods that deal with the individual node types. | 152 // Declare methods that deal with the individual node types. |
157 #define DECLARE_DO(type) void Do##type(L##type* node); | 153 #define DECLARE_DO(type) void Do##type(L##type* node); |
158 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 154 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
159 #undef DECLARE_DO | 155 #undef DECLARE_DO |
160 | 156 |
161 private: | 157 private: |
162 enum Status { | 158 enum Status { |
163 UNUSED, | 159 UNUSED, |
164 GENERATING, | 160 GENERATING, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 void RecordSafepointWithLazyDeopt(LInstruction* instr, | 251 void RecordSafepointWithLazyDeopt(LInstruction* instr, |
256 SafepointMode safepoint_mode); | 252 SafepointMode safepoint_mode); |
257 | 253 |
258 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, | 254 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, |
259 Safepoint::DeoptMode mode); | 255 Safepoint::DeoptMode mode); |
260 void DeoptimizeIf(Condition cc, LEnvironment* environment); | 256 void DeoptimizeIf(Condition cc, LEnvironment* environment); |
261 | 257 |
262 void AddToTranslation(Translation* translation, | 258 void AddToTranslation(Translation* translation, |
263 LOperand* op, | 259 LOperand* op, |
264 bool is_tagged, | 260 bool is_tagged, |
265 bool is_uint32, | 261 bool is_uint32); |
266 int arguments_index, | |
267 int arguments_count); | |
268 void PopulateDeoptimizationData(Handle<Code> code); | 262 void PopulateDeoptimizationData(Handle<Code> code); |
269 int DefineDeoptimizationLiteral(Handle<Object> literal); | 263 int DefineDeoptimizationLiteral(Handle<Object> literal); |
270 | 264 |
271 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 265 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
272 | 266 |
273 Register ToRegister(int index) const; | 267 Register ToRegister(int index) const; |
274 DoubleRegister ToDoubleRegister(int index) const; | 268 DoubleRegister ToDoubleRegister(int index) const; |
275 | 269 |
276 // Specific math operations - used from DoUnaryMathOperation. | 270 // Specific math operations - used from DoUnaryMathOperation. |
277 void EmitIntegerMathAbs(LUnaryMathOperation* instr); | 271 void EmitIntegerMathAbs(LUnaryMathOperation* instr); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 LCodeGen* codegen_; | 469 LCodeGen* codegen_; |
476 Label entry_; | 470 Label entry_; |
477 Label exit_; | 471 Label exit_; |
478 Label* external_exit_; | 472 Label* external_exit_; |
479 int instruction_index_; | 473 int instruction_index_; |
480 }; | 474 }; |
481 | 475 |
482 } } // namespace v8::internal | 476 } } // namespace v8::internal |
483 | 477 |
484 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 478 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
OLD | NEW |