diff options
Diffstat (limited to 'Source/JavaScriptCore/offlineasm/offsets.rb')
-rw-r--r-- | Source/JavaScriptCore/offlineasm/offsets.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/offlineasm/offsets.rb b/Source/JavaScriptCore/offlineasm/offsets.rb index d9266d9a3..cb09918cd 100644 --- a/Source/JavaScriptCore/offlineasm/offsets.rb +++ b/Source/JavaScriptCore/offlineasm/offsets.rb @@ -60,7 +60,7 @@ end # # offsetsAndConfigurationIndex(ast, file) -> -# {[offsets, index], ...} +# [[offsets, index], ...] # # Parses the offsets from a file and returns a list of offsets and the # index of the configuration that is valid in this build target. @@ -154,16 +154,19 @@ def offsetsAndConfigurationIndex(file) | data | offsets << readInt(endianness, data) } - if not result.has_key?(offsets) - result[offsets] = index - end + result[index] = offsets } end } raise MissingMagicValuesException unless result.length >= 1 - result + # result is {index1=>offsets1, index2=>offsets2} but we want to return + # [[offsets1, index1], [offsets2, index2]]. + return result.map { + | pair | + pair.reverse + } end # |