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

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

Issue 296003013: - Reduce the number of Isolate::Current() calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 Register array, 465 Register array,
466 Register index); 466 Register index);
467 467
468 // Returns 'sorted' array in decreasing count order. 468 // Returns 'sorted' array in decreasing count order.
469 static void SortICDataByCount(const ICData& ic_data, 469 static void SortICDataByCount(const ICData& ic_data,
470 GrowableArray<CidTarget>* sorted); 470 GrowableArray<CidTarget>* sorted);
471 471
472 private: 472 private:
473 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_. 473 friend class CheckStackOverflowSlowPath; // For pending_deoptimization_env_.
474 474
475 Isolate* isolate() const { return isolate_; }
476
475 void EmitFrameEntry(); 477 void EmitFrameEntry();
476 478
477 void AddStaticCallTarget(const Function& function); 479 void AddStaticCallTarget(const Function& function);
478 480
479 void GenerateDeferredCode(); 481 void GenerateDeferredCode();
480 482
481 void EmitInstructionPrologue(Instruction* instr); 483 void EmitInstructionPrologue(Instruction* instr);
482 void EmitInstructionEpilogue(Instruction* instr); 484 void EmitInstructionEpilogue(Instruction* instr);
483 485
484 // Emit code to load a Value into register 'dst'. 486 // Emit code to load a Value into register 'dst'.
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 569
568 void CompactBlock(BlockEntryInstr* block); 570 void CompactBlock(BlockEntryInstr* block);
569 void CompactBlocks(); 571 void CompactBlocks();
570 572
571 bool IsListClass(const Class& cls) const { 573 bool IsListClass(const Class& cls) const {
572 return cls.raw() == list_class_.raw(); 574 return cls.raw() == list_class_.raw();
573 } 575 }
574 576
575 void EmitSourceLine(Instruction* instr); 577 void EmitSourceLine(Instruction* instr);
576 578
577 class Assembler* assembler_; 579 Isolate* isolate_;
580 Assembler* assembler_;
578 const ParsedFunction& parsed_function_; 581 const ParsedFunction& parsed_function_;
579 const FlowGraph& flow_graph_; 582 const FlowGraph& flow_graph_;
580 const GrowableArray<BlockEntryInstr*>& block_order_; 583 const GrowableArray<BlockEntryInstr*>& block_order_;
581 584
582 // Compiler specific per-block state. Indexed by postorder block number 585 // Compiler specific per-block state. Indexed by postorder block number
583 // for convenience. This is not the block's index in the block order, 586 // for convenience. This is not the block's index in the block order,
584 // which is reverse postorder. 587 // which is reverse postorder.
585 BlockEntryInstr* current_block_; 588 BlockEntryInstr* current_block_;
586 ExceptionHandlerList* exception_handlers_list_; 589 ExceptionHandlerList* exception_handlers_list_;
587 DescriptorList* pc_descriptors_list_; 590 DescriptorList* pc_descriptors_list_;
(...skipping 20 matching lines...) Expand all
608 // that should be used when deoptimizing we store it in this variable. 611 // that should be used when deoptimizing we store it in this variable.
609 // In future AddDeoptStub should be moved out of the instruction template. 612 // In future AddDeoptStub should be moved out of the instruction template.
610 Environment* pending_deoptimization_env_; 613 Environment* pending_deoptimization_env_;
611 614
612 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 615 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
613 }; 616 };
614 617
615 } // namespace dart 618 } // namespace dart
616 619
617 #endif // VM_FLOW_GRAPH_COMPILER_H_ 620 #endif // VM_FLOW_GRAPH_COMPILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698