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

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 513213002: Generate some intrinsics using our IR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments 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
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 #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
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 3933 matching lines...) Expand 10 before | Expand all | Expand 10 after
4207 Report::MessageF(Report::kBailout, 4205 Report::MessageF(Report::kBailout,
4208 Script::Handle(function.script()), 4206 Script::Handle(function.script()),
4209 function.token_pos(), 4207 function.token_pos(),
4210 "FlowGraphBuilder Bailout: %s %s", 4208 "FlowGraphBuilder Bailout: %s %s",
4211 String::Handle(function.name()).ToCString(), 4209 String::Handle(function.name()).ToCString(),
4212 reason); 4210 reason);
4213 UNREACHABLE(); 4211 UNREACHABLE();
4214 } 4212 }
4215 4213
4216 } // namespace dart 4214 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698