diff options
Diffstat (limited to 'JavaScriptCore/create_hash_table')
-rwxr-xr-x | JavaScriptCore/create_hash_table | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/JavaScriptCore/create_hash_table b/JavaScriptCore/create_hash_table index 77463fb..6078f97 100755 --- a/JavaScriptCore/create_hash_table +++ b/JavaScriptCore/create_hash_table @@ -247,6 +247,11 @@ sub output() { print "\nnamespace JSC {\n"; } my $count = scalar @keys + 1; + print "#if ENABLE(JIT)\n"; + print "#define THUNK_GENERATOR(generator) , generator\n"; + print "#else\n"; + print "#define THUNK_GENERATOR(generator)\n"; + print "#endif\n"; print "\nstatic const struct HashTableValue ${nameEntries}\[$count\] = {\n"; my $i = 0; foreach my $key (@keys) { @@ -266,11 +271,25 @@ sub output() { $firstValue = $values[$i]{"value"}; $secondValue = "0"; } - print " { \"$key\", $attrs[$i], (intptr_t)" . $castStr . "($firstValue), (intptr_t)$secondValue },\n"; + my $thunkGenerator = "0"; + if ($key eq "charCodeAt") { + $thunkGenerator = "charCodeAtThunkGenerator"; + } + if ($key eq "charAt") { + $thunkGenerator = "charAtThunkGenerator"; + } + if ($key eq "sqrt") { + $thunkGenerator = "sqrtThunkGenerator"; + } + if ($key eq "pow") { + $thunkGenerator = "powThunkGenerator"; + } + print " { \"$key\", $attrs[$i], (intptr_t)" . $castStr . "($firstValue), (intptr_t)$secondValue THUNK_GENERATOR($thunkGenerator) },\n"; $i++; } - print " { 0, 0, 0, 0 }\n"; + print " { 0, 0, 0, 0 THUNK_GENERATOR(0) }\n"; print "};\n\n"; + print "#undef THUNK_GENERATOR\n"; print "extern JSC_CONST_HASHTABLE HashTable $name =\n"; print " \{ $compactSize, $compactHashSizeMask, $nameEntries, 0 \};\n"; print "} // namespace\n"; |