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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
409 bool needs_stacktrace); | 409 bool needs_stacktrace); |
410 void SetNeedsStacktrace(intptr_t try_index); | 410 void SetNeedsStacktrace(intptr_t try_index); |
411 void AddCurrentDescriptor(PcDescriptors::Kind kind, | 411 void AddCurrentDescriptor(PcDescriptors::Kind kind, |
412 intptr_t deopt_id, | 412 intptr_t deopt_id, |
413 intptr_t token_pos); | 413 intptr_t token_pos); |
414 | 414 |
415 void RecordSafepoint(LocationSummary* locs); | 415 void RecordSafepoint(LocationSummary* locs); |
416 | 416 |
417 Label* AddDeoptStub(intptr_t deopt_id, ICData::DeoptReasonId reason); | 417 Label* AddDeoptStub(intptr_t deopt_id, ICData::DeoptReasonId reason); |
418 | 418 |
419 void AddDeoptIndexAtCall(intptr_t deopt_id, intptr_t token_pos); | 419 void AddDeoptIndexAtCall(intptr_t deopt_id, |
420 intptr_t token_pos, | |
421 intptr_t stack_adjustment = 0); | |
srdjan
2014/04/30 15:41:58
Since this is public, please explain briefly what
Florian Schneider
2014/04/30 16:02:19
Done. Added comment to the implementation and rena
| |
420 | 422 |
421 void AddSlowPathCode(SlowPathCode* slow_path); | 423 void AddSlowPathCode(SlowPathCode* slow_path); |
422 | 424 |
423 void FinalizeExceptionHandlers(const Code& code); | 425 void FinalizeExceptionHandlers(const Code& code); |
424 void FinalizePcDescriptors(const Code& code); | 426 void FinalizePcDescriptors(const Code& code); |
425 void FinalizeDeoptInfo(const Code& code); | 427 void FinalizeDeoptInfo(const Code& code); |
426 void FinalizeStackmaps(const Code& code); | 428 void FinalizeStackmaps(const Code& code); |
427 void FinalizeVarDescriptors(const Code& code); | 429 void FinalizeVarDescriptors(const Code& code); |
428 void FinalizeStaticCallTargetsTable(const Code& code); | 430 void FinalizeStaticCallTargetsTable(const Code& code); |
429 | 431 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
463 static Address ExternalElementAddressForRegIndex(intptr_t index_scale, | 465 static Address ExternalElementAddressForRegIndex(intptr_t index_scale, |
464 Register array, | 466 Register array, |
465 Register index); | 467 Register index); |
466 | 468 |
467 // Returns 'sorted' array in decreasing count order. | 469 // Returns 'sorted' array in decreasing count order. |
468 static void SortICDataByCount(const ICData& ic_data, | 470 static void SortICDataByCount(const ICData& ic_data, |
469 GrowableArray<CidTarget>* sorted); | 471 GrowableArray<CidTarget>* sorted); |
470 | 472 |
471 private: | 473 private: |
472 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. | 474 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. |
475 friend class ClosureCallInstr; // For pending_deoptimization_env_. | |
473 | 476 |
474 void EmitFrameEntry(); | 477 void EmitFrameEntry(); |
475 | 478 |
476 void AddStaticCallTarget(const Function& function); | 479 void AddStaticCallTarget(const Function& function); |
477 | 480 |
478 void GenerateDeferredCode(); | 481 void GenerateDeferredCode(); |
479 | 482 |
480 void EmitInstructionPrologue(Instruction* instr); | 483 void EmitInstructionPrologue(Instruction* instr); |
481 void EmitInstructionEpilogue(Instruction* instr); | 484 void EmitInstructionEpilogue(Instruction* instr); |
482 | 485 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
605 // that should be used when deoptimizing we store it in this variable. | 608 // that should be used when deoptimizing we store it in this variable. |
606 // In future AddDeoptStub should be moved out of the instruction template. | 609 // In future AddDeoptStub should be moved out of the instruction template. |
607 Environment* pending_deoptimization_env_; | 610 Environment* pending_deoptimization_env_; |
608 | 611 |
609 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 612 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
610 }; | 613 }; |
611 | 614 |
612 } // namespace dart | 615 } // namespace dart |
613 | 616 |
614 #endif // VM_FLOW_GRAPH_COMPILER_H_ | 617 #endif // VM_FLOW_GRAPH_COMPILER_H_ |
OLD | NEW |