| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
| 6 * | 6 * |
| 7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
| 8 * | 8 * |
| 9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
| 10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
| (...skipping 2767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2778 static const int kCalleeIndex = 5; | 2778 static const int kCalleeIndex = 5; |
| 2779 static const int kContextSaveIndex = 6; | 2779 static const int kContextSaveIndex = 6; |
| 2780 | 2780 |
| 2781 V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args, | 2781 V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args, |
| 2782 internal::Object** values, | 2782 internal::Object** values, |
| 2783 int length, | 2783 int length, |
| 2784 bool is_construct_call); | 2784 bool is_construct_call); |
| 2785 internal::Object** implicit_args_; | 2785 internal::Object** implicit_args_; |
| 2786 internal::Object** values_; | 2786 internal::Object** values_; |
| 2787 int length_; | 2787 int length_; |
| 2788 bool is_construct_call_; | 2788 int is_construct_call_; |
| 2789 }; | 2789 }; |
| 2790 | 2790 |
| 2791 | 2791 |
| 2792 /** | 2792 /** |
| 2793 * The information passed to a property callback about the context | 2793 * The information passed to a property callback about the context |
| 2794 * of the property access. | 2794 * of the property access. |
| 2795 */ | 2795 */ |
| 2796 template<typename T> | 2796 template<typename T> |
| 2797 class PropertyCallbackInfo { | 2797 class PropertyCallbackInfo { |
| 2798 public: | 2798 public: |
| (...skipping 3866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6665 TYPE_CHECK(S*, Primitive); | 6665 TYPE_CHECK(S*, Primitive); |
| 6666 } | 6666 } |
| 6667 | 6667 |
| 6668 template<typename T> | 6668 template<typename T> |
| 6669 internal::Object* ReturnValue<T>::GetDefaultValue() { | 6669 internal::Object* ReturnValue<T>::GetDefaultValue() { |
| 6670 // Default value is always the pointer below value_ on the stack. | 6670 // Default value is always the pointer below value_ on the stack. |
| 6671 return value_[-1]; | 6671 return value_[-1]; |
| 6672 } | 6672 } |
| 6673 | 6673 |
| 6674 | 6674 |
| 6675 template<typename T> | 6675 template <typename T> |
| 6676 FunctionCallbackInfo<T>::FunctionCallbackInfo(internal::Object** implicit_args, | 6676 FunctionCallbackInfo<T>::FunctionCallbackInfo(internal::Object** implicit_args, |
| 6677 internal::Object** values, | 6677 internal::Object** values, |
| 6678 int length, | 6678 int length, |
| 6679 bool is_construct_call) | 6679 bool is_construct_call) |
| 6680 : implicit_args_(implicit_args), | 6680 : implicit_args_(implicit_args), |
| 6681 values_(values), | 6681 values_(values), |
| 6682 length_(length), | 6682 length_(length), |
| 6683 is_construct_call_(is_construct_call) { } | 6683 is_construct_call_(is_construct_call ? 1 : 0) {} |
| 6684 | 6684 |
| 6685 | 6685 |
| 6686 template<typename T> | 6686 template<typename T> |
| 6687 Local<Value> FunctionCallbackInfo<T>::operator[](int i) const { | 6687 Local<Value> FunctionCallbackInfo<T>::operator[](int i) const { |
| 6688 if (i < 0 || length_ <= i) return Local<Value>(*Undefined(GetIsolate())); | 6688 if (i < 0 || length_ <= i) return Local<Value>(*Undefined(GetIsolate())); |
| 6689 return Local<Value>(reinterpret_cast<Value*>(values_ - i)); | 6689 return Local<Value>(reinterpret_cast<Value*>(values_ - i)); |
| 6690 } | 6690 } |
| 6691 | 6691 |
| 6692 | 6692 |
| 6693 template<typename T> | 6693 template<typename T> |
| (...skipping 29 matching lines...) Expand all Loading... |
| 6723 | 6723 |
| 6724 | 6724 |
| 6725 template<typename T> | 6725 template<typename T> |
| 6726 ReturnValue<T> FunctionCallbackInfo<T>::GetReturnValue() const { | 6726 ReturnValue<T> FunctionCallbackInfo<T>::GetReturnValue() const { |
| 6727 return ReturnValue<T>(&implicit_args_[kReturnValueIndex]); | 6727 return ReturnValue<T>(&implicit_args_[kReturnValueIndex]); |
| 6728 } | 6728 } |
| 6729 | 6729 |
| 6730 | 6730 |
| 6731 template<typename T> | 6731 template<typename T> |
| 6732 bool FunctionCallbackInfo<T>::IsConstructCall() const { | 6732 bool FunctionCallbackInfo<T>::IsConstructCall() const { |
| 6733 return is_construct_call_; | 6733 return static_cast<bool>(is_construct_call_ & 0x1); |
| 6734 } | 6734 } |
| 6735 | 6735 |
| 6736 | 6736 |
| 6737 template<typename T> | 6737 template<typename T> |
| 6738 int FunctionCallbackInfo<T>::Length() const { | 6738 int FunctionCallbackInfo<T>::Length() const { |
| 6739 return length_; | 6739 return length_; |
| 6740 } | 6740 } |
| 6741 | 6741 |
| 6742 | 6742 |
| 6743 Handle<Value> ScriptOrigin::ResourceName() const { | 6743 Handle<Value> ScriptOrigin::ResourceName() const { |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7502 */ | 7502 */ |
| 7503 | 7503 |
| 7504 | 7504 |
| 7505 } // namespace v8 | 7505 } // namespace v8 |
| 7506 | 7506 |
| 7507 | 7507 |
| 7508 #undef TYPE_CHECK | 7508 #undef TYPE_CHECK |
| 7509 | 7509 |
| 7510 | 7510 |
| 7511 #endif // V8_H_ | 7511 #endif // V8_H_ |
| OLD | NEW |