Changeset 135115 in webkit


Ignore:
Timestamp:
Nov 18, 2012, 11:35:06 PM (13 years ago)
Author:
haraken@chromium.org
Message:

[V8] Remove unused variables from CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=102648

Reviewed by Adam Barth.

No tests. No change in generated code.

  • bindings/scripts/CodeGeneratorV8.pm:

(GenerateInterface):
(GenerateHeader):
(GetInternalFields):
(GenerateNormalAttrGetter):
(GenerateSingleBatchedAttribute):
(GenerateImplementationCustomCall):
(GenerateFunctionCallString):
(CreateCustomSignature):
(GetContextEnableFunction):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r135114 r135115  
     12012-11-18  Kentaro Hara  <haraken@chromium.org>
     2
     3        [V8] Remove unused variables from CodeGeneratorV8.pm
     4        https://bugs.webkit.org/show_bug.cgi?id=102648
     5
     6        Reviewed by Adam Barth.
     7
     8        No tests. No change in generated code.
     9
     10        * bindings/scripts/CodeGeneratorV8.pm:
     11        (GenerateInterface):
     12        (GenerateHeader):
     13        (GetInternalFields):
     14        (GenerateNormalAttrGetter):
     15        (GenerateSingleBatchedAttribute):
     16        (GenerateImplementationCustomCall):
     17        (GenerateFunctionCallString):
     18        (CreateCustomSignature):
     19        (GetContextEnableFunction):
     20
    1212012-11-18  Kentaro Hara  <haraken@chromium.org>
    222
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r135113 r135115  
    3838my @headerContent = ();
    3939my @implContentHeader = ();
    40 my @implFixedHeader = ();
    4140my @implContent = ();
    4241my @implContentDecls = ();
     
    8685    my $object = shift;
    8786    my $dataNode = shift;
    88     my $defines = shift;
    8987
    9088    # Start actual generation
     
    509507    my $noToV8 = $dataNode->extendedAttributes->{"SuppressToJSObject"};
    510508    my $noWrap = $dataNode->extendedAttributes->{"V8NoWrapperCache"} || $noToV8;
    511     my $createWrapperArgumentType = GetPassRefPtrType($nativeType);
    512509    if (!$noWrap) {
    513510        my $createWrapperArgumentType = GetPassRefPtrType($nativeType);
     
    623620{
    624621    my $dataNode = shift;
    625     my $name = $dataNode->name;
    626622
    627623    my @customInternalFields = ();
     
    995991
    996992    my $result;
    997     my $wrapper;
    998 
    999993    if ($attribute->signature->type eq "EventListener" && $dataNode->name eq "DOMWindow") {
    1000994        push(@implContentDecls, "    if (!imp->document())\n");
     
    22702264    my $setter;
    22712265    my $propAttr = "v8::None";
    2272     my $hasCustomSetter = 0;
    22732266
    22742267    # Check attributes.
     
    23112304        # Custom Setter
    23122305        if ($attrExt->{"CustomSetter"} || $attrExt->{"V8CustomSetter"} || $attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
    2313             $hasCustomSetter = 1;
    23142306            $setter = "V8${customAccessor}AccessorSetter";
    23152307        }
     
    25932585    my $dataNode = shift;
    25942586    my $interfaceName = $dataNode->name;
    2595     my $hasCustomCall = $dataNode->extendedAttributes->{"CustomCall"};
    2596 
    2597     if ($hasCustomCall) {
     2587
     2588    if ($dataNode->extendedAttributes->{"CustomCall"}) {
    25982589        push(@implContent, "    desc->InstanceTemplate()->SetCallAsFunctionHandler(V8${interfaceName}::callAsFunctionCallback);\n");
    25992590    }
     
    26192610
    26202611    # - Add default header template
    2621     push(@implFixedHeader, GenerateImplementationContentHeader($dataNode));
     2612    push(@implContentHeader, GenerateImplementationContentHeader($dataNode));
    26222613
    26232614    AddToImplIncludes("BindingState.h");
     
    31973188    my $conditionalString = $codeGenerator->GenerateConditionalString($dataNode);
    31983189    push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString;
    3199    
    3200     # We've already added the header for this file in implFixedHeader, so remove
     3190
     3191    # We've already added the header for this file in implContentHeader, so remove
    32013192    # it from implIncludes to ensure we don't #include it twice.
    32023193    delete $implIncludes{"${v8InterfaceName}.h"};
     
    33163307
    33173308    # - Add default header template
    3318     push(@implFixedHeader, GenerateImplementationContentHeader($dataNode));
     3309    push(@implContentHeader, GenerateImplementationContentHeader($dataNode));
    33193310
    33203311    AddToImplIncludes("ScriptExecutionContext.h");
     
    35193510
    35203511    my $index = 0;
    3521     my $hasScriptState = 0;
    35223512
    35233513    my @arguments;
     
    38823872                    AddToImplIncludes("$sequenceType.h");
    38833873                } else {
    3884                     my $header = GetV8HeaderName($type);
    3885                     AddToImplIncludes($header);
     3874                    AddToImplIncludes(GetV8HeaderName($type));
    38863875                }
    38873876                $result .= "V8${type}::GetRawTemplate()";
     
    41234112
    41244113    # Update a .cpp file if the contents are changed.
    4125     my $contents = join "", @implContentHeader, @implFixedHeader;
     4114    my $contents = join "", @implContentHeader;
    41264115
    41274116    my @includes = ();
     
    41614150
    41624151    %implIncludes = ();
    4163     @implFixedHeader = ();
     4152    @implContentHeader = ();
    41644153    @implContentDecls = ();
    41654154    @implContent = ();
     
    42134202
    42144203    # Or it fallbacks to the attribute name if the parameter value is missing.
    4215     my $attributeName = $signature->name;
    4216     return "ContextFeatures::" . $codeGenerator->WK_lcfirst($attributeName) . "Enabled";
     4204    return "ContextFeatures::" . $codeGenerator->WK_lcfirst($signature->name) . "Enabled";
    42174205}
    42184206
Note: See TracChangeset for help on using the changeset viewer.