8130888: Typos in nashorn sources

Thu, 10 Sep 2015 09:59:23 +0530

author
sundar
date
Thu, 10 Sep 2015 09:59:23 +0530
changeset 1526
d731e6ba5037
parent 1525
e93960ae0b1e
child 1527
340b1462f3e2

8130888: Typos in nashorn sources
Reviewed-by: hannesw, mhaupt

buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java file | annotate | diff | comparison | revisions
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java file | annotate | diff | comparison | revisions
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java file | annotate | diff | comparison | revisions
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java file | annotate | diff | comparison | revisions
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfoCollector.java file | annotate | diff | comparison | revisions
buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/api/scripting/AbstractJSObject.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/api/scripting/JSObject.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/objects/NativeDataView.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/objects/NativeFunction.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/runtime/GlobalFunctions.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/runtime/ScriptObject.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/runtime/linker/Bootstrap.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java file | annotate | diff | comparison | revisions
src/jdk/nashorn/internal/runtime/options/OptionTemplate.java file | annotate | diff | comparison | revisions
     1.1 --- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java	Thu Sep 03 21:47:48 2015 +0530
     1.2 +++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ConstructorGenerator.java	Thu Sep 10 09:59:23 2015 +0530
     1.3 @@ -55,7 +55,7 @@
     1.4  import jdk.internal.org.objectweb.asm.Handle;
     1.5  
     1.6  /**
     1.7 - * This class generates constructor class for a @ClassInfo annotated class.
     1.8 + * This class generates constructor class for a @ScriptClass annotated class.
     1.9   *
    1.10   */
    1.11  public class ConstructorGenerator extends ClassGenerator {
    1.12 @@ -75,7 +75,7 @@
    1.13      }
    1.14  
    1.15      byte[] getClassBytes() {
    1.16 -        // new class extensing from ScriptObject
    1.17 +        // new class extending from ScriptObject
    1.18          final String superClass = (constructor != null)? SCRIPTFUNCTIONIMPL_TYPE : SCRIPTOBJECT_TYPE;
    1.19          cw.visit(V1_7, ACC_FINAL, className, null, superClass, null);
    1.20          if (memberCount > 0) {
     2.1 --- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java	Thu Sep 03 21:47:48 2015 +0530
     2.2 +++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/MemberInfo.java	Thu Sep 10 09:59:23 2015 +0530
     2.3 @@ -161,7 +161,7 @@
     2.4      }
     2.5  
     2.6      /**
     2.7 -     * Tag something as optimitic builtin or not
     2.8 +     * Tag something as optimistic builtin or not
     2.9       * @param isOptimistic boolean, true if builtin constructor
    2.10       */
    2.11      public void setIsOptimistic(final boolean isOptimistic) {
    2.12 @@ -178,7 +178,7 @@
    2.13      }
    2.14  
    2.15      /**
    2.16 -     * Set thre SpecializedFunction link logic class for specializations, i.e. optimistic
    2.17 +     * Set the SpecializedFunction link logic class for specializations, i.e. optimistic
    2.18       * builtins
    2.19       * @param linkLogicClass link logic class
    2.20       */
     3.1 --- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java	Thu Sep 03 21:47:48 2015 +0530
     3.2 +++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/PrototypeGenerator.java	Thu Sep 10 09:59:23 2015 +0530
     3.3 @@ -42,7 +42,7 @@
     3.4  import java.io.IOException;
     3.5  
     3.6  /**
     3.7 - * This class generates prototype class for a @ClassInfo annotated class.
     3.8 + * This class generates prototype class for a @ScriptClass annotated class.
     3.9   *
    3.10   */
    3.11  public class PrototypeGenerator extends ClassGenerator {
    3.12 @@ -57,7 +57,7 @@
    3.13      }
    3.14  
    3.15      byte[] getClassBytes() {
    3.16 -        // new class extensing from ScriptObject
    3.17 +        // new class extending from ScriptObject
    3.18          cw.visit(V1_7, ACC_FINAL | ACC_SUPER, className, null, PROTOTYPEOBJECT_TYPE, null);
    3.19          if (memberCount > 0) {
    3.20              // add fields
    3.21 @@ -155,7 +155,7 @@
    3.22       */
    3.23      public static void main(final String[] args) throws IOException {
    3.24          if (args.length != 1) {
    3.25 -            System.err.println("Usage: " + ConstructorGenerator.class.getName() + " <class>");
    3.26 +            System.err.println("Usage: " + PrototypeGenerator.class.getName() + " <class>");
    3.27              System.exit(1);
    3.28          }
    3.29  
     4.1 --- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java	Thu Sep 03 21:47:48 2015 +0530
     4.2 +++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfo.java	Thu Sep 10 09:59:23 2015 +0530
     4.3 @@ -48,7 +48,7 @@
     4.4   *
     4.5   */
     4.6  public final class ScriptClassInfo {
     4.7 -    // descriptots for various annotations
     4.8 +    // descriptors for various annotations
     4.9      static final String SCRIPT_CLASS_ANNO_DESC  = Type.getDescriptor(ScriptClass.class);
    4.10      static final String CONSTRUCTOR_ANNO_DESC   = Type.getDescriptor(Constructor.class);
    4.11      static final String FUNCTION_ANNO_DESC      = Type.getDescriptor(Function.class);
    4.12 @@ -140,7 +140,7 @@
    4.13      }
    4.14  
    4.15      boolean isPrototypeNeeded() {
    4.16 -        // Prototype class generation is needed if we have atleast one
    4.17 +        // Prototype class generation is needed if we have at least one
    4.18          // prototype property or @Constructor defined in the class.
    4.19          for (final MemberInfo memInfo : members) {
    4.20              if (memInfo.getWhere() == Where.PROTOTYPE || memInfo.isConstructor()) {
     5.1 --- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfoCollector.java	Thu Sep 03 21:47:48 2015 +0530
     5.2 +++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInfoCollector.java	Thu Sep 10 09:59:23 2015 +0530
     5.3 @@ -118,7 +118,7 @@
     5.4                      addScriptMember(memInfo);
     5.5  
     5.6                      return new AnnotationVisitor(Opcodes.ASM4, delegateAV) {
     5.7 -                        // These could be "null" if values are not suppiled,
     5.8 +                        // These could be "null" if values are not supplied,
     5.9                          // in which case we have to use the default values.
    5.10                          private String  name;
    5.11                          private Integer attributes;
    5.12 @@ -194,7 +194,7 @@
    5.13  
    5.14                      final MemberInfo memInfo = new MemberInfo();
    5.15  
    5.16 -                    //annokind == e.g. GETTER or SPECIALIZED_FUNCTION
    5.17 +                    // annoKind == GETTER or SPECIALIZED_FUNCTION
    5.18                      memInfo.setKind(annoKind);
    5.19                      memInfo.setJavaName(methodName);
    5.20                      memInfo.setJavaDesc(methodDesc);
    5.21 @@ -203,7 +203,7 @@
    5.22                      addScriptMember(memInfo);
    5.23  
    5.24                      return new AnnotationVisitor(Opcodes.ASM4, delegateAV) {
    5.25 -                        // These could be "null" if values are not suppiled,
    5.26 +                        // These could be "null" if values are not supplied,
    5.27                          // in which case we have to use the default values.
    5.28                          private String  name;
    5.29                          private Integer attributes;
     6.1 --- a/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java	Thu Sep 03 21:47:48 2015 +0530
     6.2 +++ b/buildtools/nasgen/src/jdk/nashorn/internal/tools/nasgen/ScriptClassInstrumentor.java	Thu Sep 10 09:59:23 2015 +0530
     6.3 @@ -65,7 +65,6 @@
     6.4   * 2) add "Map" type static field named "$map".
     6.5   * 3) add static initializer block to initialize map.
     6.6   */
     6.7 -
     6.8  public class ScriptClassInstrumentor extends ClassVisitor {
     6.9      private final ScriptClassInfo scriptClassInfo;
    6.10      private final int memberCount;
    6.11 @@ -267,7 +266,7 @@
    6.12       */
    6.13      public static void main(final String[] args) throws IOException {
    6.14          if (args.length != 1) {
    6.15 -            System.err.println("Usage: " + ScriptClassInfoCollector.class.getName() + " <class>");
    6.16 +            System.err.println("Usage: " + ScriptClassInstrumentor.class.getName() + " <class>");
    6.17              System.exit(1);
    6.18          }
    6.19  
     7.1 --- a/src/jdk/nashorn/api/scripting/AbstractJSObject.java	Thu Sep 03 21:47:48 2015 +0530
     7.2 +++ b/src/jdk/nashorn/api/scripting/AbstractJSObject.java	Thu Sep 10 09:59:23 2015 +0530
     7.3 @@ -182,7 +182,7 @@
     7.4      /**
     7.5       * Checking whether the given object is an instance of 'this' object.
     7.6       *
     7.7 -     * @param instance instace to check
     7.8 +     * @param instance instance to check
     7.9       * @return true if the given 'instance' is an instance of this 'function' object
    7.10       */
    7.11      @Override
     8.1 --- a/src/jdk/nashorn/api/scripting/JSObject.java	Thu Sep 03 21:47:48 2015 +0530
     8.2 +++ b/src/jdk/nashorn/api/scripting/JSObject.java	Thu Sep 10 09:59:23 2015 +0530
     8.3 @@ -141,7 +141,7 @@
     8.4      /**
     8.5       * Checking whether the given object is an instance of 'this' object.
     8.6       *
     8.7 -     * @param instance instace to check
     8.8 +     * @param instance instance to check
     8.9       * @return true if the given 'instance' is an instance of this 'function' object
    8.10       */
    8.11      public boolean isInstance(final Object instance);
     9.1 --- a/src/jdk/nashorn/internal/objects/NativeDataView.java	Thu Sep 03 21:47:48 2015 +0530
     9.2 +++ b/src/jdk/nashorn/internal/objects/NativeDataView.java	Thu Sep 10 09:59:23 2015 +0530
     9.3 @@ -22,6 +22,7 @@
     9.4   * or visit www.oracle.com if you need additional information or have any
     9.5   * questions.
     9.6   */
     9.7 +
     9.8  package jdk.nashorn.internal.objects;
     9.9  
    9.10  import static jdk.nashorn.internal.runtime.ECMAErrors.rangeError;
    10.1 --- a/src/jdk/nashorn/internal/objects/NativeFunction.java	Thu Sep 03 21:47:48 2015 +0530
    10.2 +++ b/src/jdk/nashorn/internal/objects/NativeFunction.java	Thu Sep 10 09:59:23 2015 +0530
    10.3 @@ -108,7 +108,7 @@
    10.4          throw new AssertionError("Should not reach here");
    10.5      }
    10.6  
    10.7 -     /**
    10.8 +    /**
    10.9       * Given an array-like object, converts it into a Java object array suitable for invocation of ScriptRuntime.apply
   10.10       * or for direct invocation of the applied function.
   10.11       * @param array the array-like object. Can be null in which case a zero-length array is created.
    11.1 --- a/src/jdk/nashorn/internal/runtime/GlobalFunctions.java	Thu Sep 03 21:47:48 2015 +0530
    11.2 +++ b/src/jdk/nashorn/internal/runtime/GlobalFunctions.java	Thu Sep 10 09:59:23 2015 +0530
    11.3 @@ -187,14 +187,14 @@
    11.4  
    11.5          double result = 0.0;
    11.6          int digit;
    11.7 -        // we should see atleast one valid digit
    11.8 +        // we should see at least one valid digit
    11.9          boolean entered = false;
   11.10          while (idx < length) {
   11.11              digit = fastDigit(str.charAt(idx++), radix);
   11.12              if (digit < 0) {
   11.13                  break;
   11.14              }
   11.15 -            // we have seen atleast one valid digit in the specified radix
   11.16 +            // we have seen at least one valid digit in the specified radix
   11.17              entered = true;
   11.18              result *= radix;
   11.19              result += digit;
    12.1 --- a/src/jdk/nashorn/internal/runtime/ScriptObject.java	Thu Sep 03 21:47:48 2015 +0530
    12.2 +++ b/src/jdk/nashorn/internal/runtime/ScriptObject.java	Thu Sep 10 09:59:23 2015 +0530
    12.3 @@ -224,7 +224,7 @@
    12.4       * same combination of prototype and property map.
    12.5       *
    12.6       * @param proto the prototype object
    12.7 -     * @param map intial {@link PropertyMap}
    12.8 +     * @param map initial {@link PropertyMap}
    12.9       */
   12.10      protected ScriptObject(final ScriptObject proto, final PropertyMap map) {
   12.11          this(map);
   12.12 @@ -1257,7 +1257,7 @@
   12.13          if (oldProto != newProto) {
   12.14              proto = newProto;
   12.15  
   12.16 -            // Let current listeners know that the protototype has changed and set our map
   12.17 +            // Let current listeners know that the prototype has changed and set our map
   12.18              final PropertyListeners listeners = getMap().getListeners();
   12.19              if (listeners != null) {
   12.20                  listeners.protoChanged();
   12.21 @@ -1452,7 +1452,7 @@
   12.22       * in {@link ScriptFunction} for hasInstance implementation, walks
   12.23       * the proto chain
   12.24       *
   12.25 -     * @param instance instace to check
   12.26 +     * @param instance instance to check
   12.27       * @return true if 'instance' is an instance of this object
   12.28       */
   12.29      public boolean isInstance(final ScriptObject instance) {
   12.30 @@ -1869,7 +1869,7 @@
   12.31       * @param desc    the call site descriptor.
   12.32       * @param request the link request
   12.33       *
   12.34 -     * @return GuardedInvocation to be invoed at call site.
   12.35 +     * @return GuardedInvocation to be invoked at call site.
   12.36       */
   12.37      protected GuardedInvocation findCallMethod(final CallSiteDescriptor desc, final LinkRequest request) {
   12.38          return notAFunction(desc);
    13.1 --- a/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java	Thu Sep 03 21:47:48 2015 +0530
    13.2 +++ b/src/jdk/nashorn/internal/runtime/linker/Bootstrap.java	Thu Sep 10 09:59:23 2015 +0530
    13.3 @@ -70,7 +70,7 @@
    13.4      private static final MethodHandle VOID_TO_OBJECT = MH.constant(Object.class, ScriptRuntime.UNDEFINED);
    13.5  
    13.6      /**
    13.7 -     * The default dynalink relink threshold for megamorphisism is 8. In the case
    13.8 +     * The default dynalink relink threshold for megamorphism is 8. In the case
    13.9       * of object fields only, it is fine. However, with dual fields, in order to get
   13.10       * performance on benchmarks with a lot of object instantiation and then field
   13.11       * reassignment, it can take slightly more relinks to become stable with type
   13.12 @@ -214,7 +214,7 @@
   13.13       * @param type           method type
   13.14       * @param programPoint   program point to bind to callsite
   13.15       *
   13.16 -     * @return callsite for a math instrinic node
   13.17 +     * @return callsite for a math intrinsic node
   13.18       */
   13.19      public static CallSite mathBootstrap(final MethodHandles.Lookup lookup, final String name, final MethodType type, final int programPoint) {
   13.20          final MethodHandle mh;
    14.1 --- a/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java	Thu Sep 03 21:47:48 2015 +0530
    14.2 +++ b/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java	Thu Sep 10 09:59:23 2015 +0530
    14.3 @@ -571,7 +571,7 @@
    14.4              mv.visitVarInsn(ALOAD, 0);
    14.5              if (fromFunction && !mi.getName().equals(samName)) {
    14.6                  // Constructors initializing from a ScriptFunction only initialize methods with the SAM name.
    14.7 -                // NOTE: if there's a concrete overloaded method sharing the SAM name, it'll be overriden too. This
    14.8 +                // NOTE: if there's a concrete overloaded method sharing the SAM name, it'll be overridden too. This
    14.9                  // is a deliberate design choice. All other method handles are initialized to null.
   14.10                  mv.visitInsn(ACONST_NULL);
   14.11              } else {
    15.1 --- a/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java	Thu Sep 03 21:47:48 2015 +0530
    15.2 +++ b/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java	Thu Sep 10 09:59:23 2015 +0530
    15.3 @@ -500,7 +500,7 @@
    15.4           * @param desc callsite descriptor string
    15.5           * @param args arguments to function
    15.6           *
    15.7 -         * @throws Throwable if invocation failes or throws exception/error
    15.8 +         * @throws Throwable if invocation fails or throws exception/error
    15.9           */
   15.10          @SuppressWarnings("unused")
   15.11          public void traceMiss(final String desc, final Object... args) throws Throwable {
    16.1 --- a/src/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java	Thu Sep 03 21:47:48 2015 +0530
    16.2 +++ b/src/jdk/nashorn/internal/runtime/linker/NashornBeansLinker.java	Thu Sep 10 09:59:23 2015 +0530
    16.3 @@ -171,7 +171,7 @@
    16.4          }
    16.5  
    16.6          for (final Class<?> iface : clazz.getInterfaces()) {
    16.7 -            // check accessiblity up-front
    16.8 +            // check accessibility up-front
    16.9              if (! Context.isAccessibleClass(iface)) {
   16.10                  continue;
   16.11              }
    17.1 --- a/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java	Thu Sep 03 21:47:48 2015 +0530
    17.2 +++ b/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java	Thu Sep 10 09:59:23 2015 +0530
    17.3 @@ -323,7 +323,7 @@
    17.4       * {@code NashornCallSiteDescriptor}. This allows for graceful interoperability when linking Nashorn with code
    17.5       * generated outside of Nashorn.
    17.6       * @param flag the tested flag
    17.7 -     * @return true if the flag is set, false otherwise (it will be false if the decriptor is not a Nashorn call site
    17.8 +     * @return true if the flag is set, false otherwise (it will be false if the descriptor is not a Nashorn call site
    17.9       * descriptor).
   17.10       */
   17.11      private static boolean isFlag(final CallSiteDescriptor desc, final int flag) {
    18.1 --- a/src/jdk/nashorn/internal/runtime/options/OptionTemplate.java	Thu Sep 03 21:47:48 2015 +0530
    18.2 +++ b/src/jdk/nashorn/internal/runtime/options/OptionTemplate.java	Thu Sep 10 09:59:23 2015 +0530
    18.3 @@ -163,7 +163,7 @@
    18.4  
    18.5      /**
    18.6       * Does this option automatically enable another option, i.e. a dependency.
    18.7 -     * @return the dependecy or null if non exists
    18.8 +     * @return the dependency or null if none exists
    18.9       */
   18.10      public String getDependency() {
   18.11          return this.dependency;

mercurial