X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..HEAD:/create_hash_table diff --git a/create_hash_table b/create_hash_table index 88e8447..b26eed0 100755 --- a/create_hash_table +++ b/create_hash_table @@ -94,6 +94,11 @@ while () { if ($att =~ m/Function/) { push(@values, { "type" => "Function", "function" => $val, "params" => (length($param) ? $param : "") }); #printf STDERR "WARNING: Number of arguments missing for $key/$val\n" if (length($param) == 0); + } elsif ($att =~ m/Accessor/) { + my $get = $val; + my $put = "nullptr"; + $hasSetter = "true"; + push(@values, { "type" => "Accessor", "get" => $get, "put" => $put }); } elsif (length($att)) { my $get = $val; my $put = "0"; @@ -285,6 +290,11 @@ sub output() { $firstCastStr = "static_cast"; $firstValue = $values[$i]{"function"}; $secondValue = $values[$i]{"params"}; + } elsif ($values[$i]{"type"} eq "Accessor") { + $firstCastStr = "static_cast"; + $secondCastStr = "static_cast"; + $firstValue = $values[$i]{"get"}; + $secondValue = $values[$i]{"put"}; } elsif ($values[$i]{"type"} eq "Property") { $firstCastStr = "static_cast"; $secondCastStr = "static_cast"; @@ -320,7 +330,7 @@ sub output() { $i++; } print "};\n\n"; - print "extern const struct HashTable $name =\n"; + print "JS_EXPORT_PRIVATE extern const struct HashTable $name =\n"; print " \{ $packedSize, $compactHashSizeMask, $hasSetter, $nameEntries, 0, $nameIndex \};\n"; print "} // namespace\n"; }