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 3998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4009 class V8_EXPORT External : public Value { | 4009 class V8_EXPORT External : public Value { |
4010 public: | 4010 public: |
4011 static Local<External> New(Isolate* isolate, void* value); | 4011 static Local<External> New(Isolate* isolate, void* value); |
4012 V8_INLINE static External* Cast(Value* obj); | 4012 V8_INLINE static External* Cast(Value* obj); |
4013 void* Value() const; | 4013 void* Value() const; |
4014 private: | 4014 private: |
4015 static void CheckCast(v8::Value* obj); | 4015 static void CheckCast(v8::Value* obj); |
4016 }; | 4016 }; |
4017 | 4017 |
4018 | 4018 |
| 4019 #define V8_INTRINSICS_LIST(F) F(ArrayProto_values, array_values_iterator) |
| 4020 |
| 4021 enum Intrinsic { |
| 4022 #define V8_DECL_INTRINSIC(name, iname) k##name, |
| 4023 V8_INTRINSICS_LIST(V8_DECL_INTRINSIC) |
| 4024 #undef V8_DECL_INTRINSIC |
| 4025 }; |
| 4026 |
| 4027 |
4019 // --- Templates --- | 4028 // --- Templates --- |
4020 | 4029 |
4021 | 4030 |
4022 /** | 4031 /** |
4023 * The superclass of object and function templates. | 4032 * The superclass of object and function templates. |
4024 */ | 4033 */ |
4025 class V8_EXPORT Template : public Data { | 4034 class V8_EXPORT Template : public Data { |
4026 public: | 4035 public: |
4027 /** Adds a property to each instance created by this template.*/ | 4036 /** Adds a property to each instance created by this template.*/ |
4028 void Set(Local<Name> name, Local<Data> value, | 4037 void Set(Local<Name> name, Local<Data> value, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4078 Local<AccessorSignature> signature = Local<AccessorSignature>(), | 4087 Local<AccessorSignature> signature = Local<AccessorSignature>(), |
4079 AccessControl settings = DEFAULT); | 4088 AccessControl settings = DEFAULT); |
4080 void SetNativeDataProperty( | 4089 void SetNativeDataProperty( |
4081 Local<Name> name, AccessorNameGetterCallback getter, | 4090 Local<Name> name, AccessorNameGetterCallback getter, |
4082 AccessorNameSetterCallback setter = 0, | 4091 AccessorNameSetterCallback setter = 0, |
4083 // TODO(dcarney): gcc can't handle Local below | 4092 // TODO(dcarney): gcc can't handle Local below |
4084 Local<Value> data = Local<Value>(), PropertyAttribute attribute = None, | 4093 Local<Value> data = Local<Value>(), PropertyAttribute attribute = None, |
4085 Local<AccessorSignature> signature = Local<AccessorSignature>(), | 4094 Local<AccessorSignature> signature = Local<AccessorSignature>(), |
4086 AccessControl settings = DEFAULT); | 4095 AccessControl settings = DEFAULT); |
4087 | 4096 |
| 4097 /** |
| 4098 * During template instantiation, sets the value with the intrinsic property |
| 4099 * from the correct context. |
| 4100 */ |
| 4101 void SetIntrinsicDataProperty(Local<Name> name, Intrinsic intrinsic, |
| 4102 PropertyAttribute attribute = None); |
| 4103 |
4088 private: | 4104 private: |
4089 Template(); | 4105 Template(); |
4090 | 4106 |
4091 friend class ObjectTemplate; | 4107 friend class ObjectTemplate; |
4092 friend class FunctionTemplate; | 4108 friend class FunctionTemplate; |
4093 }; | 4109 }; |
4094 | 4110 |
4095 | 4111 |
4096 /** | 4112 /** |
4097 * NamedProperty[Getter|Setter] are used as interceptors on object. | 4113 * NamedProperty[Getter|Setter] are used as interceptors on object. |
(...skipping 4278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8376 */ | 8392 */ |
8377 | 8393 |
8378 | 8394 |
8379 } // namespace v8 | 8395 } // namespace v8 |
8380 | 8396 |
8381 | 8397 |
8382 #undef TYPE_CHECK | 8398 #undef TYPE_CHECK |
8383 | 8399 |
8384 | 8400 |
8385 #endif // V8_H_ | 8401 #endif // V8_H_ |
OLD | NEW |