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

Unified Diff: src/api.cc

Issue 834443004: remove declarative accessors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « src/api.h ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 4ab786dd0c1d86d7dc54b962f976a442a4d3b009..b18e19bc75ed45745c8a8be3e09dd9b1b4ec5ed8 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -854,122 +854,6 @@ Local<AccessorSignature> AccessorSignature::New(
}
-template<typename Operation>
-static Local<Operation> NewDescriptor(
- Isolate* isolate,
- const i::DeclaredAccessorDescriptorData& data,
- Data* previous_descriptor) {
- i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
- i::Handle<i::DeclaredAccessorDescriptor> previous =
- i::Handle<i::DeclaredAccessorDescriptor>();
- if (previous_descriptor != NULL) {
- previous = Utils::OpenHandle(
- static_cast<DeclaredAccessorDescriptor*>(previous_descriptor));
- }
- i::Handle<i::DeclaredAccessorDescriptor> descriptor =
- i::DeclaredAccessorDescriptor::Create(internal_isolate, data, previous);
- return Utils::Convert<i::DeclaredAccessorDescriptor, Operation>(descriptor);
-}
-
-
-Local<RawOperationDescriptor>
-ObjectOperationDescriptor::NewInternalFieldDereference(
- Isolate* isolate,
- int internal_field) {
- i::DeclaredAccessorDescriptorData data;
- data.type = i::kDescriptorObjectDereference;
- data.object_dereference_descriptor.internal_field = internal_field;
- return NewDescriptor<RawOperationDescriptor>(isolate, data, NULL);
-}
-
-
-Local<RawOperationDescriptor> RawOperationDescriptor::NewRawShift(
- Isolate* isolate,
- int16_t byte_offset) {
- i::DeclaredAccessorDescriptorData data;
- data.type = i::kDescriptorPointerShift;
- data.pointer_shift_descriptor.byte_offset = byte_offset;
- return NewDescriptor<RawOperationDescriptor>(isolate, data, this);
-}
-
-
-Local<DeclaredAccessorDescriptor> RawOperationDescriptor::NewHandleDereference(
- Isolate* isolate) {
- i::DeclaredAccessorDescriptorData data;
- data.type = i::kDescriptorReturnObject;
- return NewDescriptor<DeclaredAccessorDescriptor>(isolate, data, this);
-}
-
-
-Local<RawOperationDescriptor> RawOperationDescriptor::NewRawDereference(
- Isolate* isolate) {
- i::DeclaredAccessorDescriptorData data;
- data.type = i::kDescriptorPointerDereference;
- return NewDescriptor<RawOperationDescriptor>(isolate, data, this);
-}
-
-
-Local<DeclaredAccessorDescriptor> RawOperationDescriptor::NewPointerCompare(
- Isolate* isolate,
- void* compare_value) {
- i::DeclaredAccessorDescriptorData data;
- data.type = i::kDescriptorPointerCompare;
- data.pointer_compare_descriptor.compare_value = compare_value;
- return NewDescriptor<DeclaredAccessorDescriptor>(isolate, data, this);
-}
-
-
-Local<DeclaredAccessorDescriptor> RawOperationDescriptor::NewPrimitiveValue(
- Isolate* isolate,
- DeclaredAccessorDescriptorDataType data_type,
- uint8_t bool_offset) {
- i::DeclaredAccessorDescriptorData data;
- data.type = i::kDescriptorPrimitiveValue;
- data.primitive_value_descriptor.data_type = data_type;
- data.primitive_value_descriptor.bool_offset = bool_offset;
- return NewDescriptor<DeclaredAccessorDescriptor>(isolate, data, this);
-}
-
-
-template<typename T>
-static Local<DeclaredAccessorDescriptor> NewBitmaskCompare(
- Isolate* isolate,
- T bitmask,
- T compare_value,
- RawOperationDescriptor* operation) {
- i::DeclaredAccessorDescriptorData data;
- data.type = i::kDescriptorBitmaskCompare;
- data.bitmask_compare_descriptor.bitmask = bitmask;
- data.bitmask_compare_descriptor.compare_value = compare_value;
- data.bitmask_compare_descriptor.size = sizeof(T);
- return NewDescriptor<DeclaredAccessorDescriptor>(isolate, data, operation);
-}
-
-
-Local<DeclaredAccessorDescriptor> RawOperationDescriptor::NewBitmaskCompare8(
- Isolate* isolate,
- uint8_t bitmask,
- uint8_t compare_value) {
- return NewBitmaskCompare(isolate, bitmask, compare_value, this);
-}
-
-
-Local<DeclaredAccessorDescriptor> RawOperationDescriptor::NewBitmaskCompare16(
- Isolate* isolate,
- uint16_t bitmask,
- uint16_t compare_value) {
- return NewBitmaskCompare(isolate, bitmask, compare_value, this);
-}
-
-
-Local<DeclaredAccessorDescriptor> RawOperationDescriptor::NewBitmaskCompare32(
- Isolate* isolate,
- uint32_t bitmask,
- uint32_t compare_value) {
- return NewBitmaskCompare(isolate, bitmask, compare_value, this);
-}
-
-
Local<TypeSwitch> TypeSwitch::New(Handle<FunctionTemplate> type) {
Handle<FunctionTemplate> types[1] = { type };
return TypeSwitch::New(1, types);
@@ -1068,23 +952,6 @@ static i::Handle<i::AccessorInfo> MakeAccessorInfo(
}
-static i::Handle<i::AccessorInfo> MakeAccessorInfo(
- v8::Handle<Name> name,
- v8::Handle<v8::DeclaredAccessorDescriptor> descriptor,
- void* setter_ignored,
- void* data_ignored,
- v8::AccessControl settings,
- v8::PropertyAttribute attributes,
- v8::Handle<AccessorSignature> signature) {
- i::Isolate* isolate = Utils::OpenHandle(*name)->GetIsolate();
- if (descriptor.IsEmpty()) return i::Handle<i::DeclaredAccessorInfo>();
- i::Handle<i::DeclaredAccessorInfo> obj =
- isolate->factory()->NewDeclaredAccessorInfo();
- obj->set_descriptor(*Utils::OpenHandle(*descriptor));
- return SetAccessorInfoProperties(obj, name, settings, attributes, signature);
-}
-
-
Local<ObjectTemplate> FunctionTemplate::InstanceTemplate() {
i::Handle<i::FunctionTemplateInfo> handle = Utils::OpenHandle(this, true);
if (!Utils::ApiCheck(!handle.is_null(),
@@ -1244,18 +1111,6 @@ static bool TemplateSetAccessor(
}
-bool Template::SetDeclaredAccessor(
- Local<Name> name,
- Local<DeclaredAccessorDescriptor> descriptor,
- PropertyAttribute attribute,
- Local<AccessorSignature> signature,
- AccessControl settings) {
- void* null = NULL;
- return TemplateSetAccessor(
- this, name, descriptor, null, null, settings, attribute, signature);
-}
-
-
void Template::SetNativeDataProperty(v8::Local<String> name,
AccessorGetterCallback getter,
AccessorSetterCallback setter,
@@ -3630,16 +3485,6 @@ bool Object::SetAccessor(Handle<Name> name,
}
-bool Object::SetDeclaredAccessor(Local<Name> name,
- Local<DeclaredAccessorDescriptor> descriptor,
- PropertyAttribute attributes,
- AccessControl settings) {
- void* null = NULL;
- return ObjectSetAccessor(
- this, name, descriptor, null, null, settings, attributes);
-}
-
-
void Object::SetAccessorProperty(Local<Name> name,
Local<Function> getter,
Handle<Function> setter,
« no previous file with comments | « src/api.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698