Files
main/desktop/toolkit/qt5/qt5-webkit/files/bug-206233-20200114175227.patch
2023-04-10 23:21:58 +03:00

25 lines
1.2 KiB
Diff

diff --git a/Source/JavaScriptCore/offlineasm/parser.rb b/Source/JavaScriptCore/offlineasm/parser.rb
index 791c81a9868d969cf5d3232a1f6475543315065a..f14c873e2dbdf93536c1e185fe5bc8825498aee4 100644
--- a/Source/JavaScriptCore/offlineasm/parser.rb
+++ b/Source/JavaScriptCore/offlineasm/parser.rb
@@ -628,9 +628,7 @@ class Parser
firstCodeOrigin = @tokens[@idx].codeOrigin
list = []
loop {
- if (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
- break
- elsif @tokens[@idx].is_a? Annotation
+ if @tokens[@idx].is_a? Annotation
# This is the only place where we can encounter a global
# annotation, and hence need to be able to distinguish between
# them.
@@ -644,6 +642,8 @@ class Parser
list << Instruction.new(codeOrigin, annotationOpcode, [], @tokens[@idx].string)
@annotation = nil
@idx += 2 # Consume the newline as well.
+ elsif (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
+ break
elsif @tokens[@idx] == "\n"
# ignore
@idx += 1