| 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/code_descriptors.h" | 10 #include "vm/code_descriptors.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 313 |
| 314 void CompileGraph(); | 314 void CompileGraph(); |
| 315 | 315 |
| 316 void VisitBlocks(); | 316 void VisitBlocks(); |
| 317 | 317 |
| 318 // Bail out of the flow graph compiler. Does not return to the caller. | 318 // Bail out of the flow graph compiler. Does not return to the caller. |
| 319 void Bailout(const char* reason); | 319 void Bailout(const char* reason); |
| 320 | 320 |
| 321 void TryIntrinsify(); | 321 void TryIntrinsify(); |
| 322 | 322 |
| 323 void RecordCallInfo(intptr_t token_pos, |
| 324 RawPcDescriptors::Kind kind, |
| 325 intptr_t deopt_id, |
| 326 LocationSummary* locs, |
| 327 intptr_t input_count_adjustment); |
| 328 |
| 323 void GenerateRuntimeCall(intptr_t token_pos, | 329 void GenerateRuntimeCall(intptr_t token_pos, |
| 324 intptr_t deopt_id, | 330 intptr_t deopt_id, |
| 325 const RuntimeEntry& entry, | 331 const RuntimeEntry& entry, |
| 326 intptr_t argument_count, | 332 intptr_t argument_count, |
| 327 LocationSummary* locs); | 333 LocationSummary* locs); |
| 328 | 334 |
| 329 void GenerateCall(intptr_t token_pos, | 335 void GenerateCall(intptr_t token_pos, |
| 330 const ExternalLabel* label, | 336 const ExternalLabel* label, |
| 331 RawPcDescriptors::Kind kind, | 337 RawPcDescriptors::Kind kind, |
| 332 LocationSummary* locs); | 338 LocationSummary* locs); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 bool needs_stacktrace); | 448 bool needs_stacktrace); |
| 443 void SetNeedsStacktrace(intptr_t try_index); | 449 void SetNeedsStacktrace(intptr_t try_index); |
| 444 void AddCurrentDescriptor(RawPcDescriptors::Kind kind, | 450 void AddCurrentDescriptor(RawPcDescriptors::Kind kind, |
| 445 intptr_t deopt_id, | 451 intptr_t deopt_id, |
| 446 intptr_t token_pos); | 452 intptr_t token_pos); |
| 447 | 453 |
| 448 void RecordSafepoint(LocationSummary* locs); | 454 void RecordSafepoint(LocationSummary* locs); |
| 449 | 455 |
| 450 Label* AddDeoptStub(intptr_t deopt_id, ICData::DeoptReasonId reason); | 456 Label* AddDeoptStub(intptr_t deopt_id, ICData::DeoptReasonId reason); |
| 451 | 457 |
| 452 void AddDeoptIndexAtCall(intptr_t deopt_id, intptr_t token_pos); | |
| 453 | |
| 454 void AddSlowPathCode(SlowPathCode* slow_path); | 458 void AddSlowPathCode(SlowPathCode* slow_path); |
| 455 | 459 |
| 456 void FinalizeExceptionHandlers(const Code& code); | 460 void FinalizeExceptionHandlers(const Code& code); |
| 457 void FinalizePcDescriptors(const Code& code); | 461 void FinalizePcDescriptors(const Code& code); |
| 458 void FinalizeDeoptInfo(const Code& code); | 462 void FinalizeDeoptInfo(const Code& code); |
| 459 void FinalizeStackmaps(const Code& code); | 463 void FinalizeStackmaps(const Code& code); |
| 460 void FinalizeVarDescriptors(const Code& code); | 464 void FinalizeVarDescriptors(const Code& code); |
| 461 void FinalizeStaticCallTargetsTable(const Code& code); | 465 void FinalizeStaticCallTargetsTable(const Code& code); |
| 462 | 466 |
| 463 const Class& double_class() const { return double_class_; } | 467 const Class& double_class() const { return double_class_; } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 505 |
| 502 Isolate* isolate() const { return isolate_; } | 506 Isolate* isolate() const { return isolate_; } |
| 503 | 507 |
| 504 private: | 508 private: |
| 505 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. | 509 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. |
| 506 | 510 |
| 507 void EmitFrameEntry(); | 511 void EmitFrameEntry(); |
| 508 | 512 |
| 509 void AddStaticCallTarget(const Function& function); | 513 void AddStaticCallTarget(const Function& function); |
| 510 | 514 |
| 515 void AddDeoptIndexAtCall(intptr_t deopt_id, |
| 516 intptr_t token_pos, |
| 517 intptr_t input_count); |
| 518 |
| 511 void GenerateDeferredCode(); | 519 void GenerateDeferredCode(); |
| 512 | 520 |
| 513 void EmitInstructionPrologue(Instruction* instr); | 521 void EmitInstructionPrologue(Instruction* instr); |
| 514 void EmitInstructionEpilogue(Instruction* instr); | 522 void EmitInstructionEpilogue(Instruction* instr); |
| 515 | 523 |
| 516 // Emit code to load a Value into register 'dst'. | 524 // Emit code to load a Value into register 'dst'. |
| 517 void LoadValue(Register dst, Value* value); | 525 void LoadValue(Register dst, Value* value); |
| 518 | 526 |
| 519 void EmitOptimizedStaticCall(const Function& function, | 527 void EmitOptimizedStaticCall(const Function& function, |
| 520 const Array& arguments_descriptor, | 528 const Array& arguments_descriptor, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 intptr_t lazy_deopt_pc_offset_; | 660 intptr_t lazy_deopt_pc_offset_; |
| 653 | 661 |
| 654 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; | 662 ZoneGrowableArray<const ICData*>* deopt_id_to_ic_data_; |
| 655 | 663 |
| 656 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 664 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 657 }; | 665 }; |
| 658 | 666 |
| 659 } // namespace dart | 667 } // namespace dart |
| 660 | 668 |
| 661 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 669 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
| OLD | NEW |