| 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 #include "vm/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 return case_targets_[i]; | 232 return case_targets_[i]; |
| 233 } | 233 } |
| 234 return NULL; | 234 return NULL; |
| 235 } | 235 } |
| 236 | 236 |
| 237 | 237 |
| 238 FlowGraphBuilder::FlowGraphBuilder( | 238 FlowGraphBuilder::FlowGraphBuilder( |
| 239 ParsedFunction* parsed_function, | 239 ParsedFunction* parsed_function, |
| 240 const ZoneGrowableArray<const ICData*>& ic_data_array, | 240 const ZoneGrowableArray<const ICData*>& ic_data_array, |
| 241 InlineExitCollector* exit_collector, | 241 InlineExitCollector* exit_collector, |
| 242 intptr_t osr_id, | 242 intptr_t osr_id) : |
| 243 bool is_optimizing) : | |
| 244 parsed_function_(parsed_function), | 243 parsed_function_(parsed_function), |
| 245 ic_data_array_(ic_data_array), | 244 ic_data_array_(ic_data_array), |
| 246 num_copied_params_(parsed_function->num_copied_params()), | 245 num_copied_params_(parsed_function->num_copied_params()), |
| 247 // All parameters are copied if any parameter is. | 246 // All parameters are copied if any parameter is. |
| 248 num_non_copied_params_((num_copied_params_ == 0) | 247 num_non_copied_params_((num_copied_params_ == 0) |
| 249 ? parsed_function->function().num_fixed_parameters() | 248 ? parsed_function->function().num_fixed_parameters() |
| 250 : 0), | 249 : 0), |
| 251 num_stack_locals_(parsed_function->num_stack_locals()), | 250 num_stack_locals_(parsed_function->num_stack_locals()), |
| 252 exit_collector_(exit_collector), | 251 exit_collector_(exit_collector), |
| 253 guarded_fields_(new(I) ZoneGrowableArray<const Field*>()), | 252 guarded_fields_(new(I) ZoneGrowableArray<const Field*>()), |
| 254 last_used_block_id_(0), // 0 is used for the graph entry. | 253 last_used_block_id_(0), // 0 is used for the graph entry. |
| 255 try_index_(CatchClauseNode::kInvalidTryIndex), | 254 try_index_(CatchClauseNode::kInvalidTryIndex), |
| 256 catch_try_index_(CatchClauseNode::kInvalidTryIndex), | 255 catch_try_index_(CatchClauseNode::kInvalidTryIndex), |
| 257 loop_depth_(0), | 256 loop_depth_(0), |
| 258 graph_entry_(NULL), | 257 graph_entry_(NULL), |
| 259 temp_count_(0), | 258 temp_count_(0), |
| 260 args_pushed_(0), | 259 args_pushed_(0), |
| 261 nesting_stack_(NULL), | 260 nesting_stack_(NULL), |
| 262 osr_id_(osr_id), | 261 osr_id_(osr_id), |
| 263 is_optimizing_(is_optimizing), | |
| 264 jump_cnt_(0), | 262 jump_cnt_(0), |
| 265 await_joins_(new(I) ZoneGrowableArray<JoinEntryInstr*>()), | 263 await_joins_(new(I) ZoneGrowableArray<JoinEntryInstr*>()), |
| 266 await_levels_(new(I) ZoneGrowableArray<intptr_t>()) { } | 264 await_levels_(new(I) ZoneGrowableArray<intptr_t>()) { } |
| 267 | 265 |
| 268 | 266 |
| 269 void FlowGraphBuilder::AddCatchEntry(CatchBlockEntryInstr* entry) { | 267 void FlowGraphBuilder::AddCatchEntry(CatchBlockEntryInstr* entry) { |
| 270 graph_entry_->AddCatchEntry(entry); | 268 graph_entry_->AddCatchEntry(entry); |
| 271 } | 269 } |
| 272 | 270 |
| 273 | 271 |
| (...skipping 3913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4187 Report::MessageF(Report::kBailout, | 4185 Report::MessageF(Report::kBailout, |
| 4188 Script::Handle(function.script()), | 4186 Script::Handle(function.script()), |
| 4189 function.token_pos(), | 4187 function.token_pos(), |
| 4190 "FlowGraphBuilder Bailout: %s %s", | 4188 "FlowGraphBuilder Bailout: %s %s", |
| 4191 String::Handle(function.name()).ToCString(), | 4189 String::Handle(function.name()).ToCString(), |
| 4192 reason); | 4190 reason); |
| 4193 UNREACHABLE(); | 4191 UNREACHABLE(); |
| 4194 } | 4192 } |
| 4195 | 4193 |
| 4196 } // namespace dart | 4194 } // namespace dart |
| OLD | NEW |