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/class_finalizer.h" | 5 #include "vm/class_finalizer.h" |
6 | 6 |
7 #include "vm/code_generator.h" | 7 #include "vm/code_generator.h" |
8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 Function::New(getter_name, | 1381 Function::New(getter_name, |
1382 RawFunction::kImplicitStaticFinalGetter, | 1382 RawFunction::kImplicitStaticFinalGetter, |
1383 /* is_static = */ true, | 1383 /* is_static = */ true, |
1384 /* is_const = */ field.is_const(), | 1384 /* is_const = */ field.is_const(), |
1385 /* is_abstract = */ false, | 1385 /* is_abstract = */ false, |
1386 /* is_external = */ false, | 1386 /* is_external = */ false, |
1387 /* is_native = */ false, | 1387 /* is_native = */ false, |
1388 cls, | 1388 cls, |
1389 field.token_pos())); | 1389 field.token_pos())); |
1390 getter.set_result_type(type); | 1390 getter.set_result_type(type); |
| 1391 getter.set_is_debuggable(false); |
1391 cls.AddFunction(getter); | 1392 cls.AddFunction(getter); |
1392 field.set_value(Instance::Handle(I, Object::sentinel().raw())); | 1393 field.set_value(Instance::Handle(I, Object::sentinel().raw())); |
1393 } | 1394 } |
1394 } | 1395 } |
1395 } | 1396 } |
1396 } | 1397 } |
1397 // Collect interfaces, super interfaces, and super classes of this class. | 1398 // Collect interfaces, super interfaces, and super classes of this class. |
1398 const GrowableObjectArray& interfaces = | 1399 const GrowableObjectArray& interfaces = |
1399 GrowableObjectArray::Handle(I, GrowableObjectArray::New()); | 1400 GrowableObjectArray::Handle(I, GrowableObjectArray::New()); |
1400 CollectInterfaces(cls, interfaces); | 1401 CollectInterfaces(cls, interfaces); |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2063 false, // Not abstract. | 2064 false, // Not abstract. |
2064 false, // Not external. | 2065 false, // Not external. |
2065 false, // Not native. | 2066 false, // Not native. |
2066 mixin_app, | 2067 mixin_app, |
2067 mixin_app.token_pos())); | 2068 mixin_app.token_pos())); |
2068 | 2069 |
2069 clone.set_num_fixed_parameters(func.num_fixed_parameters()); | 2070 clone.set_num_fixed_parameters(func.num_fixed_parameters()); |
2070 clone.SetNumOptionalParameters(func.NumOptionalParameters(), | 2071 clone.SetNumOptionalParameters(func.NumOptionalParameters(), |
2071 func.HasOptionalPositionalParameters()); | 2072 func.HasOptionalPositionalParameters()); |
2072 clone.set_result_type(dynamic_type); | 2073 clone.set_result_type(dynamic_type); |
| 2074 clone.set_is_debuggable(false); |
2073 | 2075 |
2074 const intptr_t num_parameters = func.NumParameters(); | 2076 const intptr_t num_parameters = func.NumParameters(); |
2075 // The cloned ctor shares the parameter names array with the | 2077 // The cloned ctor shares the parameter names array with the |
2076 // original. | 2078 // original. |
2077 const Array& parameter_names = Array::Handle(func.parameter_names()); | 2079 const Array& parameter_names = Array::Handle(func.parameter_names()); |
2078 ASSERT(parameter_names.Length() == num_parameters); | 2080 ASSERT(parameter_names.Length() == num_parameters); |
2079 clone.set_parameter_names(parameter_names); | 2081 clone.set_parameter_names(parameter_names); |
2080 // The parameter types of the cloned constructor are 'dynamic'. | 2082 // The parameter types of the cloned constructor are 'dynamic'. |
2081 clone.set_parameter_types(Array::Handle(Array::New(num_parameters))); | 2083 clone.set_parameter_types(Array::Handle(Array::New(num_parameters))); |
2082 for (intptr_t n = 0; n < num_parameters; n++) { | 2084 for (intptr_t n = 0; n < num_parameters; n++) { |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3148 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); | 3150 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); |
3149 field ^= fields_array.At(0); | 3151 field ^= fields_array.At(0); |
3150 ASSERT(field.Offset() == ByteBuffer::data_offset()); | 3152 ASSERT(field.Offset() == ByteBuffer::data_offset()); |
3151 name ^= field.name(); | 3153 name ^= field.name(); |
3152 expected_name ^= String::New("_data"); | 3154 expected_name ^= String::New("_data"); |
3153 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3155 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
3154 #endif | 3156 #endif |
3155 } | 3157 } |
3156 | 3158 |
3157 } // namespace dart | 3159 } // namespace dart |
OLD | NEW |