| 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 "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 3932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3943 intptr_t Function::NumberOfImplicitParameters() const { | 3943 intptr_t Function::NumberOfImplicitParameters() const { |
| 3944 if (kind() == RawFunction::kConstructor) { | 3944 if (kind() == RawFunction::kConstructor) { |
| 3945 if (is_static()) { | 3945 if (is_static()) { |
| 3946 ASSERT(IsFactory()); | 3946 ASSERT(IsFactory()); |
| 3947 return 1; // Type arguments. | 3947 return 1; // Type arguments. |
| 3948 } else { | 3948 } else { |
| 3949 ASSERT(IsConstructor()); | 3949 ASSERT(IsConstructor()); |
| 3950 return 2; // Instance, phase. | 3950 return 2; // Instance, phase. |
| 3951 } | 3951 } |
| 3952 } | 3952 } |
| 3953 if (!is_static() && (kind() != RawFunction::kClosureFunction)) { | 3953 if (!is_static() && |
| 3954 kind() != RawFunction::kClosureFunction && |
| 3955 kind() != RawFunction::kSignatureFunction) { |
| 3954 // Closure functions defined inside instance (i.e. non-static) functions are | 3956 // Closure functions defined inside instance (i.e. non-static) functions are |
| 3955 // marked as non-static, but they do not have a receiver. | 3957 // marked as non-static, but they do not have a receiver. |
| 3956 return 1; // Receiver. | 3958 return 1; // Receiver. |
| 3957 } | 3959 } |
| 3958 return 0; // No implicit parameters. | 3960 return 0; // No implicit parameters. |
| 3959 } | 3961 } |
| 3960 | 3962 |
| 3961 | 3963 |
| 3962 bool Function::AreValidArgumentCounts(int num_arguments, | 3964 bool Function::AreValidArgumentCounts(int num_arguments, |
| 3963 int num_named_arguments, | 3965 int num_named_arguments, |
| (...skipping 7226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11190 } | 11192 } |
| 11191 return result.raw(); | 11193 return result.raw(); |
| 11192 } | 11194 } |
| 11193 | 11195 |
| 11194 | 11196 |
| 11195 const char* WeakProperty::ToCString() const { | 11197 const char* WeakProperty::ToCString() const { |
| 11196 return "_WeakProperty"; | 11198 return "_WeakProperty"; |
| 11197 } | 11199 } |
| 11198 | 11200 |
| 11199 } // namespace dart | 11201 } // namespace dart |
| OLD | NEW |