|
Lines 4304-4310
sub GenerateConstructorDeclaration
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec1
|
| 4304 |
push(@$outputArray, " return ptr;\n"); |
4304 |
push(@$outputArray, " return ptr;\n"); |
| 4305 |
push(@$outputArray, " }\n\n"); |
4305 |
push(@$outputArray, " }\n\n"); |
| 4306 |
|
4306 |
|
| 4307 |
push(@$outputArray, " static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);\n"); |
|
|
| 4308 |
push(@$outputArray, " DECLARE_INFO;\n"); |
4307 |
push(@$outputArray, " DECLARE_INFO;\n"); |
| 4309 |
|
4308 |
|
| 4310 |
push(@$outputArray, " static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)\n"); |
4309 |
push(@$outputArray, " static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)\n"); |
|
Lines 4585-4590
END
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec2
|
| 4585 |
} |
4584 |
} |
| 4586 |
} |
4585 |
} |
| 4587 |
|
4586 |
|
|
|
4587 |
sub ConstructorHasProperties |
| 4588 |
{ |
| 4589 |
my $interface = shift; |
| 4590 |
|
| 4591 |
foreach my $constant (@{$interface->constants}) { |
| 4592 |
return 1; |
| 4593 |
} |
| 4594 |
|
| 4595 |
foreach my $attribute (@{$interface->attributes}) { |
| 4596 |
next unless ($attribute->isStatic); |
| 4597 |
return 1; |
| 4598 |
} |
| 4599 |
|
| 4600 |
foreach my $function (@{$interface->functions}) { |
| 4601 |
next unless ($function->isStatic); |
| 4602 |
return 1; |
| 4603 |
} |
| 4604 |
|
| 4605 |
return 0; |
| 4606 |
} |
| 4607 |
|
| 4588 |
sub GenerateConstructorHelperMethods |
4608 |
sub GenerateConstructorHelperMethods |
| 4589 |
{ |
4609 |
{ |
| 4590 |
my $outputArray = shift; |
4610 |
my $outputArray = shift; |
|
Lines 4627-4633
sub GenerateConstructorHelperMethods
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec3
|
| 4627 |
} else { |
4647 |
} else { |
| 4628 |
push(@$outputArray, "const ClassInfo ${constructorClassName}::s_info = { \"${visibleInterfaceName}Constructor\", &Base::s_info, &${constructorClassName}Table, 0, CREATE_METHOD_TABLE($constructorClassName) };\n\n"); |
4648 |
push(@$outputArray, "const ClassInfo ${constructorClassName}::s_info = { \"${visibleInterfaceName}Constructor\", &Base::s_info, &${constructorClassName}Table, 0, CREATE_METHOD_TABLE($constructorClassName) };\n\n"); |
| 4629 |
} |
4649 |
} |
| 4630 |
|
|
|
| 4631 |
push(@$outputArray, "${constructorClassName}::${constructorClassName}(Structure* structure, JSDOMGlobalObject* globalObject)\n"); |
4650 |
push(@$outputArray, "${constructorClassName}::${constructorClassName}(Structure* structure, JSDOMGlobalObject* globalObject)\n"); |
| 4632 |
push(@$outputArray, " : DOMConstructorObject(structure, globalObject)\n"); |
4651 |
push(@$outputArray, " : DOMConstructorObject(structure, globalObject)\n"); |
| 4633 |
push(@$outputArray, "{\n}\n\n"); |
4652 |
push(@$outputArray, "{\n}\n\n"); |
|
Lines 4649-4672
sub GenerateConstructorHelperMethods
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm_sec4
|
| 4649 |
push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${protoClassName}::self(vm, globalObject), DontDelete | ReadOnly);\n"); |
4668 |
push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${protoClassName}::self(vm, globalObject), DontDelete | ReadOnly);\n"); |
| 4650 |
} |
4669 |
} |
| 4651 |
push(@$outputArray, " putDirect(vm, vm.propertyNames->length, jsNumber(${leastConstructorLength}), ReadOnly | DontDelete | DontEnum);\n") if defined $leastConstructorLength; |
4670 |
push(@$outputArray, " putDirect(vm, vm.propertyNames->length, jsNumber(${leastConstructorLength}), ReadOnly | DontDelete | DontEnum);\n") if defined $leastConstructorLength; |
| 4652 |
push(@$outputArray, "}\n\n"); |
4671 |
push(@$outputArray, " reifyStaticProperties(vm, ${className}ConstructorTableValues, *this);\n") if ConstructorHasProperties($interface); |
| 4653 |
|
|
|
| 4654 |
if (!$generatingNamedConstructor) { |
| 4655 |
my $hasStaticFunctions = 0; |
| 4656 |
foreach my $function (@{$interface->functions}) { |
| 4657 |
if ($function->isStatic) { |
| 4658 |
$hasStaticFunctions = 1; |
| 4659 |
last; |
| 4660 |
} |
| 4661 |
} |
| 4662 |
|
4672 |
|
| 4663 |
my $kind = $hasStaticFunctions ? "Property" : "Value"; |
4673 |
push(@$outputArray, "}\n\n"); |
| 4664 |
|
|
|
| 4665 |
push(@$outputArray, "bool ${constructorClassName}::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)\n"); |
| 4666 |
push(@$outputArray, "{\n"); |
| 4667 |
push(@$outputArray, " return getStatic${kind}Slot<${constructorClassName}, JSDOMWrapper>(exec, " . constructorHashTableAccessor($interface->extendedAttributes->{"JSNoStaticTables"}, $constructorClassName) . ", jsCast<${constructorClassName}*>(object), propertyName, slot);\n"); |
| 4668 |
push(@$outputArray, "}\n\n"); |
| 4669 |
} |
| 4670 |
|
4674 |
|
| 4671 |
if (IsConstructable($interface)) { |
4675 |
if (IsConstructable($interface)) { |
| 4672 |
if (!$interface->extendedAttributes->{"NamedConstructor"} || $generatingNamedConstructor) { |
4676 |
if (!$interface->extendedAttributes->{"NamedConstructor"} || $generatingNamedConstructor) { |