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 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 // TODO(27590) Store Field object inside RawFunction::data_ if possible. | 1077 // TODO(27590) Store Field object inside RawFunction::data_ if possible. |
1078 name = Field::NameFromGetter(name); | 1078 name = Field::NameFromGetter(name); |
1079 const Field& field = Field::Handle(owner.LookupFieldAllowPrivate(name)); | 1079 const Field& field = Field::Handle(owner.LookupFieldAllowPrivate(name)); |
1080 ASSERT(!field.IsNull()); | 1080 ASSERT(!field.IsNull()); |
1081 | 1081 |
1082 // Only intrinsify getter if the field cannot contain a mutable double. | 1082 // Only intrinsify getter if the field cannot contain a mutable double. |
1083 // Reading from a mutable double box requires allocating a fresh double. | 1083 // Reading from a mutable double box requires allocating a fresh double. |
1084 if (field.is_instance() && | 1084 if (field.is_instance() && |
1085 (FLAG_precompiled_mode || !IsPotentialUnboxedField(field))) { | 1085 (FLAG_precompiled_mode || !IsPotentialUnboxedField(field))) { |
1086 GenerateInlinedGetter(field.Offset()); | 1086 GenerateInlinedGetter(field.Offset()); |
1087 return !FLAG_use_field_guards; | 1087 return !isolate()->use_field_guards(); |
1088 } | 1088 } |
1089 return false; | 1089 return false; |
1090 } | 1090 } |
1091 if (parsed_function().function().kind() == RawFunction::kImplicitSetter) { | 1091 if (parsed_function().function().kind() == RawFunction::kImplicitSetter) { |
1092 // TODO(27590) Store Field object inside RawFunction::data_ if possible. | 1092 // TODO(27590) Store Field object inside RawFunction::data_ if possible. |
1093 name = Field::NameFromSetter(name); | 1093 name = Field::NameFromSetter(name); |
1094 const Field& field = Field::Handle(owner.LookupFieldAllowPrivate(name)); | 1094 const Field& field = Field::Handle(owner.LookupFieldAllowPrivate(name)); |
1095 ASSERT(!field.IsNull()); | 1095 ASSERT(!field.IsNull()); |
1096 | 1096 |
1097 if (field.is_instance() && | 1097 if (field.is_instance() && |
1098 (FLAG_precompiled_mode || field.guarded_cid() == kDynamicCid)) { | 1098 (FLAG_precompiled_mode || field.guarded_cid() == kDynamicCid)) { |
1099 GenerateInlinedSetter(field.Offset()); | 1099 GenerateInlinedSetter(field.Offset()); |
1100 return !FLAG_use_field_guards; | 1100 return !isolate()->use_field_guards(); |
1101 } | 1101 } |
1102 return false; | 1102 return false; |
1103 } | 1103 } |
1104 } | 1104 } |
1105 | 1105 |
1106 EnterIntrinsicMode(); | 1106 EnterIntrinsicMode(); |
1107 | 1107 |
1108 bool complete = Intrinsifier::Intrinsify(parsed_function(), this); | 1108 bool complete = Intrinsifier::Intrinsify(parsed_function(), this); |
1109 | 1109 |
1110 ExitIntrinsicMode(); | 1110 ExitIntrinsicMode(); |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1886 | 1886 |
1887 | 1887 |
1888 void FlowGraphCompiler::FrameStateClear() { | 1888 void FlowGraphCompiler::FrameStateClear() { |
1889 ASSERT(!is_optimizing()); | 1889 ASSERT(!is_optimizing()); |
1890 frame_state_.TruncateTo(0); | 1890 frame_state_.TruncateTo(0); |
1891 } | 1891 } |
1892 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 1892 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
1893 | 1893 |
1894 | 1894 |
1895 } // namespace dart | 1895 } // namespace dart |
OLD | NEW |