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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 // Code generation passes. Returns true if code generation should | 159 // Code generation passes. Returns true if code generation should |
160 // continue. | 160 // continue. |
161 bool GeneratePrologue(); | 161 bool GeneratePrologue(); |
162 bool GenerateBody(); | 162 bool GenerateBody(); |
163 bool GenerateDeferredCode(); | 163 bool GenerateDeferredCode(); |
164 // Pad the reloc info to ensure that we have enough space to patch during | 164 // Pad the reloc info to ensure that we have enough space to patch during |
165 // deoptimization. | 165 // deoptimization. |
166 bool GenerateRelocPadding(); | 166 bool GenerateRelocPadding(); |
167 bool GenerateSafepointTable(); | 167 bool GenerateSafepointTable(); |
168 | 168 |
169 enum ContextMode { | |
170 RESTORE_CONTEXT, | |
171 CONTEXT_ADJUSTED | |
172 }; | |
173 | |
174 enum SafepointMode { | 169 enum SafepointMode { |
175 RECORD_SIMPLE_SAFEPOINT, | 170 RECORD_SIMPLE_SAFEPOINT, |
176 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS | 171 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS |
177 }; | 172 }; |
178 | 173 |
179 void CallCode(Handle<Code> code, | 174 void CallCode(Handle<Code> code, |
180 RelocInfo::Mode mode, | 175 RelocInfo::Mode mode, |
181 LInstruction* instr, | 176 LInstruction* instr); |
182 ContextMode context_mode); | |
Kevin Millikin (Chromium)
2011/06/29 08:36:20
Yay!
| |
183 | 177 |
184 void CallCodeGeneric(Handle<Code> code, | 178 void CallCodeGeneric(Handle<Code> code, |
185 RelocInfo::Mode mode, | 179 RelocInfo::Mode mode, |
186 LInstruction* instr, | 180 LInstruction* instr, |
187 ContextMode context_mode, | |
188 SafepointMode safepoint_mode); | 181 SafepointMode safepoint_mode); |
189 | 182 |
190 void CallRuntime(const Runtime::Function* fun, | 183 void CallRuntime(const Runtime::Function* fun, |
191 int argc, | 184 int argc, |
192 LInstruction* instr, | 185 LInstruction* instr); |
193 ContextMode context_mode); | |
194 | 186 |
195 void CallRuntime(Runtime::FunctionId id, | 187 void CallRuntime(Runtime::FunctionId id, |
196 int argc, | 188 int argc, |
197 LInstruction* instr, | 189 LInstruction* instr) { |
198 ContextMode context_mode) { | |
199 const Runtime::Function* function = Runtime::FunctionForId(id); | 190 const Runtime::Function* function = Runtime::FunctionForId(id); |
200 CallRuntime(function, argc, instr, context_mode); | 191 CallRuntime(function, argc, instr); |
201 } | 192 } |
202 | 193 |
203 void CallRuntimeFromDeferred(Runtime::FunctionId id, | 194 void CallRuntimeFromDeferred(Runtime::FunctionId id, |
204 int argc, | 195 int argc, |
205 LInstruction* instr); | 196 LInstruction* instr, |
197 LOperand* context); | |
206 | 198 |
207 // Generate a direct call to a known function. Expects the function | 199 // Generate a direct call to a known function. Expects the function |
208 // to be in edi. | 200 // to be in edi. |
209 void CallKnownFunction(Handle<JSFunction> function, | 201 void CallKnownFunction(Handle<JSFunction> function, |
210 int arity, | 202 int arity, |
211 LInstruction* instr, | 203 LInstruction* instr, |
212 CallKind call_kind); | 204 CallKind call_kind); |
213 | 205 |
214 void LoadHeapObject(Register result, Handle<HeapObject> object); | 206 void LoadHeapObject(Register result, Handle<HeapObject> object); |
215 | 207 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 private: | 361 private: |
370 LCodeGen* codegen_; | 362 LCodeGen* codegen_; |
371 Label entry_; | 363 Label entry_; |
372 Label exit_; | 364 Label exit_; |
373 Label* external_exit_; | 365 Label* external_exit_; |
374 }; | 366 }; |
375 | 367 |
376 } } // namespace v8::internal | 368 } } // namespace v8::internal |
377 | 369 |
378 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 370 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
OLD | NEW |