Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: include/v8.h

Issue 12297012: Runtime version of declarative native accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed nits Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 1a35b3ad1743df257f988f1b6aaaedce70271b0f..7016cb5754abbcc31a4f9dd4d9080c968e604cf7 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -131,6 +131,9 @@ class AccessorInfo;
class StackTrace;
class StackFrame;
class Isolate;
+class DeclaredAccessorDescriptor;
+class ObjectOperationDescriptor;
+class RawOperationDescriptor;
namespace internal {
@@ -1606,6 +1609,12 @@ class V8EXPORT Object : public Value {
AccessControl settings = DEFAULT,
PropertyAttribute attribute = None);
+ // This function is not yet stable and should not be used at this time.
+ bool SetAccessor(Handle<String> name,
+ Handle<DeclaredAccessorDescriptor> descriptor,
+ AccessControl settings = DEFAULT,
+ PropertyAttribute attribute = None);
+
/**
* Returns an array containing the names of the enumerable properties
* of this object, including properties from prototype objects. The
@@ -2377,13 +2386,6 @@ class V8EXPORT FunctionTemplate : public Template {
private:
FunctionTemplate();
- void AddInstancePropertyAccessor(Handle<String> name,
- AccessorGetter getter,
- AccessorSetter setter,
- Handle<Value> data,
- AccessControl settings,
- PropertyAttribute attributes,
- Handle<AccessorSignature> signature);
void SetNamedInstancePropertyHandler(NamedPropertyGetter getter,
NamedPropertySetter setter,
NamedPropertyQuery query,
@@ -2456,6 +2458,14 @@ class V8EXPORT ObjectTemplate : public Template {
Handle<AccessorSignature> signature =
Handle<AccessorSignature>());
+ // This function is not yet stable and should not be used at this time.
+ bool SetAccessor(Handle<String> name,
+ Handle<DeclaredAccessorDescriptor> descriptor,
+ AccessControl settings = DEFAULT,
+ PropertyAttribute attribute = None,
+ Handle<AccessorSignature> signature =
+ Handle<AccessorSignature>());
+
/**
* Sets a named property handler on the object template.
*
@@ -2585,6 +2595,61 @@ class V8EXPORT AccessorSignature : public Data {
};
+class V8EXPORT DeclaredAccessorDescriptor : public Data {
+ private:
+ DeclaredAccessorDescriptor();
+};
+
+
+class V8EXPORT ObjectOperationDescriptor : public Data {
+ public:
+ // This function is not yet stable and should not be used at this time.
+ static Local<RawOperationDescriptor> NewInternalFieldDereference(
+ Isolate* isolate,
+ int internal_field);
+ private:
+ ObjectOperationDescriptor();
+};
+
+
+enum DeclaredAccessorDescriptorDataType {
+ kDescriptorBoolType,
+ kDescriptorInt8Type, kDescriptorUint8Type,
+ kDescriptorInt16Type, kDescriptorUint16Type,
+ kDescriptorInt32Type, kDescriptorUint32Type,
+ kDescriptorFloatType, kDescriptorDoubleType
+};
+
+
+class V8EXPORT RawOperationDescriptor : public Data {
+ public:
+ Local<DeclaredAccessorDescriptor> NewHandleDereference(Isolate* isolate);
+ Local<RawOperationDescriptor> NewRawDereference(Isolate* isolate);
+ Local<RawOperationDescriptor> NewRawShift(Isolate* isolate,
+ int16_t byte_offset);
+ Local<DeclaredAccessorDescriptor> NewPointerCompare(Isolate* isolate,
+ void* compare_value);
+ Local<DeclaredAccessorDescriptor> NewPrimitiveValue(
+ Isolate* isolate,
+ DeclaredAccessorDescriptorDataType data_type,
+ uint8_t bool_offset = 0);
+ Local<DeclaredAccessorDescriptor> NewBitmaskCompare8(Isolate* isolate,
+ uint8_t bitmask,
+ uint8_t compare_value);
+ Local<DeclaredAccessorDescriptor> NewBitmaskCompare16(
+ Isolate* isolate,
+ uint16_t bitmask,
+ uint16_t compare_value);
+ Local<DeclaredAccessorDescriptor> NewBitmaskCompare32(
+ Isolate* isolate,
+ uint32_t bitmask,
+ uint32_t compare_value);
+
+ private:
+ RawOperationDescriptor();
+};
+
+
/**
* A utility for determining the type of objects based on the template
* they were constructed from.
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698