| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "lib/mirrors.h" | 5 #include "lib/mirrors.h" |
| 6 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/bootstrap_natives.h" | 8 #include "vm/bootstrap_natives.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 has_extra_parameter_info = false; | 138 has_extra_parameter_info = false; |
| 139 } | 139 } |
| 140 | 140 |
| 141 Array& param_descriptor = Array::Handle(); | 141 Array& param_descriptor = Array::Handle(); |
| 142 if (has_extra_parameter_info) { | 142 if (has_extra_parameter_info) { |
| 143 // Reparse the function for the following information: | 143 // Reparse the function for the following information: |
| 144 // * The default value of a parameter. | 144 // * The default value of a parameter. |
| 145 // * Whether a parameters has been declared as final. | 145 // * Whether a parameters has been declared as final. |
| 146 // * Any metadata associated with the parameter. | 146 // * Any metadata associated with the parameter. |
| 147 Object& result = Object::Handle(); | 147 Object& result = Object::Handle(); |
| 148 | 148 if (func.kernel_function() != NULL) { |
| 149 kernel::TreeNode* kernel_node = | 149 result = kernel::BuildParameterDescriptor(func); |
| 150 reinterpret_cast<kernel::TreeNode*>(func.kernel_function()); | |
| 151 if (kernel_node != NULL) { | |
| 152 result = kernel::BuildParameterDescriptor(kernel_node); | |
| 153 } else { | 150 } else { |
| 154 result = Parser::ParseFunctionParameters(func); | 151 result = Parser::ParseFunctionParameters(func); |
| 155 } | 152 } |
| 156 if (result.IsError()) { | 153 if (result.IsError()) { |
| 157 Exceptions::PropagateError(Error::Cast(result)); | 154 Exceptions::PropagateError(Error::Cast(result)); |
| 158 UNREACHABLE(); | 155 UNREACHABLE(); |
| 159 } | 156 } |
| 160 param_descriptor ^= result.raw(); | 157 param_descriptor ^= result.raw(); |
| 161 ASSERT(param_descriptor.Length() == | 158 ASSERT(param_descriptor.Length() == |
| 162 (Parser::kParameterEntrySize * non_implicit_param_count)); | 159 (Parser::kParameterEntrySize * non_implicit_param_count)); |
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2101 | 2098 |
| 2102 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { | 2099 DEFINE_NATIVE_ENTRY(TypeMirror_subtypeTest, 2) { |
| 2103 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); | 2100 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
| 2104 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); | 2101 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
| 2105 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); | 2102 return Bool::Get(a.IsSubtypeOf(b, NULL, NULL, Heap::kNew)).raw(); |
| 2106 } | 2103 } |
| 2107 | 2104 |
| 2108 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME | 2105 #endif // !PRODUCT && !DART_PRECOMPILED_RUNTIME |
| 2109 | 2106 |
| 2110 } // namespace dart | 2107 } // namespace dart |
| OLD | NEW |