Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: runtime/vm/flow_graph_compiler.h

Issue 575443002: Refactor generating lazy deoptimization descriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 void AddExceptionHandler(intptr_t try_index, 444 void AddExceptionHandler(intptr_t try_index,
439 intptr_t outer_try_index, 445 intptr_t outer_try_index,
440 intptr_t pc_offset, 446 intptr_t pc_offset,
441 const Array& handler_types, 447 const Array& handler_types,
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);
449
450 Label* AddDeoptStub(intptr_t deopt_id, ICData::DeoptReasonId reason); 454 Label* AddDeoptStub(intptr_t deopt_id, ICData::DeoptReasonId reason);
451 455
452 void AddDeoptIndexAtCall(intptr_t deopt_id, intptr_t token_pos);
453
454 void AddSlowPathCode(SlowPathCode* slow_path); 456 void AddSlowPathCode(SlowPathCode* slow_path);
455 457
456 void FinalizeExceptionHandlers(const Code& code); 458 void FinalizeExceptionHandlers(const Code& code);
457 void FinalizePcDescriptors(const Code& code); 459 void FinalizePcDescriptors(const Code& code);
458 void FinalizeDeoptInfo(const Code& code); 460 void FinalizeDeoptInfo(const Code& code);
459 void FinalizeStackmaps(const Code& code); 461 void FinalizeStackmaps(const Code& code);
460 void FinalizeVarDescriptors(const Code& code); 462 void FinalizeVarDescriptors(const Code& code);
461 void FinalizeStaticCallTargetsTable(const Code& code); 463 void FinalizeStaticCallTargetsTable(const Code& code);
462 464
463 const Class& double_class() const { return double_class_; } 465 const Class& double_class() const { return double_class_; }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 return *deopt_id_to_ic_data_; 501 return *deopt_id_to_ic_data_;
500 } 502 }
501 503
502 Isolate* isolate() const { return isolate_; } 504 Isolate* isolate() const { return isolate_; }
503 505
504 private: 506 private:
505 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. 507 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_.
506 508
507 void EmitFrameEntry(); 509 void EmitFrameEntry();
508 510
511 void RecordSafepoint(LocationSummary* locs);
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
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_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698