| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 | 73 |
| 74 // Simple accessors. | 74 // Simple accessors. |
| 75 MacroAssembler* masm() const { return masm_; } | 75 MacroAssembler* masm() const { return masm_; } |
| 76 CompilationInfo* info() const { return info_; } | 76 CompilationInfo* info() const { return info_; } |
| 77 Isolate* isolate() const { return info_->isolate(); } | 77 Isolate* isolate() const { return info_->isolate(); } |
| 78 Factory* factory() const { return isolate()->factory(); } | 78 Factory* factory() const { return isolate()->factory(); } |
| 79 Heap* heap() const { return isolate()->heap(); } | 79 Heap* heap() const { return isolate()->heap(); } |
| 80 Zone* zone() const { return zone_; } | 80 Zone* zone() const { return zone_; } |
| 81 | 81 |
| 82 // TODO(svenpanne) Use this consistently. | |
| 83 int LookupDestination(int block_id) const { | 82 int LookupDestination(int block_id) const { |
| 84 return chunk()->LookupDestination(block_id); | 83 return chunk()->LookupDestination(block_id); |
| 85 } | 84 } |
| 86 | 85 |
| 87 bool IsNextEmittedBlock(int block_id) const { | 86 bool IsNextEmittedBlock(int block_id) const { |
| 88 return LookupDestination(block_id) == GetNextEmittedBlock(); | 87 return LookupDestination(block_id) == GetNextEmittedBlock(); |
| 89 } | 88 } |
| 90 | 89 |
| 91 bool NeedsEagerFrame() const { | 90 bool NeedsEagerFrame() const { |
| 92 return GetStackSlotCount() > 0 || | 91 return GetStackSlotCount() > 0 || |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 void DoDeferredNumberTagI(LInstruction* instr, | 143 void DoDeferredNumberTagI(LInstruction* instr, |
| 145 LOperand* value, | 144 LOperand* value, |
| 146 IntegerSignedness signedness); | 145 IntegerSignedness signedness); |
| 147 | 146 |
| 148 void DoDeferredTaggedToI(LTaggedToI* instr); | 147 void DoDeferredTaggedToI(LTaggedToI* instr); |
| 149 void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr); | 148 void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr); |
| 150 void DoDeferredStackCheck(LStackCheck* instr); | 149 void DoDeferredStackCheck(LStackCheck* instr); |
| 151 void DoDeferredRandom(LRandom* instr); | 150 void DoDeferredRandom(LRandom* instr); |
| 152 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); | 151 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); |
| 153 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); | 152 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); |
| 153 void DoDeferredAllocateObject(LAllocateObject* instr); |
| 154 void DoDeferredAllocate(LAllocate* instr); | 154 void DoDeferredAllocate(LAllocate* instr); |
| 155 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, | 155 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, |
| 156 Label* map_check); | 156 Label* map_check); |
| 157 | 157 |
| 158 void DoCheckMapCommon(Register map_reg, Handle<Map> map, LEnvironment* env); | 158 void DoCheckMapCommon(Register map_reg, Handle<Map> map, LEnvironment* env); |
| 159 | 159 |
| 160 // Parallel move support. | 160 // Parallel move support. |
| 161 void DoParallelMove(LParallelMove* move); | 161 void DoParallelMove(LParallelMove* move); |
| 162 void DoGap(LGap* instr); | 162 void DoGap(LGap* instr); |
| 163 | 163 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 void RecordSafepointWithRegisters(LPointerMap* pointers, | 312 void RecordSafepointWithRegisters(LPointerMap* pointers, |
| 313 int arguments, | 313 int arguments, |
| 314 Safepoint::DeoptMode mode); | 314 Safepoint::DeoptMode mode); |
| 315 void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers, | 315 void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers, |
| 316 int arguments, | 316 int arguments, |
| 317 Safepoint::DeoptMode mode); | 317 Safepoint::DeoptMode mode); |
| 318 void RecordPosition(int position); | 318 void RecordPosition(int position); |
| 319 | 319 |
| 320 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 320 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
| 321 void EmitGoto(int block); | 321 void EmitGoto(int block); |
| 322 void EmitBranch(int left_block, int right_block, Condition cc); | 322 template<class InstrType> |
| 323 void EmitBranch(InstrType instr, Condition cc); |
| 323 void EmitNumberUntagD(Register input, | 324 void EmitNumberUntagD(Register input, |
| 324 DwVfpRegister result, | 325 DwVfpRegister result, |
| 325 bool allow_undefined_as_nan, | 326 bool allow_undefined_as_nan, |
| 326 bool deoptimize_on_minus_zero, | 327 bool deoptimize_on_minus_zero, |
| 327 LEnvironment* env, | 328 LEnvironment* env, |
| 328 NumberUntagDMode mode); | 329 NumberUntagDMode mode); |
| 329 | 330 |
| 330 // Emits optimized code for typeof x == "y". Modifies input register. | 331 // Emits optimized code for typeof x == "y". Modifies input register. |
| 331 // Returns the condition on which a final split to | 332 // Returns the condition on which a final split to |
| 332 // true and false label should be made, to optimize fallthrough. | 333 // true and false label should be made, to optimize fallthrough. |
| 333 Condition EmitTypeofIs(Label* true_label, | 334 Condition EmitTypeofIs(Label* true_label, |
| 334 Label* false_label, | 335 Label* false_label, |
| 335 Register input, | 336 Register input, |
| 336 Handle<String> type_name); | 337 Handle<String> type_name); |
| 337 | 338 |
| 338 // Emits optimized code for %_IsObject(x). Preserves input register. | 339 // Emits optimized code for %_IsObject(x). Preserves input register. |
| 339 // Returns the condition on which a final split to | 340 // Returns the condition on which a final split to |
| 340 // true and false label should be made, to optimize fallthrough. | 341 // true and false label should be made, to optimize fallthrough. |
| 341 Condition EmitIsObject(Register input, | 342 Condition EmitIsObject(Register input, |
| 342 Register temp1, | 343 Register temp1, |
| 343 Label* is_not_object, | 344 Label* is_not_object, |
| 344 Label* is_object); | 345 Label* is_object); |
| 345 | 346 |
| 346 // Emits optimized code for %_IsString(x). Preserves input register. | 347 // Emits optimized code for %_IsString(x). Preserves input register. |
| 347 // Returns the condition on which a final split to | 348 // Returns the condition on which a final split to |
| 348 // true and false label should be made, to optimize fallthrough. | 349 // true and false label should be made, to optimize fallthrough. |
| 349 Condition EmitIsString(Register input, | 350 Condition EmitIsString(Register input, |
| 350 Register temp1, | 351 Register temp1, |
| 351 Label* is_not_string); | 352 Label* is_not_string, |
| 353 SmiCheck check_needed); |
| 352 | 354 |
| 353 // Emits optimized code for %_IsConstructCall(). | 355 // Emits optimized code for %_IsConstructCall(). |
| 354 // Caller should branch on equal condition. | 356 // Caller should branch on equal condition. |
| 355 void EmitIsConstructCall(Register temp1, Register temp2); | 357 void EmitIsConstructCall(Register temp1, Register temp2); |
| 356 | 358 |
| 357 void EmitLoadFieldOrConstantFunction(Register result, | 359 void EmitLoadFieldOrConstantFunction(Register result, |
| 358 Register object, | 360 Register object, |
| 359 Handle<Map> type, | 361 Handle<Map> type, |
| 360 Handle<String> name, | 362 Handle<String> name, |
| 361 LEnvironment* env); | 363 LEnvironment* env); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 LCodeGen* codegen_; | 492 LCodeGen* codegen_; |
| 491 Label entry_; | 493 Label entry_; |
| 492 Label exit_; | 494 Label exit_; |
| 493 Label* external_exit_; | 495 Label* external_exit_; |
| 494 int instruction_index_; | 496 int instruction_index_; |
| 495 }; | 497 }; |
| 496 | 498 |
| 497 } } // namespace v8::internal | 499 } } // namespace v8::internal |
| 498 | 500 |
| 499 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 501 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
| OLD | NEW |