| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 } | 95 } |
| 96 bool NeedsDeferredFrame() const { | 96 bool NeedsDeferredFrame() const { |
| 97 return !NeedsEagerFrame() && info()->is_deferred_calling(); | 97 return !NeedsEagerFrame() && info()->is_deferred_calling(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 // Support for converting LOperands to assembler types. | 100 // Support for converting LOperands to assembler types. |
| 101 Register ToRegister(LOperand* op) const; | 101 Register ToRegister(LOperand* op) const; |
| 102 XMMRegister ToDoubleRegister(LOperand* op) const; | 102 XMMRegister ToDoubleRegister(LOperand* op) const; |
| 103 bool IsInteger32Constant(LConstantOperand* op) const; | 103 bool IsInteger32Constant(LConstantOperand* op) const; |
| 104 bool IsSmiConstant(LConstantOperand* op) const; | 104 bool IsSmiConstant(LConstantOperand* op) const; |
| 105 int ToRepresentation(LConstantOperand* op, const Representation& r) const; |
| 105 int32_t ToInteger32(LConstantOperand* op) const; | 106 int32_t ToInteger32(LConstantOperand* op) const; |
| 106 Smi* ToSmi(LConstantOperand* op) const; | 107 Smi* ToSmi(LConstantOperand* op) const; |
| 107 double ToDouble(LConstantOperand* op) const; | 108 double ToDouble(LConstantOperand* op) const; |
| 108 ExternalReference ToExternalReference(LConstantOperand* op) const; | 109 ExternalReference ToExternalReference(LConstantOperand* op) const; |
| 109 bool IsTaggedConstant(LConstantOperand* op) const; | 110 bool IsTaggedConstant(LConstantOperand* op) const; |
| 110 Handle<Object> ToHandle(LConstantOperand* op) const; | 111 Handle<Object> ToHandle(LConstantOperand* op) const; |
| 111 Operand ToOperand(LOperand* op) const; | 112 Operand ToOperand(LOperand* op) const; |
| 112 | 113 |
| 113 // Try to generate code for the entire chunk, but it may fail if the | 114 // Try to generate code for the entire chunk, but it may fail if the |
| 114 // chunk contains constructs we cannot handle. Returns true if the | 115 // chunk contains constructs we cannot handle. Returns true if the |
| 115 // code generation attempt succeeded. | 116 // code generation attempt succeeded. |
| 116 bool GenerateCode(); | 117 bool GenerateCode(); |
| 117 | 118 |
| 118 // Finish the code by setting stack height, safepoint, and bailout | 119 // Finish the code by setting stack height, safepoint, and bailout |
| 119 // information on it. | 120 // information on it. |
| 120 void FinishCode(Handle<Code> code); | 121 void FinishCode(Handle<Code> code); |
| 121 | 122 |
| 122 // Deferred code support. | 123 // Deferred code support. |
| 123 void DoDeferredNumberTagD(LNumberTagD* instr); | 124 void DoDeferredNumberTagD(LNumberTagD* instr); |
| 124 void DoDeferredNumberTagU(LNumberTagU* instr); | 125 void DoDeferredNumberTagU(LNumberTagU* instr); |
| 125 void DoDeferredTaggedToI(LTaggedToI* instr); | 126 void DoDeferredTaggedToI(LTaggedToI* instr); |
| 126 void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr); | 127 void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr); |
| 127 void DoDeferredStackCheck(LStackCheck* instr); | 128 void DoDeferredStackCheck(LStackCheck* instr); |
| 128 void DoDeferredRandom(LRandom* instr); | 129 void DoDeferredRandom(LRandom* instr); |
| 129 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); | 130 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); |
| 130 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); | 131 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); |
| 131 void DoDeferredAllocate(LAllocate* instr); | 132 void DoDeferredAllocate(LAllocate* instr); |
| 132 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, | 133 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, |
| 133 Label* map_check); | 134 Label* map_check); |
| 134 void DoDeferredInstanceMigration(LCheckMaps* instr, Register object); | 135 |
| 136 void DoCheckMapCommon(Register reg, Handle<Map> map, LInstruction* instr); |
| 135 | 137 |
| 136 // Parallel move support. | 138 // Parallel move support. |
| 137 void DoParallelMove(LParallelMove* move); | 139 void DoParallelMove(LParallelMove* move); |
| 138 void DoGap(LGap* instr); | 140 void DoGap(LGap* instr); |
| 139 | 141 |
| 140 // Emit frame translation commands for an environment. | 142 // Emit frame translation commands for an environment. |
| 141 void WriteTranslation(LEnvironment* environment, Translation* translation); | 143 void WriteTranslation(LEnvironment* environment, Translation* translation); |
| 142 | 144 |
| 143 // Declare methods that deal with the individual node types. | 145 // Declare methods that deal with the individual node types. |
| 144 #define DECLARE_DO(type) void Do##type(L##type* node); | 146 #define DECLARE_DO(type) void Do##type(L##type* node); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 170 | 172 |
| 171 void EmitClassOfTest(Label* if_true, | 173 void EmitClassOfTest(Label* if_true, |
| 172 Label* if_false, | 174 Label* if_false, |
| 173 Handle<String> class_name, | 175 Handle<String> class_name, |
| 174 Register input, | 176 Register input, |
| 175 Register temporary, | 177 Register temporary, |
| 176 Register scratch); | 178 Register scratch); |
| 177 | 179 |
| 178 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } | 180 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
| 179 | 181 |
| 180 void Abort(BailoutReason reason); | 182 void Abort(const char* reason); |
| 181 void FPRINTF_CHECKING Comment(const char* format, ...); | 183 void FPRINTF_CHECKING Comment(const char* format, ...); |
| 182 | 184 |
| 183 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } | 185 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } |
| 184 | 186 |
| 185 // Code generation passes. Returns true if code generation should | 187 // Code generation passes. Returns true if code generation should |
| 186 // continue. | 188 // continue. |
| 187 bool GeneratePrologue(); | 189 bool GeneratePrologue(); |
| 188 bool GenerateBody(); | 190 bool GenerateBody(); |
| 189 bool GenerateDeferredCode(); | 191 bool GenerateDeferredCode(); |
| 190 bool GenerateJumpTable(); | 192 bool GenerateJumpTable(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 Register ToRegister(int index) const; | 261 Register ToRegister(int index) const; |
| 260 XMMRegister ToDoubleRegister(int index) const; | 262 XMMRegister ToDoubleRegister(int index) const; |
| 261 Operand BuildFastArrayOperand( | 263 Operand BuildFastArrayOperand( |
| 262 LOperand* elements_pointer, | 264 LOperand* elements_pointer, |
| 263 LOperand* key, | 265 LOperand* key, |
| 264 ElementsKind elements_kind, | 266 ElementsKind elements_kind, |
| 265 uint32_t offset, | 267 uint32_t offset, |
| 266 uint32_t additional_index = 0); | 268 uint32_t additional_index = 0); |
| 267 | 269 |
| 268 void EmitIntegerMathAbs(LMathAbs* instr); | 270 void EmitIntegerMathAbs(LMathAbs* instr); |
| 269 void EmitInteger64MathAbs(LMathAbs* instr); | |
| 270 | 271 |
| 271 // Support for recording safepoint and position information. | 272 // Support for recording safepoint and position information. |
| 272 void RecordSafepoint(LPointerMap* pointers, | 273 void RecordSafepoint(LPointerMap* pointers, |
| 273 Safepoint::Kind kind, | 274 Safepoint::Kind kind, |
| 274 int arguments, | 275 int arguments, |
| 275 Safepoint::DeoptMode mode); | 276 Safepoint::DeoptMode mode); |
| 276 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); | 277 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); |
| 277 void RecordSafepoint(Safepoint::DeoptMode mode); | 278 void RecordSafepoint(Safepoint::DeoptMode mode); |
| 278 void RecordSafepointWithRegisters(LPointerMap* pointers, | 279 void RecordSafepointWithRegisters(LPointerMap* pointers, |
| 279 int arguments, | 280 int arguments, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 LCodeGen* codegen_; | 435 LCodeGen* codegen_; |
| 435 Label entry_; | 436 Label entry_; |
| 436 Label exit_; | 437 Label exit_; |
| 437 Label* external_exit_; | 438 Label* external_exit_; |
| 438 int instruction_index_; | 439 int instruction_index_; |
| 439 }; | 440 }; |
| 440 | 441 |
| 441 } } // namespace v8::internal | 442 } } // namespace v8::internal |
| 442 | 443 |
| 443 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ | 444 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ |
| OLD | NEW |