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

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

Issue 10836061: Change the zone allocation api. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/double_conversion.cc ('k') | 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 "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2696 matching lines...) Expand 10 before | Expand all | Expand 10 after
2707 } 2707 }
2708 } 2708 }
2709 } 2709 }
2710 } 2710 }
2711 2711
2712 2712
2713 void FlowGraphBuilder::Bailout(const char* reason) { 2713 void FlowGraphBuilder::Bailout(const char* reason) {
2714 const char* kFormat = "FlowGraphBuilder Bailout: %s %s"; 2714 const char* kFormat = "FlowGraphBuilder Bailout: %s %s";
2715 const char* function_name = parsed_function_.function().ToCString(); 2715 const char* function_name = parsed_function_.function().ToCString();
2716 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2716 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2717 char* chars = reinterpret_cast<char*>( 2717 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2718 Isolate::Current()->current_zone()->Allocate(len));
2719 OS::SNPrint(chars, len, kFormat, function_name, reason); 2718 OS::SNPrint(chars, len, kFormat, function_name, reason);
2720 const Error& error = Error::Handle( 2719 const Error& error = Error::Handle(
2721 LanguageError::New(String::Handle(String::New(chars)))); 2720 LanguageError::New(String::Handle(String::New(chars))));
2722 Isolate::Current()->long_jump_base()->Jump(1, error); 2721 Isolate::Current()->long_jump_base()->Jump(1, error);
2723 } 2722 }
2724 2723
2725 2724
2726 } // namespace dart 2725 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/double_conversion.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698