 Chromium Code Reviews
 Chromium Code Reviews Issue 6793017:
  In LCodeGen::DoDeferredLInstanceOfKnownGlobal emit safepoint with registers for the call to stub.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 6793017:
  In LCodeGen::DoDeferredLInstanceOfKnownGlobal emit safepoint with registers for the call to stub.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 // Code generation passes. Returns true if code generation should | 157 // Code generation passes. Returns true if code generation should | 
| 158 // continue. | 158 // continue. | 
| 159 bool GeneratePrologue(); | 159 bool GeneratePrologue(); | 
| 160 bool GenerateBody(); | 160 bool GenerateBody(); | 
| 161 bool GenerateDeferredCode(); | 161 bool GenerateDeferredCode(); | 
| 162 // Pad the reloc info to ensure that we have enough space to patch during | 162 // Pad the reloc info to ensure that we have enough space to patch during | 
| 163 // deoptimization. | 163 // deoptimization. | 
| 164 bool GenerateRelocPadding(); | 164 bool GenerateRelocPadding(); | 
| 165 bool GenerateSafepointTable(); | 165 bool GenerateSafepointTable(); | 
| 166 | 166 | 
| 167 void CallCode(Handle<Code> code, RelocInfo::Mode mode, LInstruction* instr, | 167 enum ContextMode { | 
| 168 bool adjusted = true); | 168 RESTORE_CONTEXT, | 
| 169 void CallRuntime(const Runtime::Function* fun, int argc, LInstruction* instr, | 169 CONTEXT_ADJUSTED | 
| 170 bool adjusted = true); | 170 }; | 
| 171 void CallRuntime(Runtime::FunctionId id, int argc, LInstruction* instr, | 171 | 
| 172 bool adjusted = true) { | 172 enum SafepointMode { | 
| 173 RECORD_SIMPLE_SAFEPOINT, | |
| 174 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS | |
| 175 }; | |
| 176 | |
| 177 void CallCode(Handle<Code> code, | |
| 178 RelocInfo::Mode mode, | |
| 179 LInstruction* instr, | |
| 180 ContextMode context_mode = CONTEXT_ADJUSTED, | |
| 
fschneider
2011/04/04 11:54:11
I'm hesitating using default arguments here (espec
 | |
| 181 SafepointMode safepoint_mode = RECORD_SIMPLE_SAFEPOINT); | |
| 182 | |
| 183 void CallRuntime(const Runtime::Function* fun, | |
| 184 int argc, | |
| 185 LInstruction* instr, | |
| 186 ContextMode context_mode = CONTEXT_ADJUSTED); | |
| 187 | |
| 188 void CallRuntime(Runtime::FunctionId id, | |
| 189 int argc, | |
| 190 LInstruction* instr, | |
| 191 ContextMode context_mode = CONTEXT_ADJUSTED) { | |
| 173 const Runtime::Function* function = Runtime::FunctionForId(id); | 192 const Runtime::Function* function = Runtime::FunctionForId(id); | 
| 174 CallRuntime(function, argc, instr, adjusted); | 193 CallRuntime(function, argc, instr, context_mode); | 
| 175 } | 194 } | 
| 176 | 195 | 
| 177 // Generate a direct call to a known function. Expects the function | 196 // Generate a direct call to a known function. Expects the function | 
| 178 // to be in edi. | 197 // to be in edi. | 
| 179 void CallKnownFunction(Handle<JSFunction> function, | 198 void CallKnownFunction(Handle<JSFunction> function, | 
| 180 int arity, | 199 int arity, | 
| 181 LInstruction* instr); | 200 LInstruction* instr); | 
| 182 | 201 | 
| 183 void LoadHeapObject(Register result, Handle<HeapObject> object); | 202 void LoadHeapObject(Register result, Handle<HeapObject> object); | 
| 184 | 203 | 
| 185 void RegisterLazyDeoptimization(LInstruction* instr); | 204 void RegisterLazyDeoptimization( | 
| 205 LInstruction* instr, | |
| 206 SafepointMode safepoint_mode = RECORD_SIMPLE_SAFEPOINT); | |
| 207 | |
| 186 void RegisterEnvironmentForDeoptimization(LEnvironment* environment); | 208 void RegisterEnvironmentForDeoptimization(LEnvironment* environment); | 
| 187 void DeoptimizeIf(Condition cc, LEnvironment* environment); | 209 void DeoptimizeIf(Condition cc, LEnvironment* environment); | 
| 188 | 210 | 
| 189 void AddToTranslation(Translation* translation, | 211 void AddToTranslation(Translation* translation, | 
| 190 LOperand* op, | 212 LOperand* op, | 
| 191 bool is_tagged); | 213 bool is_tagged); | 
| 192 void PopulateDeoptimizationData(Handle<Code> code); | 214 void PopulateDeoptimizationData(Handle<Code> code); | 
| 193 int DefineDeoptimizationLiteral(Handle<Object> literal); | 215 int DefineDeoptimizationLiteral(Handle<Object> literal); | 
| 194 | 216 | 
| 195 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 217 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 private: | 331 private: | 
| 310 LCodeGen* codegen_; | 332 LCodeGen* codegen_; | 
| 311 Label entry_; | 333 Label entry_; | 
| 312 Label exit_; | 334 Label exit_; | 
| 313 Label* external_exit_; | 335 Label* external_exit_; | 
| 314 }; | 336 }; | 
| 315 | 337 | 
| 316 } } // namespace v8::internal | 338 } } // namespace v8::internal | 
| 317 | 339 | 
| 318 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 340 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 
| OLD | NEW |