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

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

Issue 2584613002: PATCH (not to be comitted): Support for printing instruction statistics
Patch Set: Fixed polymorphic call inside try, added more tags for remaining unknown code Created 4 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_arm.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) 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/constant_propagator.h" 10 #include "vm/constant_propagator.h"
11 #include "vm/cpu.h" 11 #include "vm/cpu.h"
12 #include "vm/dart_entry.h" 12 #include "vm/dart_entry.h"
13 #include "vm/flow_graph_allocator.h" 13 #include "vm/flow_graph_allocator.h"
14 #include "vm/flow_graph_builder.h" 14 #include "vm/flow_graph_builder.h"
15 #include "vm/flow_graph_compiler.h" 15 #include "vm/flow_graph_compiler.h"
16 #include "vm/flow_graph_range_analysis.h" 16 #include "vm/flow_graph_range_analysis.h"
17 #include "vm/locations.h" 17 #include "vm/locations.h"
18 #include "vm/method_recognizer.h" 18 #include "vm/method_recognizer.h"
19 #include "vm/object.h" 19 #include "vm/object.h"
20 #include "vm/object_store.h" 20 #include "vm/object_store.h"
21 #include "vm/os.h" 21 #include "vm/os.h"
22 #include "vm/regexp_assembler_ir.h" 22 #include "vm/regexp_assembler_ir.h"
23 #include "vm/resolver.h" 23 #include "vm/resolver.h"
24 #include "vm/scopes.h" 24 #include "vm/scopes.h"
25 #include "vm/stub_code.h" 25 #include "vm/stub_code.h"
26 #include "vm/symbols.h" 26 #include "vm/symbols.h"
27 #include "vm/code_statistics.h"
27 28
28 #include "vm/il_printer.h" 29 #include "vm/il_printer.h"
29 30
30 namespace dart { 31 namespace dart {
31 32
32 DEFINE_FLAG(bool, 33 DEFINE_FLAG(bool,
33 propagate_ic_data, 34 propagate_ic_data,
34 true, 35 true,
35 "Propagate IC data from unoptimized to optimized IC calls."); 36 "Propagate IC data from unoptimized to optimized IC calls.");
36 DEFINE_FLAG(bool, 37 DEFINE_FLAG(bool,
(...skipping 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 ic_data().GetTargetAt(0))) != MethodRecognizer::kUnknown); 3143 ic_data().GetTargetAt(0))) != MethodRecognizer::kUnknown);
3143 } 3144 }
3144 3145
3145 3146
3146 // DBC does not support optimizing compiler and thus doesn't emit 3147 // DBC does not support optimizing compiler and thus doesn't emit
3147 // PolymorphicInstanceCallInstr. 3148 // PolymorphicInstanceCallInstr.
3148 #if !defined(TARGET_ARCH_DBC) 3149 #if !defined(TARGET_ARCH_DBC)
3149 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3150 void PolymorphicInstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3150 ASSERT(ic_data().NumArgsTested() == 1); 3151 ASSERT(ic_data().NumArgsTested() == 1);
3151 if (!with_checks()) { 3152 if (!with_checks()) {
3153 compiler->SpecialStatsBegin(
3154 CombinedCodeStatistics::kPolymorphicInstanceCallAsStaticCall);
3152 ASSERT(ic_data().HasOneTarget()); 3155 ASSERT(ic_data().HasOneTarget());
3153 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); 3156 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0));
3154 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(), 3157 compiler->GenerateStaticCall(deopt_id(), instance_call()->token_pos(),
3155 target, instance_call()->ArgumentCount(), 3158 target, instance_call()->ArgumentCount(),
3156 instance_call()->argument_names(), locs(), 3159 instance_call()->argument_names(), locs(),
3157 ICData::Handle()); 3160 ICData::Handle());
3161 compiler->SpecialStatsEnd(
3162 CombinedCodeStatistics::kPolymorphicInstanceCallAsStaticCall);
3158 return; 3163 return;
3159 } 3164 }
3160 3165
3161 compiler->EmitPolymorphicInstanceCall( 3166 compiler->EmitPolymorphicInstanceCall(
3162 ic_data(), instance_call()->ArgumentCount(), 3167 ic_data(), instance_call()->ArgumentCount(),
3163 instance_call()->argument_names(), deopt_id(), 3168 instance_call()->argument_names(), deopt_id(),
3164 instance_call()->token_pos(), locs(), complete()); 3169 instance_call()->token_pos(), locs(), complete());
3165 } 3170 }
3166 #endif 3171 #endif
3167 3172
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
3931 set_native_c_function(native_function); 3936 set_native_c_function(native_function);
3932 function().SetIsNativeAutoSetupScope(auto_setup_scope); 3937 function().SetIsNativeAutoSetupScope(auto_setup_scope);
3933 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 3938 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
3934 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 3939 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
3935 set_is_bootstrap_native(is_bootstrap_native); 3940 set_is_bootstrap_native(is_bootstrap_native);
3936 } 3941 }
3937 3942
3938 #undef __ 3943 #undef __
3939 3944
3940 } // namespace dart 3945 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698