OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/resolver.h" | 5 #include "vm/resolver.h" |
6 | 6 |
7 #include "vm/dart_entry.h" | 7 #include "vm/dart_entry.h" |
8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 false, // Not abstract. | 78 false, // Not abstract. |
79 false, // Not external. | 79 false, // Not external. |
80 false, // Not native. | 80 false, // Not native. |
81 owner, | 81 owner, |
82 0)); // No token position. | 82 0)); // No token position. |
83 | 83 |
84 // Initialize signature: receiver is a single fixed parameter. | 84 // Initialize signature: receiver is a single fixed parameter. |
85 const intptr_t kNumParameters = 1; | 85 const intptr_t kNumParameters = 1; |
86 extractor.set_num_fixed_parameters(kNumParameters); | 86 extractor.set_num_fixed_parameters(kNumParameters); |
87 extractor.SetNumOptionalParameters(0, 0); | 87 extractor.SetNumOptionalParameters(0, 0); |
88 extractor.set_parameter_types(Array::Handle(Array::New(kNumParameters, | 88 extractor.set_parameter_types(Object::extractor_parameter_types()); |
89 Heap::kOld))); | 89 extractor.set_parameter_names(Object::extractor_parameter_names()); |
90 extractor.set_parameter_names(Array::Handle(Array::New(kNumParameters, | |
91 Heap::kOld))); | |
92 extractor.SetParameterTypeAt(0, Type::Handle(Type::DynamicType())); | |
93 extractor.SetParameterNameAt(0, Symbols::This()); | |
94 extractor.set_result_type(Type::Handle(Type::DynamicType())); | 90 extractor.set_result_type(Type::Handle(Type::DynamicType())); |
95 | 91 |
96 extractor.set_extracted_method_closure(closure_function); | 92 extractor.set_extracted_method_closure(closure_function); |
97 | 93 |
98 owner.AddFunction(extractor); | 94 owner.AddFunction(extractor); |
99 | 95 |
100 return extractor.raw(); | 96 return extractor.raw(); |
101 } | 97 } |
102 | 98 |
103 | 99 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 OS::Print("ResolveStatic error '%s': %s.\n", | 214 OS::Print("ResolveStatic error '%s': %s.\n", |
219 function_name.ToCString(), | 215 function_name.ToCString(), |
220 error_message.ToCString()); | 216 error_message.ToCString()); |
221 } | 217 } |
222 return Function::null(); | 218 return Function::null(); |
223 } | 219 } |
224 return function.raw(); | 220 return function.raw(); |
225 } | 221 } |
226 | 222 |
227 } // namespace dart | 223 } // namespace dart |
OLD | NEW |