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

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

Issue 2587133002: VM: [DBC] Fix lazy deoptimization after calls that return no values. (Closed)
Patch Set: Add test 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
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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 } 808 }
809 809
810 810
811 void FlowGraphCompiler::AddStubCallTarget(const Code& code) { 811 void FlowGraphCompiler::AddStubCallTarget(const Code& code) {
812 ASSERT(code.IsZoneHandle()); 812 ASSERT(code.IsZoneHandle());
813 static_calls_target_table_.Add( 813 static_calls_target_table_.Add(
814 new (zone()) StaticCallsStruct(assembler()->CodeSize(), NULL, &code)); 814 new (zone()) StaticCallsStruct(assembler()->CodeSize(), NULL, &code));
815 } 815 }
816 816
817 817
818 void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id) { 818 CompilerDeoptInfo* FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id) {
819 ASSERT(is_optimizing()); 819 ASSERT(is_optimizing());
820 ASSERT(!intrinsic_mode()); 820 ASSERT(!intrinsic_mode());
821 CompilerDeoptInfo* info = 821 CompilerDeoptInfo* info =
822 new (zone()) CompilerDeoptInfo(deopt_id, ICData::kDeoptAtCall, 822 new (zone()) CompilerDeoptInfo(deopt_id, ICData::kDeoptAtCall,
823 0, // No flags. 823 0, // No flags.
824 pending_deoptimization_env_); 824 pending_deoptimization_env_);
825 info->set_pc_offset(assembler()->CodeSize()); 825 info->set_pc_offset(assembler()->CodeSize());
826 deopt_infos_.Add(info); 826 deopt_infos_.Add(info);
827 return info;
827 } 828 }
828 829
829 830
830 // This function must be in sync with FlowGraphCompiler::SaveLiveRegisters 831 // This function must be in sync with FlowGraphCompiler::SaveLiveRegisters
831 // and FlowGraphCompiler::SlowPathEnvironmentFor. 832 // and FlowGraphCompiler::SlowPathEnvironmentFor.
832 // See StackFrame::VisitObjectPointers for the details of how stack map is 833 // See StackFrame::VisitObjectPointers for the details of how stack map is
833 // interpreted. 834 // interpreted.
834 void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs, 835 void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs,
835 intptr_t slow_path_argument_count) { 836 intptr_t slow_path_argument_count) {
836 if (is_optimizing() || locs->live_registers()->HasUntaggedValues()) { 837 if (is_optimizing() || locs->live_registers()->HasUntaggedValues()) {
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 1982
1982 1983
1983 void FlowGraphCompiler::FrameStateClear() { 1984 void FlowGraphCompiler::FrameStateClear() {
1984 ASSERT(!is_optimizing()); 1985 ASSERT(!is_optimizing());
1985 frame_state_.TruncateTo(0); 1986 frame_state_.TruncateTo(0);
1986 } 1987 }
1987 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 1988 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
1988 1989
1989 1990
1990 } // namespace dart 1991 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698