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

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

Issue 11505002: Improve redundant load elimination (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix for real Created 8 years 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 "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"
11 #include "vm/il_printer.h" 11 #include "vm/il_printer.h"
12 #include "vm/intermediate_language.h" 12 #include "vm/intermediate_language.h"
13 #include "vm/longjump.h" 13 #include "vm/longjump.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/os.h" 15 #include "vm/os.h"
16 #include "vm/parser.h" 16 #include "vm/parser.h"
17 #include "vm/resolver.h" 17 #include "vm/resolver.h"
18 #include "vm/stub_code.h" 18 #include "vm/stub_code.h"
19 #include "vm/symbols.h" 19 #include "vm/symbols.h"
20 20
21 namespace dart { 21 namespace dart {
22 22
23 DEFINE_FLAG(bool, eliminate_type_checks, true, 23 DEFINE_FLAG(bool, eliminate_type_checks, true,
24 "Eliminate type checks when allowed by static type analysis."); 24 "Eliminate type checks when allowed by static type analysis.");
25 DEFINE_FLAG(bool, print_ast, false, "Print abstract syntax tree."); 25 DEFINE_FLAG(bool, print_ast, false, "Print abstract syntax tree.");
26 DEFINE_FLAG(bool, print_flow_graph, false, "Print the IR flow graph."); 26 DEFINE_FLAG(bool, print_flow_graph, false, "Print the IR flow graph.");
27 DEFINE_FLAG(bool, print_flow_graph_optimized, false,
28 "Print the IR flow graph when optimizing.");
27 DEFINE_FLAG(bool, trace_type_check_elimination, false, 29 DEFINE_FLAG(bool, trace_type_check_elimination, false,
28 "Trace type check elimination at compile time."); 30 "Trace type check elimination at compile time.");
29 DECLARE_FLAG(bool, enable_type_checks); 31 DECLARE_FLAG(bool, enable_type_checks);
30 32
31 33
32 FlowGraphBuilder::FlowGraphBuilder(const ParsedFunction& parsed_function) 34 FlowGraphBuilder::FlowGraphBuilder(const ParsedFunction& parsed_function)
33 : parsed_function_(parsed_function), 35 : parsed_function_(parsed_function),
34 num_copied_params_(parsed_function.num_copied_params()), 36 num_copied_params_(parsed_function.num_copied_params()),
35 // All parameters are copied if any parameter is. 37 // All parameters are copied if any parameter is.
36 num_non_copied_params_((num_copied_params_ == 0) 38 num_non_copied_params_((num_copied_params_ == 0)
(...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after
2958 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2960 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2959 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2961 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2960 OS::SNPrint(chars, len, kFormat, function_name, reason); 2962 OS::SNPrint(chars, len, kFormat, function_name, reason);
2961 const Error& error = Error::Handle( 2963 const Error& error = Error::Handle(
2962 LanguageError::New(String::Handle(String::New(chars)))); 2964 LanguageError::New(String::Handle(String::New(chars))));
2963 Isolate::Current()->long_jump_base()->Jump(1, error); 2965 Isolate::Current()->long_jump_base()->Jump(1, error);
2964 } 2966 }
2965 2967
2966 2968
2967 } // namespace dart 2969 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698