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

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

Issue 855533002: Isolate/Thread split: Isolate -> Zone for LocationSummary. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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_compiler.cc ('k') | runtime/vm/intermediate_language.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 virtual type##Instr* As##type() { return this; } \ 580 virtual type##Instr* As##type() { return this; } \
581 virtual const char* DebugName() const { return #type; } \ 581 virtual const char* DebugName() const { return #type; } \
582 582
583 // Functions required in all concrete instruction classes. 583 // Functions required in all concrete instruction classes.
584 #define DECLARE_INSTRUCTION_NO_BACKEND(type) \ 584 #define DECLARE_INSTRUCTION_NO_BACKEND(type) \
585 virtual Tag tag() const { return k##type; } \ 585 virtual Tag tag() const { return k##type; } \
586 virtual void Accept(FlowGraphVisitor* visitor); \ 586 virtual void Accept(FlowGraphVisitor* visitor); \
587 DEFINE_INSTRUCTION_TYPE_CHECK(type) 587 DEFINE_INSTRUCTION_TYPE_CHECK(type)
588 588
589 #define DECLARE_INSTRUCTION_BACKEND() \ 589 #define DECLARE_INSTRUCTION_BACKEND() \
590 virtual LocationSummary* MakeLocationSummary(Isolate* isolate, \ 590 virtual LocationSummary* MakeLocationSummary(Zone* zone, \
591 bool optimizing) const; \ 591 bool optimizing) const; \
592 virtual void EmitNativeCode(FlowGraphCompiler* compiler); \ 592 virtual void EmitNativeCode(FlowGraphCompiler* compiler); \
593 593
594 // Functions required in all concrete instruction classes. 594 // Functions required in all concrete instruction classes.
595 #define DECLARE_INSTRUCTION(type) \ 595 #define DECLARE_INSTRUCTION(type) \
596 DECLARE_INSTRUCTION_NO_BACKEND(type) \ 596 DECLARE_INSTRUCTION_NO_BACKEND(type) \
597 DECLARE_INSTRUCTION_BACKEND() \ 597 DECLARE_INSTRUCTION_BACKEND() \
598 598
599 class Instruction : public ZoneAllocated { 599 class Instruction : public ZoneAllocated {
600 public: 600 public:
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 718
719 // Returns structure describing location constraints required 719 // Returns structure describing location constraints required
720 // to emit native code for this instruction. 720 // to emit native code for this instruction.
721 LocationSummary* locs() { 721 LocationSummary* locs() {
722 ASSERT(locs_ != NULL); 722 ASSERT(locs_ != NULL);
723 return locs_; 723 return locs_;
724 } 724 }
725 725
726 bool HasLocs() const { return locs_ != NULL; } 726 bool HasLocs() const { return locs_ != NULL; }
727 727
728 virtual LocationSummary* MakeLocationSummary(Isolate* isolate, 728 virtual LocationSummary* MakeLocationSummary(Zone* zone,
729 bool is_optimizing) const = 0; 729 bool is_optimizing) const = 0;
730 730
731 void InitializeLocationSummary(Isolate* isolate, bool optimizing) { 731 void InitializeLocationSummary(Zone* zone, bool optimizing) {
732 ASSERT(locs_ == NULL); 732 ASSERT(locs_ == NULL);
733 locs_ = MakeLocationSummary(isolate, optimizing); 733 locs_ = MakeLocationSummary(zone, optimizing);
734 } 734 }
735 735
736 static LocationSummary* MakeCallSummary(Isolate* isolate); 736 static LocationSummary* MakeCallSummary(Zone* zone);
737 737
738 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { 738 virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
739 UNIMPLEMENTED(); 739 UNIMPLEMENTED();
740 } 740 }
741 741
742 Environment* env() const { return env_; } 742 Environment* env() const { return env_; }
743 void SetEnvironment(Environment* deopt_env); 743 void SetEnvironment(Environment* deopt_env);
744 void RemoveEnvironment(); 744 void RemoveEnvironment();
745 745
746 intptr_t lifetime_position() const { return lifetime_position_; } 746 intptr_t lifetime_position() const { return lifetime_position_; }
(...skipping 7280 matching lines...) Expand 10 before | Expand all | Expand 10 after
8027 const GrowableArray<BlockEntryInstr*>& block_order_; 8027 const GrowableArray<BlockEntryInstr*>& block_order_;
8028 ForwardInstructionIterator* current_iterator_; 8028 ForwardInstructionIterator* current_iterator_;
8029 8029
8030 private: 8030 private:
8031 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 8031 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
8032 }; 8032 };
8033 8033
8034 8034
8035 // Helper macros for platform ports. 8035 // Helper macros for platform ports.
8036 #define DEFINE_UNIMPLEMENTED_INSTRUCTION(Name) \ 8036 #define DEFINE_UNIMPLEMENTED_INSTRUCTION(Name) \
8037 LocationSummary* Name::MakeLocationSummary( \ 8037 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8038 Isolate* isolate, bool opt) const { \
8039 UNIMPLEMENTED(); \ 8038 UNIMPLEMENTED(); \
8040 return NULL; \ 8039 return NULL; \
8041 } \ 8040 } \
8042 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8041 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8043 8042
8044 8043
8045 } // namespace dart 8044 } // namespace dart
8046 8045
8047 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8046 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698