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

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

Issue 2039913006: DBC: Eager deoptimization and CheckSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 6 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/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_dbc.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/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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 CompilerDeoptInfoWithStub* stub = 980 CompilerDeoptInfoWithStub* stub =
981 new(zone()) CompilerDeoptInfoWithStub(deopt_id, 981 new(zone()) CompilerDeoptInfoWithStub(deopt_id,
982 reason, 982 reason,
983 flags, 983 flags,
984 pending_deoptimization_env_); 984 pending_deoptimization_env_);
985 deopt_infos_.Add(stub); 985 deopt_infos_.Add(stub);
986 return stub->entry_label(); 986 return stub->entry_label();
987 } 987 }
988 988
989 989
990 #if defined(TARGET_ARCH_DBC)
991 void FlowGraphCompiler::EmitDeopt(intptr_t deopt_id,
992 ICData::DeoptReasonId reason,
993 uint32_t flags) {
994 ASSERT(is_optimizing());
995 ASSERT(!intrinsic_mode());
996 CompilerDeoptInfo* info =
997 new(zone()) CompilerDeoptInfo(deopt_id,
998 reason,
999 flags,
1000 pending_deoptimization_env_);
1001
1002 deopt_infos_.Add(info);
1003 assembler()->Deopt(0, /*is_eager =*/ 1);
1004 info->set_pc_offset(assembler()->CodeSize());
1005 }
1006 #endif // defined(TARGET_ARCH_DBC)
1007
1008
990 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { 1009 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) {
991 ASSERT(exception_handlers_list_ != NULL); 1010 ASSERT(exception_handlers_list_ != NULL);
992 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( 1011 const ExceptionHandlers& handlers = ExceptionHandlers::Handle(
993 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); 1012 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint()));
994 code.set_exception_handlers(handlers); 1013 code.set_exception_handlers(handlers);
995 if (FLAG_compiler_stats) { 1014 if (FLAG_compiler_stats) {
996 Thread* thread = Thread::Current(); 1015 Thread* thread = Thread::Current();
997 INC_STAT(thread, total_code_size, 1016 INC_STAT(thread, total_code_size,
998 ExceptionHandlers::InstanceSize(handlers.num_entries())); 1017 ExceptionHandlers::InstanceSize(handlers.num_entries()));
999 INC_STAT(thread, total_code_size, handlers.num_entries() * sizeof(uword)); 1018 INC_STAT(thread, total_code_size, handlers.num_entries() * sizeof(uword));
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 2001
1983 2002
1984 void FlowGraphCompiler::FrameStateClear() { 2003 void FlowGraphCompiler::FrameStateClear() {
1985 ASSERT(!is_optimizing()); 2004 ASSERT(!is_optimizing());
1986 frame_state_.TruncateTo(0); 2005 frame_state_.TruncateTo(0);
1987 } 2006 }
1988 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 2007 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
1989 2008
1990 2009
1991 } // namespace dart 2010 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698