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

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

Issue 2636443004: Make rewind work on DBC (Closed)
Patch Set: Code Review Created 3 years, 9 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
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/service.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"
(...skipping 3107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3118 if (compiler->is_optimizing()) { 3118 if (compiler->is_optimizing()) {
3119 __ InstanceCall2Opt(ArgumentCount(), call_ic_data_kidx); 3119 __ InstanceCall2Opt(ArgumentCount(), call_ic_data_kidx);
3120 } else { 3120 } else {
3121 __ InstanceCall2(ArgumentCount(), call_ic_data_kidx); 3121 __ InstanceCall2(ArgumentCount(), call_ic_data_kidx);
3122 } 3122 }
3123 break; 3123 break;
3124 default: 3124 default:
3125 UNIMPLEMENTED(); 3125 UNIMPLEMENTED();
3126 break; 3126 break;
3127 } 3127 }
3128 compiler->AddCurrentDescriptor(RawPcDescriptors::kRewind, deopt_id(),
3129 token_pos());
3128 compiler->AddCurrentDescriptor(RawPcDescriptors::kIcCall, deopt_id(), 3130 compiler->AddCurrentDescriptor(RawPcDescriptors::kIcCall, deopt_id(),
3129 token_pos()); 3131 token_pos());
3130 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); 3132 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult);
3131 3133
3132 if (compiler->is_optimizing()) { 3134 if (compiler->is_optimizing()) {
3133 __ PopLocal(locs()->out(0).reg()); 3135 __ PopLocal(locs()->out(0).reg());
3134 } 3136 }
3135 #endif // !defined(TARGET_ARCH_DBC) 3137 #endif // !defined(TARGET_ARCH_DBC)
3136 } 3138 }
3137 3139
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3285 compiler->GenerateStaticCall(deopt_id(), token_pos(), function(), 3287 compiler->GenerateStaticCall(deopt_id(), token_pos(), function(),
3286 ArgumentCount(), argument_names(), locs(), 3288 ArgumentCount(), argument_names(), locs(),
3287 *call_ic_data); 3289 *call_ic_data);
3288 #else 3290 #else
3289 const Array& arguments_descriptor = 3291 const Array& arguments_descriptor =
3290 (ic_data() == NULL) ? Array::Handle(ArgumentsDescriptor::New( 3292 (ic_data() == NULL) ? Array::Handle(ArgumentsDescriptor::New(
3291 ArgumentCount(), argument_names())) 3293 ArgumentCount(), argument_names()))
3292 : Array::Handle(ic_data()->arguments_descriptor()); 3294 : Array::Handle(ic_data()->arguments_descriptor());
3293 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); 3295 const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor);
3294 3296
3297 compiler->AddCurrentDescriptor(RawPcDescriptors::kRewind, deopt_id(),
3298 token_pos());
3295 if (compiler->is_optimizing()) { 3299 if (compiler->is_optimizing()) {
3296 __ PushConstant(function()); 3300 __ PushConstant(function());
3297 __ StaticCall(ArgumentCount(), argdesc_kidx); 3301 __ StaticCall(ArgumentCount(), argdesc_kidx);
3298 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(), 3302 compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id(),
3299 token_pos()); 3303 token_pos());
3300 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult); 3304 compiler->RecordAfterCall(this, FlowGraphCompiler::kHasResult);
3301 __ PopLocal(locs()->out(0).reg()); 3305 __ PopLocal(locs()->out(0).reg());
3302 } else { 3306 } else {
3303 const intptr_t ic_data_kidx = __ AddConstant(*call_ic_data); 3307 const intptr_t ic_data_kidx = __ AddConstant(*call_ic_data);
3304 __ PushConstant(ic_data_kidx); 3308 __ PushConstant(ic_data_kidx);
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
3960 set_native_c_function(native_function); 3964 set_native_c_function(native_function);
3961 function().SetIsNativeAutoSetupScope(auto_setup_scope); 3965 function().SetIsNativeAutoSetupScope(auto_setup_scope);
3962 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 3966 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
3963 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 3967 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
3964 set_is_bootstrap_native(is_bootstrap_native); 3968 set_is_bootstrap_native(is_bootstrap_native);
3965 } 3969 }
3966 3970
3967 #undef __ 3971 #undef __
3968 3972
3969 } // namespace dart 3973 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698