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

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

Issue 75123002: Version 1.0.0.6 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « dart/runtime/vm/flow_graph.cc ('k') | dart/runtime/vm/flow_graph_compiler.cc » ('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 "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/code_descriptors.h" 10 #include "vm/code_descriptors.h"
(...skipping 3835 matching lines...) Expand 10 before | Expand all | Expand 10 after
3846 void FlowGraphBuilder::PruneUnreachable() { 3846 void FlowGraphBuilder::PruneUnreachable() {
3847 ASSERT(osr_id_ != Isolate::kNoDeoptId); 3847 ASSERT(osr_id_ != Isolate::kNoDeoptId);
3848 BitVector* block_marks = new BitVector(last_used_block_id_ + 1); 3848 BitVector* block_marks = new BitVector(last_used_block_id_ + 1);
3849 bool found = graph_entry_->PruneUnreachable(this, graph_entry_, NULL, osr_id_, 3849 bool found = graph_entry_->PruneUnreachable(this, graph_entry_, NULL, osr_id_,
3850 block_marks); 3850 block_marks);
3851 ASSERT(found); 3851 ASSERT(found);
3852 } 3852 }
3853 3853
3854 3854
3855 void FlowGraphBuilder::Bailout(const char* reason) { 3855 void FlowGraphBuilder::Bailout(const char* reason) {
3856 const char* kFormat = "FlowGraphBuilder Bailout: %s %s"; 3856 const Function& function = parsed_function_->function();
3857 const char* function_name = parsed_function_->function().ToCString();
3858 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3859 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3860 OS::SNPrint(chars, len, kFormat, function_name, reason);
3861 const Error& error = Error::Handle( 3857 const Error& error = Error::Handle(
3862 LanguageError::New(String::Handle(String::New(chars)))); 3858 LanguageError::NewFormatted(Error::Handle(), // No previous error.
3859 Script::Handle(function.script()),
3860 function.token_pos(),
3861 LanguageError::kError,
3862 Heap::kNew,
3863 "FlowGraphBuilder Bailout: %s %s",
3864 String::Handle(function.name()).ToCString(),
3865 reason));
3863 Isolate::Current()->long_jump_base()->Jump(1, error); 3866 Isolate::Current()->long_jump_base()->Jump(1, error);
3864 } 3867 }
3865 3868
3866 3869
3867 } // namespace dart 3870 } // namespace dart
OLDNEW
« no previous file with comments | « dart/runtime/vm/flow_graph.cc ('k') | dart/runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698