OLD | NEW |
---|---|
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 Loading... | |
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::AddDeoptWithoutStub(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 info->set_pc_offset(assembler()->CodeSize()); | |
Vyacheslav Egorov (Google)
2016/06/09 15:09:06
After looking through deoptimization code I realiz
zra
2016/06/09 16:42:23
Done.
| |
1004 } | |
1005 #endif // defined(TARGET_ARCH_DBC) | |
1006 | |
1007 | |
990 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { | 1008 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { |
991 ASSERT(exception_handlers_list_ != NULL); | 1009 ASSERT(exception_handlers_list_ != NULL); |
992 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( | 1010 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( |
993 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); | 1011 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); |
994 code.set_exception_handlers(handlers); | 1012 code.set_exception_handlers(handlers); |
995 if (FLAG_compiler_stats) { | 1013 if (FLAG_compiler_stats) { |
996 Thread* thread = Thread::Current(); | 1014 Thread* thread = Thread::Current(); |
997 INC_STAT(thread, total_code_size, | 1015 INC_STAT(thread, total_code_size, |
998 ExceptionHandlers::InstanceSize(handlers.num_entries())); | 1016 ExceptionHandlers::InstanceSize(handlers.num_entries())); |
999 INC_STAT(thread, total_code_size, handlers.num_entries() * sizeof(uword)); | 1017 INC_STAT(thread, total_code_size, handlers.num_entries() * sizeof(uword)); |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1982 | 2000 |
1983 | 2001 |
1984 void FlowGraphCompiler::FrameStateClear() { | 2002 void FlowGraphCompiler::FrameStateClear() { |
1985 ASSERT(!is_optimizing()); | 2003 ASSERT(!is_optimizing()); |
1986 frame_state_.TruncateTo(0); | 2004 frame_state_.TruncateTo(0); |
1987 } | 2005 } |
1988 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 2006 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
1989 | 2007 |
1990 | 2008 |
1991 } // namespace dart | 2009 } // namespace dart |
OLD | NEW |