| 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_PPC_LITHIUM_CODEGEN_PPC_H_ | 5 #ifndef V8_PPC_LITHIUM_CODEGEN_PPC_H_ |
| 6 #define V8_PPC_LITHIUM_CODEGEN_PPC_H_ | 6 #define V8_PPC_LITHIUM_CODEGEN_PPC_H_ |
| 7 | 7 |
| 8 #include "src/ppc/lithium-ppc.h" | 8 #include "src/ppc/lithium-ppc.h" |
| 9 | 9 |
| 10 #include "src/ppc/lithium-gap-resolver-ppc.h" | 10 #include "src/ppc/lithium-gap-resolver-ppc.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 // Emit frame translation commands for an environment. | 129 // Emit frame translation commands for an environment. |
| 130 void WriteTranslation(LEnvironment* environment, Translation* translation); | 130 void WriteTranslation(LEnvironment* environment, Translation* translation); |
| 131 | 131 |
| 132 // Declare methods that deal with the individual node types. | 132 // Declare methods that deal with the individual node types. |
| 133 #define DECLARE_DO(type) void Do##type(L##type* node); | 133 #define DECLARE_DO(type) void Do##type(L##type* node); |
| 134 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 134 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
| 135 #undef DECLARE_DO | 135 #undef DECLARE_DO |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 StrictMode strict_mode() const { return info()->strict_mode(); } | 138 LanguageMode language_mode() const { return info()->language_mode(); } |
| 139 | 139 |
| 140 Scope* scope() const { return scope_; } | 140 Scope* scope() const { return scope_; } |
| 141 | 141 |
| 142 Register scratch0() { return r11; } | 142 Register scratch0() { return r11; } |
| 143 DoubleRegister double_scratch0() { return kScratchDoubleReg; } | 143 DoubleRegister double_scratch0() { return kScratchDoubleReg; } |
| 144 | 144 |
| 145 LInstruction* GetNextInstruction(); | 145 LInstruction* GetNextInstruction(); |
| 146 | 146 |
| 147 void EmitClassOfTest(Label* if_true, Label* if_false, | 147 void EmitClassOfTest(Label* if_true, Label* if_false, |
| 148 Handle<String> class_name, Register input, | 148 Handle<String> class_name, Register input, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 void CallRuntime(Runtime::FunctionId id, int num_arguments, | 183 void CallRuntime(Runtime::FunctionId id, int num_arguments, |
| 184 LInstruction* instr) { | 184 LInstruction* instr) { |
| 185 const Runtime::Function* function = Runtime::FunctionForId(id); | 185 const Runtime::Function* function = Runtime::FunctionForId(id); |
| 186 CallRuntime(function, num_arguments, instr); | 186 CallRuntime(function, num_arguments, instr); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void LoadContextFromDeferred(LOperand* context); | 189 void LoadContextFromDeferred(LOperand* context); |
| 190 void CallRuntimeFromDeferred(Runtime::FunctionId id, int argc, | 190 void CallRuntimeFromDeferred(Runtime::FunctionId id, int argc, |
| 191 LInstruction* instr, LOperand* context); | 191 LInstruction* instr, LOperand* context); |
| 192 | 192 |
| 193 enum R4State { R4_UNINITIALIZED, R4_CONTAINS_TARGET }; | |
| 194 | |
| 195 // Generate a direct call to a known function. Expects the function | 193 // Generate a direct call to a known function. Expects the function |
| 196 // to be in r4. | 194 // to be in r4. |
| 197 void CallKnownFunction(Handle<JSFunction> function, | 195 void CallKnownFunction(Handle<JSFunction> function, |
| 198 int formal_parameter_count, int arity, | 196 int formal_parameter_count, int arity, |
| 199 LInstruction* instr, R4State r4_state); | 197 LInstruction* instr); |
| 200 | 198 |
| 201 void RecordSafepointWithLazyDeopt(LInstruction* instr, | 199 void RecordSafepointWithLazyDeopt(LInstruction* instr, |
| 202 SafepointMode safepoint_mode); | 200 SafepointMode safepoint_mode); |
| 203 | 201 |
| 204 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, | 202 void RegisterEnvironmentForDeoptimization(LEnvironment* environment, |
| 205 Safepoint::DeoptMode mode); | 203 Safepoint::DeoptMode mode); |
| 206 void DeoptimizeIf(Condition condition, LInstruction* instr, | 204 void DeoptimizeIf(Condition condition, LInstruction* instr, |
| 207 const char* detail, Deoptimizer::BailoutType bailout_type, | 205 Deoptimizer::DeoptReason deopt_reason, |
| 208 CRegister cr = cr7); | 206 Deoptimizer::BailoutType bailout_type, CRegister cr = cr7); |
| 209 void DeoptimizeIf(Condition condition, LInstruction* instr, | 207 void DeoptimizeIf(Condition condition, LInstruction* instr, |
| 210 const char* detail, CRegister cr = cr7); | 208 Deoptimizer::DeoptReason deopt_reason, CRegister cr = cr7); |
| 211 | 209 |
| 212 void AddToTranslation(LEnvironment* environment, Translation* translation, | 210 void AddToTranslation(LEnvironment* environment, Translation* translation, |
| 213 LOperand* op, bool is_tagged, bool is_uint32, | 211 LOperand* op, bool is_tagged, bool is_uint32, |
| 214 int* object_index_pointer, | 212 int* object_index_pointer, |
| 215 int* dematerialized_index_pointer); | 213 int* dematerialized_index_pointer); |
| 216 void PopulateDeoptimizationData(Handle<Code> code); | 214 void PopulateDeoptimizationData(Handle<Code> code); |
| 217 int DefineDeoptimizationLiteral(Handle<Object> literal); | 215 int DefineDeoptimizationLiteral(Handle<Object> literal); |
| 218 | 216 |
| 219 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 217 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
| 220 | 218 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 LCodeGen* codegen_; | 361 LCodeGen* codegen_; |
| 364 Label entry_; | 362 Label entry_; |
| 365 Label exit_; | 363 Label exit_; |
| 366 Label* external_exit_; | 364 Label* external_exit_; |
| 367 int instruction_index_; | 365 int instruction_index_; |
| 368 }; | 366 }; |
| 369 } | 367 } |
| 370 } // namespace v8::internal | 368 } // namespace v8::internal |
| 371 | 369 |
| 372 #endif // V8_PPC_LITHIUM_CODEGEN_PPC_H_ | 370 #endif // V8_PPC_LITHIUM_CODEGEN_PPC_H_ |
| OLD | NEW |