Commit 4855a45a authored by kinuko@chromium.org's avatar kinuko@chromium.org
Browse files

2010-04-27 Kinuko Yasuda <kinuko@chromium.org>

        Reviewed by Jian Li.

        [V8] Handle OR ('|') conditional in action_derivedsourcesallinone.py
        https://bugs.webkit.org/show_bug.cgi?id=38207

        No new tests.

        * WebCore.gyp/scripts/action_derivedsourcesallinone.py:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58352 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8792048e
2010-04-27 Kinuko Yasuda <kinuko@chromium.org>
Reviewed by Jian Li.
[V8] Handle OR ('|') conditional in action_derivedsourcesallinone.py
https://bugs.webkit.org/show_bug.cgi?id=38207
No new tests.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
2010-04-27 François Sausset <sausset@gmail.com>
 
Reviewed by Kenneth Rohde Christiansen.
......@@ -49,7 +49,7 @@ import subprocess
import sys
# A regexp for finding Conditional attributes in interface definitions.
conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z&]*)')
conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z&|]*)')
copyrightTemplate = """/*
* THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
......@@ -82,11 +82,13 @@ copyrightTemplate = """/*
"""
# Wraps conditional with ENABLE() and && if more than one conditional is specified.
# Wraps conditional with ENABLE() and replace '&','|' with '&&','||' if more than one conditional is specified.
def formatConditional(conditional):
def wrapWithEnable(s):
if re.match('[|&]$', s):
return s * 2
return 'ENABLE(' + s + ')'
return ' && '.join(map(wrapWithEnable, conditional))
return ' '.join(map(wrapWithEnable, conditional))
# Find the conditional interface attribute.
......@@ -101,7 +103,7 @@ def extractConditional(idlFilePath):
match = conditionalPattern.search(idlContents)
if match:
conditional = match.group(1)
conditional = conditional.split('&')
conditional = re.split('([|&])', conditional)
return conditional
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment