| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_ | 5 #ifndef VM_FLOW_GRAPH_COMPILER_H_ |
| 6 #define VM_FLOW_GRAPH_COMPILER_H_ | 6 #define VM_FLOW_GRAPH_COMPILER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/assembler_macros.h" | 10 #include "vm/assembler_macros.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 void LoadDoubleOrSmiToFpu(FpuRegister result, | 213 void LoadDoubleOrSmiToFpu(FpuRegister result, |
| 214 Register reg, | 214 Register reg, |
| 215 Register temp, | 215 Register temp, |
| 216 Label* not_double_or_smi); | 216 Label* not_double_or_smi); |
| 217 | 217 |
| 218 // Returns 'true' if code generation for this function is complete, i.e., | 218 // Returns 'true' if code generation for this function is complete, i.e., |
| 219 // no fall-through to regular code is needed. | 219 // no fall-through to regular code is needed. |
| 220 bool TryIntrinsify(); | 220 bool TryIntrinsify(); |
| 221 | 221 |
| 222 void GenerateCallRuntime(intptr_t token_pos, | 222 void GenerateCallRuntime(intptr_t token_pos, |
| 223 intptr_t deopt_id, |
| 223 const RuntimeEntry& entry, | 224 const RuntimeEntry& entry, |
| 224 LocationSummary* locs); | 225 LocationSummary* locs); |
| 225 | 226 |
| 226 void GenerateCall(intptr_t token_pos, | 227 void GenerateCall(intptr_t token_pos, |
| 227 const ExternalLabel* label, | 228 const ExternalLabel* label, |
| 228 PcDescriptors::Kind kind, | 229 PcDescriptors::Kind kind, |
| 229 LocationSummary* locs); | 230 LocationSummary* locs); |
| 230 | 231 |
| 231 void GenerateDartCall(intptr_t deopt_id, | 232 void GenerateDartCall(intptr_t deopt_id, |
| 232 intptr_t token_pos, | 233 intptr_t token_pos, |
| 233 const ExternalLabel* label, | 234 const ExternalLabel* label, |
| 234 PcDescriptors::Kind kind, | 235 PcDescriptors::Kind kind, |
| 235 LocationSummary* locs); | 236 LocationSummary* locs); |
| 236 | 237 |
| 237 void GenerateAssertAssignable(intptr_t token_pos, | 238 void GenerateAssertAssignable(intptr_t token_pos, |
| 239 intptr_t deopt_id, |
| 238 const AbstractType& dst_type, | 240 const AbstractType& dst_type, |
| 239 const String& dst_name, | 241 const String& dst_name, |
| 240 LocationSummary* locs); | 242 LocationSummary* locs); |
| 241 | 243 |
| 242 void GenerateInstanceOf(intptr_t token_pos, | 244 void GenerateInstanceOf(intptr_t token_pos, |
| 245 intptr_t deopt_id, |
| 243 const AbstractType& type, | 246 const AbstractType& type, |
| 244 bool negate_result, | 247 bool negate_result, |
| 245 LocationSummary* locs); | 248 LocationSummary* locs); |
| 246 | 249 |
| 247 void GenerateInstanceCall(intptr_t deopt_id, | 250 void GenerateInstanceCall(intptr_t deopt_id, |
| 248 intptr_t token_pos, | 251 intptr_t token_pos, |
| 249 intptr_t argument_count, | 252 intptr_t argument_count, |
| 250 const Array& argument_names, | 253 const Array& argument_names, |
| 251 LocationSummary* locs, | 254 LocationSummary* locs, |
| 252 const ICData& ic_data); | 255 const ICData& ic_data); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 Register array, | 390 Register array, |
| 388 Register index); | 391 Register index); |
| 389 static Address ExternalElementAddressForIntIndex(intptr_t cid, | 392 static Address ExternalElementAddressForIntIndex(intptr_t cid, |
| 390 Register array, | 393 Register array, |
| 391 intptr_t offset); | 394 intptr_t offset); |
| 392 static Address ExternalElementAddressForRegIndex(intptr_t cid, | 395 static Address ExternalElementAddressForRegIndex(intptr_t cid, |
| 393 Register array, | 396 Register array, |
| 394 Register index); | 397 Register index); |
| 395 | 398 |
| 396 private: | 399 private: |
| 400 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. |
| 401 |
| 397 void EmitFrameEntry(); | 402 void EmitFrameEntry(); |
| 398 | 403 |
| 399 void AddStaticCallTarget(const Function& function); | 404 void AddStaticCallTarget(const Function& function); |
| 400 | 405 |
| 401 void GenerateDeferredCode(); | 406 void GenerateDeferredCode(); |
| 402 | 407 |
| 403 void EmitInstructionPrologue(Instruction* instr); | 408 void EmitInstructionPrologue(Instruction* instr); |
| 404 void EmitInstructionEpilogue(Instruction* instr); | 409 void EmitInstructionEpilogue(Instruction* instr); |
| 405 | 410 |
| 406 // Emit code to load a Value into register 'dst'. | 411 // Emit code to load a Value into register 'dst'. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 // that should be used when deoptimizing we store it in this variable. | 519 // that should be used when deoptimizing we store it in this variable. |
| 515 // In future AddDeoptStub should be moved out of the instruction template. | 520 // In future AddDeoptStub should be moved out of the instruction template. |
| 516 Environment* pending_deoptimization_env_; | 521 Environment* pending_deoptimization_env_; |
| 517 | 522 |
| 518 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 523 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 519 }; | 524 }; |
| 520 | 525 |
| 521 } // namespace dart | 526 } // namespace dart |
| 522 | 527 |
| 523 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 528 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |