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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 namespace v8 { | 65 namespace v8 { |
66 | 66 |
67 class AccessorSignature; | 67 class AccessorSignature; |
68 class Array; | 68 class Array; |
69 class Boolean; | 69 class Boolean; |
70 class BooleanObject; | 70 class BooleanObject; |
71 class Context; | 71 class Context; |
72 class CpuProfiler; | 72 class CpuProfiler; |
73 class Data; | 73 class Data; |
74 class Date; | 74 class Date; |
75 class DeclaredAccessorDescriptor; | |
76 class External; | 75 class External; |
77 class Function; | 76 class Function; |
78 class FunctionTemplate; | 77 class FunctionTemplate; |
79 class HeapProfiler; | 78 class HeapProfiler; |
80 class ImplementationUtilities; | 79 class ImplementationUtilities; |
81 class Int32; | 80 class Int32; |
82 class Integer; | 81 class Integer; |
83 class Isolate; | 82 class Isolate; |
84 class Name; | 83 class Name; |
85 class Number; | 84 class Number; |
(...skipping 29 matching lines...) Expand all Loading... |
115 template<class V, class T> class PersistentValueVector; | 114 template<class V, class T> class PersistentValueVector; |
116 template<class T, class P> class WeakCallbackObject; | 115 template<class T, class P> class WeakCallbackObject; |
117 class FunctionTemplate; | 116 class FunctionTemplate; |
118 class ObjectTemplate; | 117 class ObjectTemplate; |
119 class Data; | 118 class Data; |
120 template<typename T> class FunctionCallbackInfo; | 119 template<typename T> class FunctionCallbackInfo; |
121 template<typename T> class PropertyCallbackInfo; | 120 template<typename T> class PropertyCallbackInfo; |
122 class StackTrace; | 121 class StackTrace; |
123 class StackFrame; | 122 class StackFrame; |
124 class Isolate; | 123 class Isolate; |
125 class DeclaredAccessorDescriptor; | |
126 class ObjectOperationDescriptor; | |
127 class RawOperationDescriptor; | |
128 class CallHandlerHelper; | 124 class CallHandlerHelper; |
129 class EscapableHandleScope; | 125 class EscapableHandleScope; |
130 template<typename T> class ReturnValue; | 126 template<typename T> class ReturnValue; |
131 | 127 |
132 namespace internal { | 128 namespace internal { |
133 class Arguments; | 129 class Arguments; |
134 class Heap; | 130 class Heap; |
135 class HeapObject; | 131 class HeapObject; |
136 class Isolate; | 132 class Isolate; |
137 class Object; | 133 class Object; |
(...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2458 Handle<Value> data = Handle<Value>(), | 2454 Handle<Value> data = Handle<Value>(), |
2459 AccessControl settings = DEFAULT, | 2455 AccessControl settings = DEFAULT, |
2460 PropertyAttribute attribute = None); | 2456 PropertyAttribute attribute = None); |
2461 bool SetAccessor(Handle<Name> name, | 2457 bool SetAccessor(Handle<Name> name, |
2462 AccessorNameGetterCallback getter, | 2458 AccessorNameGetterCallback getter, |
2463 AccessorNameSetterCallback setter = 0, | 2459 AccessorNameSetterCallback setter = 0, |
2464 Handle<Value> data = Handle<Value>(), | 2460 Handle<Value> data = Handle<Value>(), |
2465 AccessControl settings = DEFAULT, | 2461 AccessControl settings = DEFAULT, |
2466 PropertyAttribute attribute = None); | 2462 PropertyAttribute attribute = None); |
2467 | 2463 |
2468 // This function is not yet stable and should not be used at this time. | |
2469 bool SetDeclaredAccessor(Local<Name> name, | |
2470 Local<DeclaredAccessorDescriptor> descriptor, | |
2471 PropertyAttribute attribute = None, | |
2472 AccessControl settings = DEFAULT); | |
2473 | |
2474 void SetAccessorProperty(Local<Name> name, | 2464 void SetAccessorProperty(Local<Name> name, |
2475 Local<Function> getter, | 2465 Local<Function> getter, |
2476 Handle<Function> setter = Handle<Function>(), | 2466 Handle<Function> setter = Handle<Function>(), |
2477 PropertyAttribute attribute = None, | 2467 PropertyAttribute attribute = None, |
2478 AccessControl settings = DEFAULT); | 2468 AccessControl settings = DEFAULT); |
2479 | 2469 |
2480 /** | 2470 /** |
2481 * Functionality for private properties. | 2471 * Functionality for private properties. |
2482 * This is an experimental feature, use at your own risk. | 2472 * This is an experimental feature, use at your own risk. |
2483 * Note: Private properties are inherited. Do not rely on this, since it may | 2473 * Note: Private properties are inherited. Do not rely on this, since it may |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3532 void SetNativeDataProperty(Local<Name> name, | 3522 void SetNativeDataProperty(Local<Name> name, |
3533 AccessorNameGetterCallback getter, | 3523 AccessorNameGetterCallback getter, |
3534 AccessorNameSetterCallback setter = 0, | 3524 AccessorNameSetterCallback setter = 0, |
3535 // TODO(dcarney): gcc can't handle Local below | 3525 // TODO(dcarney): gcc can't handle Local below |
3536 Handle<Value> data = Handle<Value>(), | 3526 Handle<Value> data = Handle<Value>(), |
3537 PropertyAttribute attribute = None, | 3527 PropertyAttribute attribute = None, |
3538 Local<AccessorSignature> signature = | 3528 Local<AccessorSignature> signature = |
3539 Local<AccessorSignature>(), | 3529 Local<AccessorSignature>(), |
3540 AccessControl settings = DEFAULT); | 3530 AccessControl settings = DEFAULT); |
3541 | 3531 |
3542 // This function is not yet stable and should not be used at this time. | |
3543 bool SetDeclaredAccessor(Local<Name> name, | |
3544 Local<DeclaredAccessorDescriptor> descriptor, | |
3545 PropertyAttribute attribute = None, | |
3546 Local<AccessorSignature> signature = | |
3547 Local<AccessorSignature>(), | |
3548 AccessControl settings = DEFAULT); | |
3549 | |
3550 private: | 3532 private: |
3551 Template(); | 3533 Template(); |
3552 | 3534 |
3553 friend class ObjectTemplate; | 3535 friend class ObjectTemplate; |
3554 friend class FunctionTemplate; | 3536 friend class FunctionTemplate; |
3555 }; | 3537 }; |
3556 | 3538 |
3557 | 3539 |
3558 /** | 3540 /** |
3559 * NamedProperty[Getter|Setter] are used as interceptors on object. | 3541 * NamedProperty[Getter|Setter] are used as interceptors on object. |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4149 public: | 4131 public: |
4150 static Local<AccessorSignature> New(Isolate* isolate, | 4132 static Local<AccessorSignature> New(Isolate* isolate, |
4151 Handle<FunctionTemplate> receiver = | 4133 Handle<FunctionTemplate> receiver = |
4152 Handle<FunctionTemplate>()); | 4134 Handle<FunctionTemplate>()); |
4153 | 4135 |
4154 private: | 4136 private: |
4155 AccessorSignature(); | 4137 AccessorSignature(); |
4156 }; | 4138 }; |
4157 | 4139 |
4158 | 4140 |
4159 class V8_EXPORT DeclaredAccessorDescriptor : public Data { | |
4160 private: | |
4161 DeclaredAccessorDescriptor(); | |
4162 }; | |
4163 | |
4164 | |
4165 class V8_EXPORT ObjectOperationDescriptor : public Data { | |
4166 public: | |
4167 // This function is not yet stable and should not be used at this time. | |
4168 static Local<RawOperationDescriptor> NewInternalFieldDereference( | |
4169 Isolate* isolate, | |
4170 int internal_field); | |
4171 private: | |
4172 ObjectOperationDescriptor(); | |
4173 }; | |
4174 | |
4175 | |
4176 enum DeclaredAccessorDescriptorDataType { | |
4177 kDescriptorBoolType, | |
4178 kDescriptorInt8Type, kDescriptorUint8Type, | |
4179 kDescriptorInt16Type, kDescriptorUint16Type, | |
4180 kDescriptorInt32Type, kDescriptorUint32Type, | |
4181 kDescriptorFloatType, kDescriptorDoubleType | |
4182 }; | |
4183 | |
4184 | |
4185 class V8_EXPORT RawOperationDescriptor : public Data { | |
4186 public: | |
4187 Local<DeclaredAccessorDescriptor> NewHandleDereference(Isolate* isolate); | |
4188 Local<RawOperationDescriptor> NewRawDereference(Isolate* isolate); | |
4189 Local<RawOperationDescriptor> NewRawShift(Isolate* isolate, | |
4190 int16_t byte_offset); | |
4191 Local<DeclaredAccessorDescriptor> NewPointerCompare(Isolate* isolate, | |
4192 void* compare_value); | |
4193 Local<DeclaredAccessorDescriptor> NewPrimitiveValue( | |
4194 Isolate* isolate, | |
4195 DeclaredAccessorDescriptorDataType data_type, | |
4196 uint8_t bool_offset = 0); | |
4197 Local<DeclaredAccessorDescriptor> NewBitmaskCompare8(Isolate* isolate, | |
4198 uint8_t bitmask, | |
4199 uint8_t compare_value); | |
4200 Local<DeclaredAccessorDescriptor> NewBitmaskCompare16( | |
4201 Isolate* isolate, | |
4202 uint16_t bitmask, | |
4203 uint16_t compare_value); | |
4204 Local<DeclaredAccessorDescriptor> NewBitmaskCompare32( | |
4205 Isolate* isolate, | |
4206 uint32_t bitmask, | |
4207 uint32_t compare_value); | |
4208 | |
4209 private: | |
4210 RawOperationDescriptor(); | |
4211 }; | |
4212 | |
4213 | |
4214 /** | 4141 /** |
4215 * A utility for determining the type of objects based on the template | 4142 * A utility for determining the type of objects based on the template |
4216 * they were constructed from. | 4143 * they were constructed from. |
4217 */ | 4144 */ |
4218 class V8_EXPORT TypeSwitch : public Data { | 4145 class V8_EXPORT TypeSwitch : public Data { |
4219 public: | 4146 public: |
4220 static Local<TypeSwitch> New(Handle<FunctionTemplate> type); | 4147 static Local<TypeSwitch> New(Handle<FunctionTemplate> type); |
4221 static Local<TypeSwitch> New(int argc, Handle<FunctionTemplate> types[]); | 4148 static Local<TypeSwitch> New(int argc, Handle<FunctionTemplate> types[]); |
4222 int match(Handle<Value> value); | 4149 int match(Handle<Value> value); |
4223 private: | 4150 private: |
(...skipping 3343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7567 */ | 7494 */ |
7568 | 7495 |
7569 | 7496 |
7570 } // namespace v8 | 7497 } // namespace v8 |
7571 | 7498 |
7572 | 7499 |
7573 #undef TYPE_CHECK | 7500 #undef TYPE_CHECK |
7574 | 7501 |
7575 | 7502 |
7576 #endif // V8_H_ | 7503 #endif // V8_H_ |
OLD | NEW |