| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Zone* zone() const { return zone_; } | 77 Zone* zone() const { return zone_; } |
| 78 HGraph* graph() const { return chunk()->graph(); } | 78 HGraph* graph() const { return chunk()->graph(); } |
| 79 LPlatformChunk* chunk() const { return chunk_; } | 79 LPlatformChunk* chunk() const { return chunk_; } |
| 80 Isolate* isolate() const { return info_->isolate(); } | 80 Isolate* isolate() const { return info_->isolate(); } |
| 81 Factory* factory() const { return isolate()->factory(); } | 81 Factory* factory() const { return isolate()->factory(); } |
| 82 Scope* scope() const { return scope_; } | 82 Scope* scope() const { return scope_; } |
| 83 Heap* heap() const { return isolate()->heap(); } | 83 Heap* heap() const { return isolate()->heap(); } |
| 84 | 84 |
| 85 // TODO(svenpanne) Use this consistently. | |
| 86 int LookupDestination(int block_id) const { | 85 int LookupDestination(int block_id) const { |
| 87 return chunk()->LookupDestination(block_id); | 86 return chunk()->LookupDestination(block_id); |
| 88 } | 87 } |
| 89 | 88 |
| 90 bool IsNextEmittedBlock(int block_id) const { | 89 bool IsNextEmittedBlock(int block_id) const { |
| 91 return LookupDestination(block_id) == GetNextEmittedBlock(); | 90 return LookupDestination(block_id) == GetNextEmittedBlock(); |
| 92 } | 91 } |
| 93 | 92 |
| 94 bool NeedsEagerFrame() const { | 93 bool NeedsEagerFrame() const { |
| 95 return GetStackSlotCount() > 0 || | 94 return GetStackSlotCount() > 0 || |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 void DoDeferredNumberTagI(LInstruction* instr, | 167 void DoDeferredNumberTagI(LInstruction* instr, |
| 169 LOperand* value, | 168 LOperand* value, |
| 170 LOperand* temp1, | 169 LOperand* temp1, |
| 171 LOperand* temp2, | 170 LOperand* temp2, |
| 172 IntegerSignedness signedness); | 171 IntegerSignedness signedness); |
| 173 void DoDeferredTaggedToI(LTaggedToI* instr, | 172 void DoDeferredTaggedToI(LTaggedToI* instr, |
| 174 LOperand* value, | 173 LOperand* value, |
| 175 LOperand* temp1, | 174 LOperand* temp1, |
| 176 LOperand* temp2); | 175 LOperand* temp2); |
| 177 void DoDeferredAllocate(LAllocate* instr); | 176 void DoDeferredAllocate(LAllocate* instr); |
| 177 void DoDeferredAllocateObject(LAllocateObject* instr); |
| 178 | 178 |
| 179 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, | 179 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, |
| 180 Label* map_check); | 180 Label* map_check); |
| 181 | 181 |
| 182 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 182 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
| 183 void EmitGoto(int block); | 183 void EmitGoto(int block); |
| 184 int GetNextEmittedBlock() const; | 184 int GetNextEmittedBlock() const; |
| 185 void DoGap(LGap* instr); | 185 void DoGap(LGap* instr); |
| 186 | 186 |
| 187 // Generic version of EmitBranch. It contains some code to avoid emitting a | 187 // Generic version of EmitBranch. It contains some code to avoid emitting a |
| (...skipping 12 matching lines...) Expand all Loading... |
| 200 Condition condition, | 200 Condition condition, |
| 201 const Register& lhs, | 201 const Register& lhs, |
| 202 const Operand& rhs); | 202 const Operand& rhs); |
| 203 | 203 |
| 204 template<class InstrType> | 204 template<class InstrType> |
| 205 void EmitTestAndBranch(InstrType instr, | 205 void EmitTestAndBranch(InstrType instr, |
| 206 Condition condition, | 206 Condition condition, |
| 207 const Register& value, | 207 const Register& value, |
| 208 uint64_t mask); | 208 uint64_t mask); |
| 209 | 209 |
| 210 template<class InstrType> |
| 211 void EmitBranchIfNonZeroNumber(InstrType instr, |
| 212 const FPRegister& value, |
| 213 const FPRegister& scratch); |
| 214 |
| 210 // Emits optimized code to deep-copy the contents of statically known object | 215 // Emits optimized code to deep-copy the contents of statically known object |
| 211 // graphs (e.g. object literal boilerplate). Expects a pointer to the | 216 // graphs (e.g. object literal boilerplate). Expects a pointer to the |
| 212 // allocated destination object in the result register, and a pointer to the | 217 // allocated destination object in the result register, and a pointer to the |
| 213 // source object in the source register. | 218 // source object in the source register. |
| 214 void EmitDeepCopy(Handle<JSObject> object, | 219 void EmitDeepCopy(Handle<JSObject> object, |
| 215 Register result, | 220 Register result, |
| 216 Register source, | 221 Register source, |
| 217 Register scratch, | 222 Register scratch, |
| 218 int* offset, | 223 int* offset, |
| 219 AllocationSiteMode mode); | 224 AllocationSiteMode mode); |
| 220 | 225 |
| 221 // Emits optimized code for %_IsString(x). Preserves input register. | 226 // Emits optimized code for %_IsString(x). Preserves input register. |
| 222 // Returns the condition on which a final split to | 227 // Returns the condition on which a final split to |
| 223 // true and false label should be made, to optimize fallthrough. | 228 // true and false label should be made, to optimize fallthrough. |
| 224 Condition EmitIsString(Register input, Register temp1, Label* is_not_string); | 229 Condition EmitIsString(Register input, Register temp1, Label* is_not_string, |
| 230 SmiCheck check_needed); |
| 225 | 231 |
| 226 void EmitLoadFieldOrConstantFunction(Register result, | 232 void EmitLoadFieldOrConstantFunction(Register result, |
| 227 Register object, | 233 Register object, |
| 228 Handle<Map> type, | 234 Handle<Map> type, |
| 229 Handle<String> name, | 235 Handle<String> name, |
| 230 LEnvironment* env); | 236 LEnvironment* env); |
| 231 | 237 |
| 232 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code); | 238 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code); |
| 233 int DefineDeoptimizationLiteral(Handle<Object> literal); | 239 int DefineDeoptimizationLiteral(Handle<Object> literal); |
| 234 void PopulateDeoptimizationData(Handle<Code> code); | 240 void PopulateDeoptimizationData(Handle<Code> code); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 | 477 |
| 472 protected: | 478 protected: |
| 473 MacroAssembler* masm() const { return codegen_->masm(); } | 479 MacroAssembler* masm() const { return codegen_->masm(); } |
| 474 | 480 |
| 475 LCodeGen* codegen_; | 481 LCodeGen* codegen_; |
| 476 }; | 482 }; |
| 477 | 483 |
| 478 } } // namespace v8::internal | 484 } } // namespace v8::internal |
| 479 | 485 |
| 480 #endif // V8_A64_LITHIUM_CODEGEN_A64_H_ | 486 #endif // V8_A64_LITHIUM_CODEGEN_A64_H_ |
| OLD | NEW |