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

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

Issue 10332139: Fix a pair of flow graph construction issues. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « no previous file | runtime/vm/intermediate_language.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) 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 "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/code_descriptors.h" 8 #include "vm/code_descriptors.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 void EffectGraphVisitor::BuildThrowNode(ThrowNode* node) { 2001 void EffectGraphVisitor::BuildThrowNode(ThrowNode* node) {
2002 ValueGraphVisitor for_exception(owner(), temp_index()); 2002 ValueGraphVisitor for_exception(owner(), temp_index());
2003 node->exception()->Visit(&for_exception); 2003 node->exception()->Visit(&for_exception);
2004 Append(for_exception); 2004 Append(for_exception);
2005 Instruction* instr = NULL; 2005 Instruction* instr = NULL;
2006 if (node->stacktrace() == NULL) { 2006 if (node->stacktrace() == NULL) {
2007 instr = new ThrowInstr(node->token_index(), 2007 instr = new ThrowInstr(node->token_index(),
2008 owner()->try_index(), 2008 owner()->try_index(),
2009 for_exception.value()); 2009 for_exception.value());
2010 } else { 2010 } else {
2011 ValueGraphVisitor for_stack_trace(owner(), temp_index() + 1); 2011 ValueGraphVisitor for_stack_trace(owner(), temp_index());
2012 node->stacktrace()->Visit(&for_stack_trace); 2012 node->stacktrace()->Visit(&for_stack_trace);
2013 Append(for_stack_trace); 2013 Append(for_stack_trace);
2014 instr = new ReThrowInstr(node->token_index(), 2014 instr = new ReThrowInstr(node->token_index(),
2015 owner()->try_index(), 2015 owner()->try_index(),
2016 for_exception.value(), 2016 for_exception.value(),
2017 for_stack_trace.value()); 2017 for_stack_trace.value());
2018 } 2018 }
2019 AddInstruction(instr); 2019 AddInstruction(instr);
2020 } 2020 }
2021 2021
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 char* chars = reinterpret_cast<char*>( 2619 char* chars = reinterpret_cast<char*>(
2620 Isolate::Current()->current_zone()->Allocate(len)); 2620 Isolate::Current()->current_zone()->Allocate(len));
2621 OS::SNPrint(chars, len, kFormat, function_name, reason); 2621 OS::SNPrint(chars, len, kFormat, function_name, reason);
2622 const Error& error = Error::Handle( 2622 const Error& error = Error::Handle(
2623 LanguageError::New(String::Handle(String::New(chars)))); 2623 LanguageError::New(String::Handle(String::New(chars))));
2624 Isolate::Current()->long_jump_base()->Jump(1, error); 2624 Isolate::Current()->long_jump_base()->Jump(1, error);
2625 } 2625 }
2626 2626
2627 2627
2628 } // namespace dart 2628 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698