Title: [274428] trunk/Source/_javascript_Core
- Revision
- 274428
- Author
- [email protected]
- Date
- 2021-03-15 10:38:42 -0700 (Mon, 15 Mar 2021)
Log Message
postprocess-asm/resolve-asm-file-conflicts.rb build failure after upgrading to F34
https://bugs.webkit.org/show_bug.cgi?id=223136
Reviewed by Michael Catanzaro.
When parsing .file assembler directives (for the purpose of
deduplicating the file slots), also accept
.file "path/to/CWD" "path/to/include"
that seems to be emitted by GCC in some configurations. This also
uses Pathname.cleanpath on the resulting path to canonicalize the
paths. We could use .realpath, but since we only run this on the
paths in a single compilation unit and the first component is
supposed to be the CWD, this both seems unnecessary and would
complicate our selftests.
* Scripts/resolve-asm-file-conflicts.rb:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (274427 => 274428)
--- trunk/Source/_javascript_Core/ChangeLog 2021-03-15 17:34:27 UTC (rev 274427)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-03-15 17:38:42 UTC (rev 274428)
@@ -1,3 +1,24 @@
+2021-03-15 Angelos Oikonomopoulos <[email protected]>
+
+ postprocess-asm/resolve-asm-file-conflicts.rb build failure after upgrading to F34
+ https://bugs.webkit.org/show_bug.cgi?id=223136
+
+ Reviewed by Michael Catanzaro.
+
+ When parsing .file assembler directives (for the purpose of
+ deduplicating the file slots), also accept
+
+ .file "path/to/CWD" "path/to/include"
+
+ that seems to be emitted by GCC in some configurations. This also
+ uses Pathname.cleanpath on the resulting path to canonicalize the
+ paths. We could use .realpath, but since we only run this on the
+ paths in a single compilation unit and the first component is
+ supposed to be the CWD, this both seems unnecessary and would
+ complicate our selftests.
+
+ * Scripts/resolve-asm-file-conflicts.rb:
+
2021-03-14 Alexey Shvayka <[email protected]>
REGRESSION (r274308): Two assertions in JSGlobalObject::defineOwnProperty() are failing
Modified: trunk/Source/_javascript_Core/Scripts/resolve-asm-file-conflicts.rb (274427 => 274428)
--- trunk/Source/_javascript_Core/Scripts/resolve-asm-file-conflicts.rb 2021-03-15 17:34:27 UTC (rev 274427)
+++ trunk/Source/_javascript_Core/Scripts/resolve-asm-file-conflicts.rb 2021-03-15 17:38:42 UTC (rev 274428)
@@ -69,16 +69,24 @@
@s.skip(/\s*/)
# We require at least one string literal
- ret = parse_string_literal
- if ret.respond_to?(:error)
- return ret
+ ret1 = parse_string_literal
+ if ret1.respond_to?(:error)
+ return ret1
end
@s.skip(/\s*/)
+ if @s.eos?
+ return ParseResultSuccess.new(Pathname.new(ret1.str).cleanpath.to_s)
+ end
+ # If anything follows, it needs to be a string literal
+ ret2 = parse_string_literal
+ if ret2.respond_to?(:error)
+ return ret2
+ end
if not @s.eos?
- return ParseResultError.new("Expected end of line after #{ret.str}")
+ return ParseResultError.new("Expected end of line after #{ret2.str}")
end
- return ParseResultSuccess.new(ret.str)
+ return ParseResultSuccess.new((Pathname.new(ret1.str) / ret2.str).cleanpath.to_s)
end
def parse_string_literal
if @s.scan(/"/).nil?
@@ -174,13 +182,26 @@
['"/bar/baz"', ['/bar/baz']],
# Can detect stray token
- ['"foo" bar', "Expected end of line"],
+ ['"foo" bar', "Expected string literal"],
# Can detect stray token without whitespace
- ['"foo"bar', "Expected end of line"],
+ ['"foo"bar', "Expected string literal"],
- # Will not accept clang-style .file directives
- ['"working_directory" "path"', "Expected end of line"]
+ # Can parse two string literals
+ ['"working_directory" "path"', ['working_directory/path']],
+
+ # Will only accept up to 2 string literals
+ ['"first" "second" "third"', "Expected end of line"],
+
+ # Can detect stray token after 2nd string literal
+ ['"foo" "bar" baz', "Expected end of line"],
+
+ # Can detect stray token after 2nd string literal without whitespace
+ ['"foo" "bar"baz', "Expected end of line"],
+
+ # Can detect unterminated 3rd string literal
+ ['"foo" "bar" "baz', "Expected end of line"]
+
]
outf = StringIO.new("")
tests.each { |str, res|
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes