| 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/jit_optimizer.h" | 5 #include "vm/jit_optimizer.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/branch_optimizer.h" | 8 #include "vm/branch_optimizer.h" |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 2973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2984 unboxed_field = true; | 2984 unboxed_field = true; |
| 2985 } | 2985 } |
| 2986 } | 2986 } |
| 2987 if (!unboxed_field) { | 2987 if (!unboxed_field) { |
| 2988 // TODO(srdjan): Instead of aborting pass this field to the mutator thread | 2988 // TODO(srdjan): Instead of aborting pass this field to the mutator thread |
| 2989 // so that it can: | 2989 // so that it can: |
| 2990 // - set it to unboxed | 2990 // - set it to unboxed |
| 2991 // - deoptimize dependent code. | 2991 // - deoptimize dependent code. |
| 2992 if (Compiler::IsBackgroundCompilation()) { | 2992 if (Compiler::IsBackgroundCompilation()) { |
| 2993 isolate()->AddDeoptimizingBoxedField(field); | 2993 isolate()->AddDeoptimizingBoxedField(field); |
| 2994 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId); | 2994 Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId, |
| 2995 "Unboxing instance field while compiling"); |
| 2995 UNREACHABLE(); | 2996 UNREACHABLE(); |
| 2996 } | 2997 } |
| 2997 if (FLAG_trace_optimization || FLAG_trace_field_guards) { | 2998 if (FLAG_trace_optimization || FLAG_trace_field_guards) { |
| 2998 THR_Print("Disabling unboxing of %s\n", field.ToCString()); | 2999 THR_Print("Disabling unboxing of %s\n", field.ToCString()); |
| 2999 if (!setter.IsNull()) { | 3000 if (!setter.IsNull()) { |
| 3000 OS::Print(" setter usage count: %" Pd "\n", setter.usage_counter()); | 3001 OS::Print(" setter usage count: %" Pd "\n", setter.usage_counter()); |
| 3001 } | 3002 } |
| 3002 if (!getter.IsNull()) { | 3003 if (!getter.IsNull()) { |
| 3003 OS::Print(" getter usage count: %" Pd "\n", getter.usage_counter()); | 3004 OS::Print(" getter usage count: %" Pd "\n", getter.usage_counter()); |
| 3004 } | 3005 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3130 | 3131 |
| 3131 // Discard the environment from the original instruction because the store | 3132 // Discard the environment from the original instruction because the store |
| 3132 // can't deoptimize. | 3133 // can't deoptimize. |
| 3133 instr->RemoveEnvironment(); | 3134 instr->RemoveEnvironment(); |
| 3134 ReplaceCall(instr, store); | 3135 ReplaceCall(instr, store); |
| 3135 return true; | 3136 return true; |
| 3136 } | 3137 } |
| 3137 | 3138 |
| 3138 | 3139 |
| 3139 } // namespace dart | 3140 } // namespace dart |
| OLD | NEW |