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

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

Issue 773183002: Enable inlining inside try-blocks in the VM's optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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_optimizer.cc ('k') | no next file » | 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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 } 1142 }
1143 1143
1144 virtual bool CanDeoptimize() const { return false; } 1144 virtual bool CanDeoptimize() const { return false; }
1145 1145
1146 virtual EffectSet Effects() const { return EffectSet::None(); } 1146 virtual EffectSet Effects() const { return EffectSet::None(); }
1147 virtual EffectSet Dependencies() const { return EffectSet::None(); } 1147 virtual EffectSet Dependencies() const { return EffectSet::None(); }
1148 1148
1149 virtual bool MayThrow() const { return false; } 1149 virtual bool MayThrow() const { return false; }
1150 1150
1151 intptr_t try_index() const { return try_index_; } 1151 intptr_t try_index() const { return try_index_; }
1152 void set_try_index(intptr_t index) {
1153 try_index_ = index;
1154 }
1152 1155
1153 // True for blocks inside a try { } region. 1156 // True for blocks inside a try { } region.
1154 bool InsideTryBlock() const { 1157 bool InsideTryBlock() const {
1155 return try_index_ != CatchClauseNode::kInvalidTryIndex; 1158 return try_index_ != CatchClauseNode::kInvalidTryIndex;
1156 } 1159 }
1157 1160
1158 BitVector* loop_info() const { return loop_info_; } 1161 BitVector* loop_info() const { return loop_info_; }
1159 void set_loop_info(BitVector* loop_info) { 1162 void set_loop_info(BitVector* loop_info) {
1160 loop_info_ = loop_info; 1163 loop_info_ = loop_info;
1161 } 1164 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 1200
1198 private: 1201 private:
1199 virtual void RawSetInputAt(intptr_t i, Value* value) { UNREACHABLE(); } 1202 virtual void RawSetInputAt(intptr_t i, Value* value) { UNREACHABLE(); }
1200 1203
1201 virtual void ClearPredecessors() = 0; 1204 virtual void ClearPredecessors() = 0;
1202 virtual void AddPredecessor(BlockEntryInstr* predecessor) = 0; 1205 virtual void AddPredecessor(BlockEntryInstr* predecessor) = 0;
1203 1206
1204 void set_dominator(BlockEntryInstr* instr) { dominator_ = instr; } 1207 void set_dominator(BlockEntryInstr* instr) { dominator_ = instr; }
1205 1208
1206 intptr_t block_id_; 1209 intptr_t block_id_;
1207 const intptr_t try_index_; 1210 intptr_t try_index_;
1208 intptr_t preorder_number_; 1211 intptr_t preorder_number_;
1209 intptr_t postorder_number_; 1212 intptr_t postorder_number_;
1210 // Starting and ending lifetime positions for this block. Used by 1213 // Starting and ending lifetime positions for this block. Used by
1211 // the linear scan register allocator. 1214 // the linear scan register allocator.
1212 intptr_t start_pos_; 1215 intptr_t start_pos_;
1213 intptr_t end_pos_; 1216 intptr_t end_pos_;
1214 BlockEntryInstr* dominator_; // Immediate dominator, NULL for graph entry. 1217 BlockEntryInstr* dominator_; // Immediate dominator, NULL for graph entry.
1215 // TODO(fschneider): Optimize the case of one child to save space. 1218 // TODO(fschneider): Optimize the case of one child to save space.
1216 GrowableArray<BlockEntryInstr*> dominated_blocks_; 1219 GrowableArray<BlockEntryInstr*> dominated_blocks_;
1217 Instruction* last_instruction_; 1220 Instruction* last_instruction_;
(...skipping 6633 matching lines...) Expand 10 before | Expand all | Expand 10 after
7851 void set_locations(Location* locations) { 7854 void set_locations(Location* locations) {
7852 ASSERT(locations_ == NULL); 7855 ASSERT(locations_ == NULL);
7853 locations_ = locations; 7856 locations_ = locations;
7854 } 7857 }
7855 7858
7856 void set_deopt_id(intptr_t deopt_id) { deopt_id_ = deopt_id; } 7859 void set_deopt_id(intptr_t deopt_id) { deopt_id_ = deopt_id; }
7857 intptr_t deopt_id() const { return deopt_id_; } 7860 intptr_t deopt_id() const { return deopt_id_; }
7858 7861
7859 Environment* outer() const { return outer_; } 7862 Environment* outer() const { return outer_; }
7860 7863
7864 Environment* Outermost() {
7865 Environment* result = this;
7866 while (result->outer() != NULL) result = result->outer();
7867 return result;
7868 }
7869
7861 Value* ValueAt(intptr_t ix) const { 7870 Value* ValueAt(intptr_t ix) const {
7862 return values_[ix]; 7871 return values_[ix];
7863 } 7872 }
7864 7873
7865 intptr_t Length() const { 7874 intptr_t Length() const {
7866 return values_.length(); 7875 return values_.length();
7867 } 7876 }
7868 7877
7869 Location LocationAt(intptr_t index) const { 7878 Location LocationAt(intptr_t index) const {
7870 ASSERT((index >= 0) && (index < values_.length())); 7879 ASSERT((index >= 0) && (index < values_.length()));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
7970 Isolate* isolate, bool opt) const { \ 7979 Isolate* isolate, bool opt) const { \
7971 UNIMPLEMENTED(); \ 7980 UNIMPLEMENTED(); \
7972 return NULL; \ 7981 return NULL; \
7973 } \ 7982 } \
7974 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 7983 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
7975 7984
7976 7985
7977 } // namespace dart 7986 } // namespace dart
7978 7987
7979 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 7988 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698