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

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

Issue 340203003: Cleanup of error and warning reporting. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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_builder.cc ('k') | runtime/vm/object.h » ('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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 EmitInstructionEpilogue(instr); 347 EmitInstructionEpilogue(instr);
348 } 348 }
349 } 349 }
350 } 350 }
351 set_current_block(NULL); 351 set_current_block(NULL);
352 } 352 }
353 353
354 354
355 void FlowGraphCompiler::Bailout(const char* reason) { 355 void FlowGraphCompiler::Bailout(const char* reason) {
356 const Function& function = parsed_function_.function(); 356 const Function& function = parsed_function_.function();
357 const Error& error = Error::Handle( 357 Report::MessageF(Report::kBailout,
358 LanguageError::NewFormatted(Error::Handle(), // No previous error. 358 Script::Handle(function.script()),
359 Script::Handle(function.script()), 359 function.token_pos(),
360 function.token_pos(), 360 "FlowGraphCompiler Bailout: %s %s",
361 LanguageError::kBailout, 361 String::Handle(function.name()).ToCString(),
362 Heap::kNew, 362 reason);
363 "FlowGraphCompiler Bailout: %s %s",
364 String::Handle(function.name()).ToCString(),
365 reason));
366 isolate()->long_jump_base()->Jump(1, error);
367 UNREACHABLE(); 363 UNREACHABLE();
368 } 364 }
369 365
370 366
371 void FlowGraphCompiler::EmitTrySync(Instruction* instr, intptr_t try_index) { 367 void FlowGraphCompiler::EmitTrySync(Instruction* instr, intptr_t try_index) {
372 ASSERT(is_optimizing()); 368 ASSERT(is_optimizing());
373 Environment* env = instr->env(); 369 Environment* env = instr->env();
374 CatchBlockEntryInstr* catch_block = 370 CatchBlockEntryInstr* catch_block =
375 flow_graph().graph_entry()->GetCatchEntry(try_index); 371 flow_graph().graph_entry()->GetCatchEntry(try_index);
376 const GrowableArray<Definition*>* idefs = catch_block->initial_definitions(); 372 const GrowableArray<Definition*>* idefs = catch_block->initial_definitions();
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 } 1389 }
1394 const ICData& ic_data = ICData::ZoneHandle(isolate(), ICData::New( 1390 const ICData& ic_data = ICData::ZoneHandle(isolate(), ICData::New(
1395 parsed_function().function(), String::Handle(isolate(), target.name()), 1391 parsed_function().function(), String::Handle(isolate(), target.name()),
1396 arguments_descriptor, deopt_id, num_args_tested)); 1392 arguments_descriptor, deopt_id, num_args_tested));
1397 ic_data.AddTarget(target); 1393 ic_data.AddTarget(target);
1398 (*deopt_id_to_ic_data_)[deopt_id] = &ic_data; 1394 (*deopt_id_to_ic_data_)[deopt_id] = &ic_data;
1399 return &ic_data; 1395 return &ic_data;
1400 } 1396 }
1401 1397
1402 } // namespace dart 1398 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698