mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8247115: Fix typos in java.lang.invoke and java.lang
Reviewed-by: lancea
This commit is contained in:
parent
3df95aa377
commit
6e43cddad7
11 changed files with 18 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -351,7 +351,7 @@ abstract class ClassSpecializer<T,K,S extends ClassSpecializer<T,K,S>.SpeciesDat
|
|||
* You can override this to return null or throw if there are no transforms.
|
||||
* This method exists so that the transforms can be "grown" lazily.
|
||||
* This is necessary if the transform *adds* a field to an instance,
|
||||
* which sometimtes requires the creation, on the fly, of an extended species.
|
||||
* which sometimes requires the creation, on the fly, of an extended species.
|
||||
* This method is only called once for any particular parameter.
|
||||
* The species caches the result in a private array.
|
||||
*
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.function.BiFunction;
|
|||
/**
|
||||
* An indirect var handle can be thought of as an aggregate of the method handles implementing its supported access modes.
|
||||
* Its varform contains no method name table (given that some of the method handles composing a bound var handle might
|
||||
* not be direct). The set of method handles constituting an inditrect var handle are retrieved lazily, to minimize
|
||||
* not be direct). The set of method handles constituting an indirect var handle are retrieved lazily, to minimize
|
||||
* code spinning (since not all the access modes will be used anyway).
|
||||
* Indirect var handles are useful when constructing var handle adapters - that is, an adapter var handle
|
||||
* can be constructed by extracting the method handles constituting the target var handle, adapting them
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -801,7 +801,7 @@ class LambdaForm {
|
|||
* (a) redundant compilation work and (b) extra I$ pressure.
|
||||
* To control repeated versions, we need to be ready to
|
||||
* erase details from LFs and move them into MH data,
|
||||
* whevener those details are not relevant to significant
|
||||
* whenever those details are not relevant to significant
|
||||
* optimization. "Significant" means optimization of
|
||||
* code that is actually hot.
|
||||
*
|
||||
|
@ -895,7 +895,7 @@ class LambdaForm {
|
|||
private static boolean argumentTypesMatch(String sig, Object[] av) {
|
||||
int arity = signatureArity(sig);
|
||||
assert(av.length == arity) : "av.length == arity: av.length=" + av.length + ", arity=" + arity;
|
||||
assert(av[0] instanceof MethodHandle) : "av[0] not instace of MethodHandle: " + av[0];
|
||||
assert(av[0] instanceof MethodHandle) : "av[0] not instance of MethodHandle: " + av[0];
|
||||
MethodHandle mh = (MethodHandle) av[0];
|
||||
MethodType mt = mh.type();
|
||||
assert(mt.parameterCount() == arity-1);
|
||||
|
|
|
@ -1685,7 +1685,7 @@ assertEquals("[three, thee, tee]", asListFix.invoke((Object)argv).toString());
|
|||
if (member != null) {
|
||||
return MethodHandleImpl.makeWrappedMember(this, member, isInvokeSpecial);
|
||||
} else if (internalMemberName() == null) {
|
||||
// The required internaMemberName is null, and this MH (like most) doesn't have one.
|
||||
// The required internalMemberName is null, and this MH (like most) doesn't have one.
|
||||
return this;
|
||||
} else {
|
||||
// The following case is rare. Mask the internalMemberName by wrapping the MH in a BMH.
|
||||
|
|
|
@ -33,7 +33,7 @@ import static java.lang.invoke.MethodHandleStatics.*;
|
|||
|
||||
/**
|
||||
* A symbolic reference obtained by cracking a direct method handle
|
||||
* into its consitutent symbolic parts.
|
||||
* into its constituent symbolic parts.
|
||||
* To crack a direct method handle, call {@link Lookup#revealDirect Lookup.revealDirect}.
|
||||
* <h2><a id="directmh"></a>Direct Method Handles</h2>
|
||||
* A <em>direct method handle</em> represents a method, constructor, or field without
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -510,7 +510,7 @@ class MethodHandleNatives {
|
|||
/**
|
||||
* Obtain the method to link to the VarHandle operation.
|
||||
* This method is located here and not in Invokers to avoid
|
||||
* intializing that and other classes early on in VM bootup.
|
||||
* initializing that and other classes early on in VM bootup.
|
||||
*/
|
||||
private static MemberName varHandleOperationLinkerMethod(String name,
|
||||
MethodType mtype,
|
||||
|
|
|
@ -105,7 +105,7 @@ import static java.lang.invoke.MethodType.fromDescriptor;
|
|||
* A {@code MethodType} can be described in {@linkplain MethodTypeDesc nominal form}
|
||||
* if and only if all of the parameter types and return type can be described
|
||||
* with a {@link Class#describeConstable() nominal descriptor} represented by
|
||||
* {@link ClassDesc}. If a method type can be described norminally, then:
|
||||
* {@link ClassDesc}. If a method type can be described nominally, then:
|
||||
* <ul>
|
||||
* <li>The method type has a {@link MethodTypeDesc nominal descriptor}
|
||||
* returned by {@link #describeConstable() MethodType::describeConstable}.</li>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -2031,7 +2031,7 @@ public abstract class VarHandle implements Constable {
|
|||
insertParameterTypes(0, VarHandle.class);
|
||||
MemberName mn = vform.getMemberName(mode);
|
||||
DirectMethodHandle dmh = DirectMethodHandle.make(mn);
|
||||
// Such a method handle must not be publically exposed directly
|
||||
// Such a method handle must not be publicly exposed directly
|
||||
// otherwise it can be cracked, it must be transformed or rebound
|
||||
// before exposure
|
||||
MethodHandle mh = dmh.copyWith(mt, dmh.form);
|
||||
|
@ -2191,7 +2191,7 @@ public abstract class VarHandle implements Constable {
|
|||
* Returns a {@linkplain VarHandleDesc} corresponding to a {@link VarHandle}
|
||||
* for an instance field.
|
||||
*
|
||||
* @param name the unqualifed name of the field
|
||||
* @param name the unqualified name of the field
|
||||
* @param declaringClass a {@link ClassDesc} describing the declaring class,
|
||||
* for field var handles
|
||||
* @param fieldType a {@link ClassDesc} describing the type of the field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue