~ubuntu-branches/ubuntu/saucy/libv8/saucy

« back to all changes in this revision

Viewing changes to tools/js2c.py

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-04-07 16:26:13 UTC
  • mfrom: (15.1.27 sid)
  • Revision ID: package-import@ubuntu.com-20120407162613-dqo1m6w9r3fh8tst
Tags: 3.8.9.16-3
* mipsel build fixes :
  + v8_use_mips_abi_hardfloat=false, this lowers EABI requirements.
  + v8_can_use_fpu_instructions=false, detect if FPU is present.
  + set -Wno-unused-but-set-variable only on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
      end = pattern_match.end()
129
129
      assert lines[end - 1] == '('
130
130
      last_match = end
131
 
      arg_index = 0
 
131
      arg_index = [0]  # Wrap state into array, to work around Python "scoping"
132
132
      mapping = { }
133
133
      def add_arg(str):
134
134
        # Remember to expand recursively in the arguments
135
135
        replacement = ExpandMacros(str.strip(), macros)
136
 
        mapping[macro.args[arg_index]] = replacement
 
136
        mapping[macro.args[arg_index[0]]] = replacement
 
137
        arg_index[0] += 1
137
138
      while end < len(lines) and height > 0:
138
139
        # We don't count commas at higher nesting levels.
139
140
        if lines[end] == ',' and height == 1: