OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2728 V8_INLINE(void Set(const char* name, Handle<Data> value)); | 2728 V8_INLINE(void Set(const char* name, Handle<Data> value)); |
2729 private: | 2729 private: |
2730 Template(); | 2730 Template(); |
2731 | 2731 |
2732 friend class ObjectTemplate; | 2732 friend class ObjectTemplate; |
2733 friend class FunctionTemplate; | 2733 friend class FunctionTemplate; |
2734 }; | 2734 }; |
2735 | 2735 |
2736 | 2736 |
2737 template<typename T> | 2737 template<typename T> |
2738 class V8EXPORT ReturnValue { | 2738 class ReturnValue { |
2739 public: | 2739 public: |
2740 V8_INLINE(explicit ReturnValue(internal::Object** slot)); | 2740 V8_INLINE(explicit ReturnValue(internal::Object** slot)); |
2741 // Handle setters | 2741 // Handle setters |
2742 V8_INLINE(void Set(const Persistent<T>& handle)); | 2742 V8_INLINE(void Set(const Persistent<T>& handle)); |
2743 V8_INLINE(void Set(const Handle<T> handle)); | 2743 V8_INLINE(void Set(const Handle<T> handle)); |
2744 // Fast primitive setters | 2744 // Fast primitive setters |
2745 V8_INLINE(void Set(Isolate* isolate, bool value)); | 2745 V8_INLINE(void Set(Isolate* isolate, bool value)); |
2746 V8_INLINE(void Set(Isolate* isolate, double i)); | 2746 V8_INLINE(void Set(Isolate* isolate, double i)); |
2747 V8_INLINE(void Set(Isolate* isolate, int32_t i)); | 2747 V8_INLINE(void Set(Isolate* isolate, int32_t i)); |
2748 V8_INLINE(void Set(Isolate* isolate, uint32_t i)); | 2748 V8_INLINE(void Set(Isolate* isolate, uint32_t i)); |
2749 // Fast JS primitive setters | 2749 // Fast JS primitive setters |
2750 V8_INLINE(void SetNull(Isolate* isolate)); | 2750 V8_INLINE(void SetNull(Isolate* isolate)); |
2751 V8_INLINE(void SetUndefined(Isolate* isolate)); | 2751 V8_INLINE(void SetUndefined(Isolate* isolate)); |
2752 private: | 2752 private: |
2753 V8_INLINE(void SetTrue(Isolate* isolate)); | 2753 V8_INLINE(void SetTrue(Isolate* isolate)); |
2754 V8_INLINE(void SetFalse(Isolate* isolate)); | 2754 V8_INLINE(void SetFalse(Isolate* isolate)); |
2755 internal::Object** value_; | 2755 internal::Object** value_; |
2756 }; | 2756 }; |
2757 | 2757 |
2758 | 2758 |
2759 /** | 2759 /** |
2760 * The argument information given to function call callbacks. This | 2760 * The argument information given to function call callbacks. This |
2761 * class provides access to information about the context of the call, | 2761 * class provides access to information about the context of the call, |
2762 * including the receiver, the number and values of arguments, and | 2762 * including the receiver, the number and values of arguments, and |
2763 * the holder of the function. | 2763 * the holder of the function. |
2764 */ | 2764 */ |
2765 template<typename T> | 2765 template<typename T> |
2766 class V8EXPORT FunctionCallbackInfo { | 2766 class FunctionCallbackInfo { |
2767 public: | 2767 public: |
2768 V8_INLINE(int Length() const); | 2768 V8_INLINE(int Length() const); |
2769 V8_INLINE(Local<Value> operator[](int i) const); | 2769 V8_INLINE(Local<Value> operator[](int i) const); |
2770 V8_INLINE(Local<Function> Callee() const); | 2770 V8_INLINE(Local<Function> Callee() const); |
2771 V8_INLINE(Local<Object> This() const); | 2771 V8_INLINE(Local<Object> This() const); |
2772 V8_INLINE(Local<Object> Holder() const); | 2772 V8_INLINE(Local<Object> Holder() const); |
2773 V8_INLINE(bool IsConstructCall() const); | 2773 V8_INLINE(bool IsConstructCall() const); |
2774 V8_INLINE(Local<Value> Data() const); | 2774 V8_INLINE(Local<Value> Data() const); |
2775 V8_INLINE(Isolate* GetIsolate() const); | 2775 V8_INLINE(Isolate* GetIsolate() const); |
2776 V8_INLINE(ReturnValue<T> GetReturnValue() const); | 2776 V8_INLINE(ReturnValue<T> GetReturnValue() const); |
(...skipping 27 matching lines...) Expand all Loading... |
2804 internal::Object** values, | 2804 internal::Object** values, |
2805 int length, | 2805 int length, |
2806 bool is_construct_call)); | 2806 bool is_construct_call)); |
2807 }; | 2807 }; |
2808 | 2808 |
2809 /** | 2809 /** |
2810 * The information passed to a property callback about the context | 2810 * The information passed to a property callback about the context |
2811 * of the property access. | 2811 * of the property access. |
2812 */ | 2812 */ |
2813 template<typename T> | 2813 template<typename T> |
2814 class V8EXPORT PropertyCallbackInfo { | 2814 class PropertyCallbackInfo { |
2815 public: | 2815 public: |
2816 V8_INLINE(Isolate* GetIsolate() const); | 2816 V8_INLINE(Isolate* GetIsolate() const); |
2817 V8_INLINE(Local<Value> Data() const); | 2817 V8_INLINE(Local<Value> Data() const); |
2818 V8_INLINE(Local<Object> This() const); | 2818 V8_INLINE(Local<Object> This() const); |
2819 V8_INLINE(Local<Object> Holder() const); | 2819 V8_INLINE(Local<Object> Holder() const); |
2820 V8_INLINE(ReturnValue<T> GetReturnValue() const); | 2820 V8_INLINE(ReturnValue<T> GetReturnValue() const); |
2821 // This shouldn't be public, but the arm compiler needs it. | 2821 // This shouldn't be public, but the arm compiler needs it. |
2822 static const int kArgsLength = 5; | 2822 static const int kArgsLength = 5; |
2823 | 2823 |
2824 protected: | 2824 protected: |
(...skipping 3461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6286 | 6286 |
6287 | 6287 |
6288 } // namespace v8 | 6288 } // namespace v8 |
6289 | 6289 |
6290 | 6290 |
6291 #undef V8EXPORT | 6291 #undef V8EXPORT |
6292 #undef TYPE_CHECK | 6292 #undef TYPE_CHECK |
6293 | 6293 |
6294 | 6294 |
6295 #endif // V8_H_ | 6295 #endif // V8_H_ |
OLD | NEW |