From 0ce7fc15623d56456fdc8da8337360cdecc77206 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 8 Sep 2009 11:14:35 +0100 Subject: Update V8 to bleeding_edge r2842. --- V8Binding/v8/tools/gyp/v8.gyp | 16 +- V8Binding/v8/tools/js2c.py | 45 ++++- V8Binding/v8/tools/tickprocessor.js | 2 +- V8Binding/v8/tools/visual_studio/arm.vsprops | 4 +- V8Binding/v8/tools/visual_studio/common.vsprops | 2 - V8Binding/v8/tools/visual_studio/d8_arm.vcproj | 199 ++++++++++++++++++ V8Binding/v8/tools/visual_studio/ia32.vsprops | 2 + V8Binding/v8/tools/visual_studio/v8_arm.sln | 8 +- V8Binding/v8/tools/visual_studio/v8_arm.vcproj | 223 +++++++++++++++++++++ .../v8/tools/visual_studio/v8_cctest_arm.vcproj | 2 + .../visual_studio/v8_process_sample_arm.vcproj | 151 ++++++++++++++ .../tools/visual_studio/v8_shell_sample_arm.vcproj | 151 ++++++++++++++ V8Binding/v8/tools/visual_studio/x64.vsprops | 2 + 13 files changed, 776 insertions(+), 31 deletions(-) create mode 100644 V8Binding/v8/tools/visual_studio/d8_arm.vcproj create mode 100644 V8Binding/v8/tools/visual_studio/v8_arm.vcproj create mode 100644 V8Binding/v8/tools/visual_studio/v8_process_sample_arm.vcproj create mode 100644 V8Binding/v8/tools/visual_studio/v8_shell_sample_arm.vcproj (limited to 'V8Binding/v8/tools') diff --git a/V8Binding/v8/tools/gyp/v8.gyp b/V8Binding/v8/tools/gyp/v8.gyp index 037efa7..1222ea9 100644 --- a/V8Binding/v8/tools/gyp/v8.gyp +++ b/V8Binding/v8/tools/gyp/v8.gyp @@ -433,18 +433,14 @@ '../../src/ia32/jump-target-ia32.cc', '../../src/ia32/macro-assembler-ia32.cc', '../../src/ia32/macro-assembler-ia32.h', + '../../src/ia32/regexp-macro-assembler-ia32.cc', + '../../src/ia32/regexp-macro-assembler-ia32.h', '../../src/ia32/register-allocator-ia32.cc', '../../src/ia32/stub-cache-ia32.cc', '../../src/ia32/virtual-frame-ia32.cc', '../../src/ia32/virtual-frame-ia32.h', ], }], - ['target_arch=="ia32" and v8_regexp=="native"', { - 'sources': [ - '../../src/ia32/regexp-macro-assembler-ia32.cc', - '../../src/ia32/regexp-macro-assembler-ia32.h', - ], - }], ['target_arch=="x64"', { 'include_dirs+': [ '../../src/x64', @@ -466,18 +462,14 @@ '../../src/x64/jump-target-x64.cc', '../../src/x64/macro-assembler-x64.cc', '../../src/x64/macro-assembler-x64.h', + '../../src/x64/regexp-macro-assembler-x64.cc', + '../../src/x64/regexp-macro-assembler-x64.h', '../../src/x64/register-allocator-x64.cc', '../../src/x64/stub-cache-x64.cc', '../../src/x64/virtual-frame-x64.cc', '../../src/x64/virtual-frame-x64.h', ], }], - ['target_arch=="x64" and v8_regexp=="native"', { - 'sources': [ - '../../src/x64/regexp-macro-assembler-x64.cc', - '../../src/x64/regexp-macro-assembler-x64.h', - ], - }], ['OS=="linux"', { 'link_settings': { 'libraries': [ diff --git a/V8Binding/v8/tools/js2c.py b/V8Binding/v8/tools/js2c.py index 52fe35c..cae39e8 100755 --- a/V8Binding/v8/tools/js2c.py +++ b/V8Binding/v8/tools/js2c.py @@ -45,6 +45,13 @@ def ToCArray(lines): return ", ".join(result) +def RemoveCommentsAndTrailingWhitespace(lines): + lines = re.sub(r'//.*\n', '\n', lines) # end-of-line comments + lines = re.sub(re.compile(r'/\*.*?\*/', re.DOTALL), '', lines) # comments. + lines = re.sub(r'\s+\n+', '\n', lines) # trailing whitespace + return lines + + def CompressScript(lines, do_jsmin): # If we're not expecting this code to be user visible, we can run it through # a more aggressive minifier. @@ -55,9 +62,7 @@ def CompressScript(lines, do_jsmin): # people print the source code using Function.prototype.toString(). # Note that we could easily compress the scripts mode but don't # since we want it to remain readable. - lines = re.sub('//.*\n', '\n', lines) # end-of-line comments - lines = re.sub(re.compile(r'/\*.*?\*/', re.DOTALL), '', lines) # comments. - lines = re.sub('\s+\n+', '\n', lines) # trailing whitespace + lines = RemoveCommentsAndTrailingWhitespace(lines) return lines @@ -96,6 +101,22 @@ def ParseValue(string): return string +EVAL_PATTERN = re.compile(r'\beval\s*\('); +WITH_PATTERN = re.compile(r'\bwith\s*\('); + + +def Validate(lines, file): + lines = RemoveCommentsAndTrailingWhitespace(lines) + # Because of simplified context setup, eval and with is not + # allowed in the natives files. + eval_match = EVAL_PATTERN.search(lines) + if eval_match: + raise ("Eval disallowed in natives: %s" % file) + with_match = WITH_PATTERN.search(lines) + if with_match: + raise ("With statements disallowed in natives: %s" % file) + + def ExpandConstants(lines, constants): for key, value in constants.items(): lines = lines.replace(key, str(value)) @@ -155,9 +176,9 @@ class PythonMacro: args.append(mapping[arg]) return str(self.fun(*args)) -CONST_PATTERN = re.compile('^const\s+([a-zA-Z0-9_]+)\s*=\s*([^;]*);$') -MACRO_PATTERN = re.compile('^macro\s+([a-zA-Z0-9_]+)\s*\(([^)]*)\)\s*=\s*([^;]*);$') -PYTHON_MACRO_PATTERN = re.compile('^python\s+macro\s+([a-zA-Z0-9_]+)\s*\(([^)]*)\)\s*=\s*([^;]*);$') +CONST_PATTERN = re.compile(r'^const\s+([a-zA-Z0-9_]+)\s*=\s*([^;]*);$') +MACRO_PATTERN = re.compile(r'^macro\s+([a-zA-Z0-9_]+)\s*\(([^)]*)\)\s*=\s*([^;]*);$') +PYTHON_MACRO_PATTERN = re.compile(r'^python\s+macro\s+([a-zA-Z0-9_]+)\s*\(([^)]*)\)\s*=\s*([^;]*);$') def ReadMacros(lines): constants = { } @@ -275,15 +296,17 @@ def JS2C(source, target, env): # Build source code lines source_lines = [ ] source_lines_empty = [] - for s in modules: - delay = str(s).endswith('-delay.js') - lines = ReadFile(str(s)) + for module in modules: + filename = str(module) + delay = filename.endswith('-delay.js') + lines = ReadFile(filename) do_jsmin = lines.find('// jsminify this file, js2c: jsmin') != -1 lines = ExpandConstants(lines, consts) lines = ExpandMacros(lines, macros) + Validate(lines, filename) lines = CompressScript(lines, do_jsmin) data = ToCArray(lines) - id = (os.path.split(str(s))[1])[:-3] + id = (os.path.split(filename)[1])[:-3] if delay: id = id[:-6] if delay: delay_ids.append((id, len(lines))) @@ -291,7 +314,7 @@ def JS2C(source, target, env): ids.append((id, len(lines))) source_lines.append(SOURCE_DECLARATION % { 'id': id, 'data': data }) source_lines_empty.append(SOURCE_DECLARATION % { 'id': id, 'data': 0 }) - + # Build delay support functions get_index_cases = [ ] get_script_source_cases = [ ] diff --git a/V8Binding/v8/tools/tickprocessor.js b/V8Binding/v8/tools/tickprocessor.js index 72b3059..84f0eea 100644 --- a/V8Binding/v8/tools/tickprocessor.js +++ b/V8Binding/v8/tools/tickprocessor.js @@ -476,7 +476,7 @@ UnixCppEntriesProvider.prototype.parseNextLine = function() { function MacCppEntriesProvider(nmExec) { UnixCppEntriesProvider.call(this, nmExec); // Note an empty group. It is required, as UnixCppEntriesProvider expects 3 groups. - this.FUNC_RE = /^([0-9a-fA-F]{8}) ()[iItT] (.*)$/; + this.FUNC_RE = /^([0-9a-fA-F]{8,16}) ()[iItT] (.*)$/; }; inherits(MacCppEntriesProvider, UnixCppEntriesProvider); diff --git a/V8Binding/v8/tools/visual_studio/arm.vsprops b/V8Binding/v8/tools/visual_studio/arm.vsprops index 3aa9374..0d6a888 100644 --- a/V8Binding/v8/tools/visual_studio/arm.vsprops +++ b/V8Binding/v8/tools/visual_studio/arm.vsprops @@ -2,11 +2,13 @@ diff --git a/V8Binding/v8/tools/visual_studio/common.vsprops b/V8Binding/v8/tools/visual_studio/common.vsprops index d23e4fc..238dd97 100644 --- a/V8Binding/v8/tools/visual_studio/common.vsprops +++ b/V8Binding/v8/tools/visual_studio/common.vsprops @@ -3,8 +3,6 @@ ProjectType="Visual C++" Version="8.00" Name="essential" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(SolutionDir)$(ConfigurationName)\obj\$(ProjectName)" CharacterSet="1" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/V8Binding/v8/tools/visual_studio/ia32.vsprops b/V8Binding/v8/tools/visual_studio/ia32.vsprops index f48e808..0399bbb 100644 --- a/V8Binding/v8/tools/visual_studio/ia32.vsprops +++ b/V8Binding/v8/tools/visual_studio/ia32.vsprops @@ -2,6 +2,8 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/V8Binding/v8/tools/visual_studio/v8_cctest_arm.vcproj b/V8Binding/v8/tools/visual_studio/v8_cctest_arm.vcproj index a027a84..bd49f3b 100644 --- a/V8Binding/v8/tools/visual_studio/v8_cctest_arm.vcproj +++ b/V8Binding/v8/tools/visual_studio/v8_cctest_arm.vcproj @@ -49,6 +49,7 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/V8Binding/v8/tools/visual_studio/v8_shell_sample_arm.vcproj b/V8Binding/v8/tools/visual_studio/v8_shell_sample_arm.vcproj new file mode 100644 index 0000000..ba7e0e0 --- /dev/null +++ b/V8Binding/v8/tools/visual_studio/v8_shell_sample_arm.vcproj @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/V8Binding/v8/tools/visual_studio/x64.vsprops b/V8Binding/v8/tools/visual_studio/x64.vsprops index af0e47c..7587acf 100644 --- a/V8Binding/v8/tools/visual_studio/x64.vsprops +++ b/V8Binding/v8/tools/visual_studio/x64.vsprops @@ -2,6 +2,8 @@