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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
7 | 7 |
8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
(...skipping 4487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4498 return clazz()->ptr()->num_native_fields_; | 4498 return clazz()->ptr()->num_native_fields_; |
4499 } | 4499 } |
4500 | 4500 |
4501 void SetNativeField(int index, intptr_t value) const; | 4501 void SetNativeField(int index, intptr_t value) const; |
4502 | 4502 |
4503 // Returns true if the instance is a closure object. | 4503 // Returns true if the instance is a closure object. |
4504 bool IsClosure() const; | 4504 bool IsClosure() const; |
4505 | 4505 |
4506 // If the instance is a callable object, i.e. a closure or the instance of a | 4506 // If the instance is a callable object, i.e. a closure or the instance of a |
4507 // class implementing a 'call' method, return true and set the function | 4507 // class implementing a 'call' method, return true and set the function |
4508 // (if not NULL) to call and the context (if not NULL) to pass to the | 4508 // (if not NULL) to call. |
4509 // function. | 4509 bool IsCallable(Function* function) const; |
4510 bool IsCallable(Function* function, Context* context) const; | |
4511 | 4510 |
4512 // Evaluate the given expression as if it appeared in an instance | 4511 // Evaluate the given expression as if it appeared in an instance |
4513 // method of this instance and return the resulting value, or an | 4512 // method of this instance and return the resulting value, or an |
4514 // error object if evaluating the expression fails. The method has | 4513 // error object if evaluating the expression fails. The method has |
4515 // the formal parameters given in param_names, and is invoked with | 4514 // the formal parameters given in param_names, and is invoked with |
4516 // the argument values given in param_values. | 4515 // the argument values given in param_values. |
4517 RawObject* Evaluate(const String& expr, | 4516 RawObject* Evaluate(const String& expr, |
4518 const Array& param_names, | 4517 const Array& param_names, |
4519 const Array& param_values) const; | 4518 const Array& param_values) const; |
4520 | 4519 |
(...skipping 3030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7551 | 7550 |
7552 | 7551 |
7553 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7552 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
7554 intptr_t index) { | 7553 intptr_t index) { |
7555 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7554 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
7556 } | 7555 } |
7557 | 7556 |
7558 } // namespace dart | 7557 } // namespace dart |
7559 | 7558 |
7560 #endif // VM_OBJECT_H_ | 7559 #endif // VM_OBJECT_H_ |
OLD | NEW |