Title: [207576] trunk/Source/_javascript_Core
- Revision
- 207576
- Author
- jfbast...@apple.com
- Date
- 2016-10-19 16:34:45 -0700 (Wed, 19 Oct 2016)
Log Message
create_hash_table: allow empty tables
The Windows build was broken by because I added empty tables and Windows insists that empty tables are horrible. Put in dummy entries in that case.
create_hash_table: allow empty tables
https://bugs.webkit.org/show_bug.cgi?id=163701
Reviewed by Keith Miller.
* create_hash_table:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (207575 => 207576)
--- trunk/Source/_javascript_Core/ChangeLog 2016-10-19 23:31:14 UTC (rev 207575)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-10-19 23:34:45 UTC (rev 207576)
@@ -1,5 +1,18 @@
2016-10-19 JF Bastien <jfbast...@apple.com>
+ create_hash_table: allow empty tables
+
+ The Windows build was broken by because I added empty tables and Windows insists that empty tables are horrible. Put in dummy entries in that case.
+
+ create_hash_table: allow empty tables
+ https://bugs.webkit.org/show_bug.cgi?id=163701
+
+ Reviewed by Keith Miller.
+
+ * create_hash_table:
+
+2016-10-19 JF Bastien <jfbast...@apple.com>
+
_javascript_ WebAssembly API: baby steps
- Expand WebAssembly constructors into their own files. This requires a lot of
Modified: trunk/Source/_javascript_Core/create_hash_table (207575 => 207576)
--- trunk/Source/_javascript_Core/create_hash_table 2016-10-19 23:31:14 UTC (rev 207575)
+++ trunk/Source/_javascript_Core/create_hash_table 2016-10-19 23:34:45 UTC (rev 207576)
@@ -270,19 +270,31 @@
print "\n";
print "namespace JSC {\n";
print "\n";
- print "static const struct CompactHashIndex ${nameIndex}\[$compactSize\] = {\n";
- for (my $i = 0; $i < $compactSize; $i++) {
- my $T = -1;
- if (defined($table[$i])) { $T = $table[$i]; }
- my $L = -1;
- if (defined($links[$i])) { $L = $links[$i]; }
- print " { $T, $L },\n";
+ if ($compactSize != 0) {
+ print "static const struct CompactHashIndex ${nameIndex}\[$compactSize\] = {\n";
+ for (my $i = 0; $i < $compactSize; $i++) {
+ my $T = -1;
+ if (defined($table[$i])) { $T = $table[$i]; }
+ my $L = -1;
+ if (defined($links[$i])) { $L = $links[$i]; }
+ print " { $T, $L },\n";
+ }
+ } else {
+ # MSVC dislikes empty arrays.
+ print "static const struct CompactHashIndex ${nameIndex}\[1\] = {\n";
+ print " { 0, 0 }\n";
}
print "};\n";
print "\n";
my $packedSize = scalar @keys;
- print "static const struct HashTableValue ${nameEntries}\[$packedSize\] = {\n";
+ if ($packedSize != 0) {
+ print "static const struct HashTableValue ${nameEntries}\[$packedSize\] = {\n";
+ } else {
+ # MSVC dislikes empty arrays.
+ print "static const struct HashTableValue ${nameEntries}\[1\] = {\n";
+ print " { nullptr, 0, NoIntrinsic, { 0, 0 } }\n";
+ }
my $i = 0;
foreach my $key (@keys) {
my $firstValue = "";
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes