Merge jdk8u262-b01

Fri, 24 Apr 2020 03:58:56 +0100

author
andrew
date
Fri, 24 Apr 2020 03:58:56 +0100
changeset 2559
0a00f1ccd7e9
parent 2558
5d64c42ac763
parent 2554
13db9dac5175
child 2560
60239ecaefa2

Merge

.hgtags file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Mon Dec 16 11:28:28 2019 -0500
     1.2 +++ b/.hgtags	Fri Apr 24 03:58:56 2020 +0100
     1.3 @@ -1070,3 +1070,5 @@
     1.4  b988f627520c45015f0b91d2ee35e69531300770 jdk8u252-b06
     1.5  0666ec7fe2b45353dc0e09c1f6f386bdf763eeb4 jdk8u252-b07
     1.6  95d61d0f326bbfaddc2cbd29e67b12c00041caaa jdk8u252-b08
     1.7 +2f5ad880fd3372eb5c2e5ac5ee82c705a1b6ac07 jdk8u252-b09
     1.8 +2f5ad880fd3372eb5c2e5ac5ee82c705a1b6ac07 jdk8u252-ga
     2.1 --- a/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java	Mon Dec 16 11:28:28 2019 -0500
     2.2 +++ b/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java	Fri Apr 24 03:58:56 2020 +0100
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -141,14 +141,14 @@
    2.11              throw new PatternSyntaxException(e.getMessage(), string, scanner.position);
    2.12          }
    2.13  
    2.14 -        scanner.processForwardReferences();
    2.15 -
    2.16          // Throw syntax error unless we parsed the entire JavaScript regexp without syntax errors
    2.17          if (scanner.position != string.length()) {
    2.18              final String p = scanner.getStringBuilder().toString();
    2.19              throw new PatternSyntaxException(string, p, p.length() + 1);
    2.20          }
    2.21  
    2.22 +        scanner.processForwardReferences();
    2.23 +
    2.24          return scanner;
    2.25      }
    2.26  
     3.1 --- a/src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java	Mon Dec 16 11:28:28 2019 -0500
     3.2 +++ b/src/jdk/nashorn/internal/runtime/regexp/joni/Parser.java	Fri Apr 24 03:58:56 2020 +0100
     3.3 @@ -452,7 +452,7 @@
     3.4      private Node parseExp(final TokenType term) {
     3.5          if (token.type == term)
     3.6           {
     3.7 -            return StringNode.EMPTY; // goto end_of_token
     3.8 +            return StringNode.createEmpty(); // goto end_of_token
     3.9          }
    3.10  
    3.11          Node node = null;
    3.12 @@ -461,7 +461,7 @@
    3.13          switch(token.type) {
    3.14          case ALT:
    3.15          case EOT:
    3.16 -            return StringNode.EMPTY; // end_of_token:, node_new_empty
    3.17 +            return StringNode.createEmpty(); // end_of_token:, node_new_empty
    3.18  
    3.19          case SUBEXP_OPEN:
    3.20              node = parseEnclose(TokenType.SUBEXP_CLOSE);
    3.21 @@ -569,7 +569,7 @@
    3.22                  if (syntax.contextInvalidRepeatOps()) {
    3.23                      throw new SyntaxException(ERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED);
    3.24                  }
    3.25 -                node = StringNode.EMPTY; // node_new_empty
    3.26 +                node = StringNode.createEmpty(); // node_new_empty
    3.27              } else {
    3.28                  return parseExpTkByte(group); // goto tk_byte
    3.29              }
     4.1 --- a/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StringNode.java	Mon Dec 16 11:28:28 2019 -0500
     4.2 +++ b/src/jdk/nashorn/internal/runtime/regexp/joni/ast/StringNode.java	Fri Apr 24 03:58:56 2020 +0100
     4.3 @@ -27,7 +27,6 @@
     4.4  
     4.5      private static final int NODE_STR_MARGIN = 16;
     4.6      private static final int NODE_STR_BUF_SIZE = 24;
     4.7 -    public static final StringNode EMPTY = new StringNode(null, Integer.MAX_VALUE, Integer.MAX_VALUE);
     4.8  
     4.9      public char[] chars;
    4.10      public int p;
    4.11 @@ -36,7 +35,13 @@
    4.12      public int flag;
    4.13  
    4.14      public StringNode() {
    4.15 -        this.chars = new char[NODE_STR_BUF_SIZE];
    4.16 +        this(NODE_STR_BUF_SIZE);
    4.17 +    }
    4.18 +
    4.19 +    private StringNode(int size) {
    4.20 +        this.chars = new char[size];
    4.21 +        this.p = 0;
    4.22 +        this.end = 0;
    4.23      }
    4.24  
    4.25      public StringNode(final char[] chars, final int p, final int end) {
    4.26 @@ -51,6 +56,13 @@
    4.27          chars[end++] = c;
    4.28      }
    4.29  
    4.30 +    /**
    4.31 +     * Create a new empty StringNode.
    4.32 +     */
    4.33 +    public static StringNode createEmpty() {
    4.34 +        return new StringNode(0);
    4.35 +    }
    4.36 +
    4.37      /* Ensure there is ahead bytes available in node's buffer
    4.38       * (assumes that the node is not shared)
    4.39       */

mercurial