| 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 return stub->entry_label(); | 983 return stub->entry_label(); |
| 984 } | 984 } |
| 985 | 985 |
| 986 | 986 |
| 987 #if defined(TARGET_ARCH_DBC) | 987 #if defined(TARGET_ARCH_DBC) |
| 988 void FlowGraphCompiler::EmitDeopt(intptr_t deopt_id, | 988 void FlowGraphCompiler::EmitDeopt(intptr_t deopt_id, |
| 989 ICData::DeoptReasonId reason, | 989 ICData::DeoptReasonId reason, |
| 990 uint32_t flags) { | 990 uint32_t flags) { |
| 991 ASSERT(is_optimizing()); | 991 ASSERT(is_optimizing()); |
| 992 ASSERT(!intrinsic_mode()); | 992 ASSERT(!intrinsic_mode()); |
| 993 // The pending deoptimization environment may be changed after this deopt is |
| 994 // emitted, so we need to make a copy. |
| 995 Environment* env_copy = |
| 996 pending_deoptimization_env_->DeepCopy(zone()); |
| 993 CompilerDeoptInfo* info = | 997 CompilerDeoptInfo* info = |
| 994 new(zone()) CompilerDeoptInfo(deopt_id, | 998 new(zone()) CompilerDeoptInfo(deopt_id, |
| 995 reason, | 999 reason, |
| 996 flags, | 1000 flags, |
| 997 pending_deoptimization_env_); | 1001 env_copy); |
| 998 | |
| 999 deopt_infos_.Add(info); | 1002 deopt_infos_.Add(info); |
| 1000 assembler()->Deopt(0, /*is_eager =*/ 1); | 1003 assembler()->Deopt(0, /*is_eager =*/ 1); |
| 1001 info->set_pc_offset(assembler()->CodeSize()); | 1004 info->set_pc_offset(assembler()->CodeSize()); |
| 1002 } | 1005 } |
| 1003 #endif // defined(TARGET_ARCH_DBC) | 1006 #endif // defined(TARGET_ARCH_DBC) |
| 1004 | 1007 |
| 1005 | 1008 |
| 1006 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { | 1009 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { |
| 1007 ASSERT(exception_handlers_list_ != NULL); | 1010 ASSERT(exception_handlers_list_ != NULL); |
| 1008 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( | 1011 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1995 | 1998 |
| 1996 | 1999 |
| 1997 void FlowGraphCompiler::FrameStateClear() { | 2000 void FlowGraphCompiler::FrameStateClear() { |
| 1998 ASSERT(!is_optimizing()); | 2001 ASSERT(!is_optimizing()); |
| 1999 frame_state_.TruncateTo(0); | 2002 frame_state_.TruncateTo(0); |
| 2000 } | 2003 } |
| 2001 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 2004 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
| 2002 | 2005 |
| 2003 | 2006 |
| 2004 } // namespace dart | 2007 } // namespace dart |
| OLD | NEW |