Skip to content

Commit 6c8dce3

Browse files
committed
Improve documentation
1 parent c3dfeb7 commit 6c8dce3

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/main/java/org/truffleruby/language/arguments/ArgumentsDescriptor.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
*/
1010
package org.truffleruby.language.arguments;
1111

12-
/** An arguments descriptor is an object that describes something about the arguments being passed. Argument descriptors
13-
* are stable, immutable objects, suitable to be cached and guarded by identity. They'd normally convey some kind of
14-
* static information from call site to callee. */
12+
/** An arguments descriptor describes what kind of arguments are passed at a given call site. Most importantly they
13+
* describe whether some keywords arguments are passed or none. Argument descriptors are stable, immutable objects,
14+
* suitable to be cached and guarded by identity. They'd normally convey some kind of static information from call site
15+
* to callee. */
1516
public abstract class ArgumentsDescriptor {
1617
}

src/main/java/org/truffleruby/language/arguments/EmptyArgumentsDescriptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
package org.truffleruby.language.arguments;
1111

12-
/** An arguments descriptor that says that it is not know if there are keyword arguments. */
12+
/** An argument descriptor that says no keyword arguments were passed (only positional arguments). */
1313
public class EmptyArgumentsDescriptor extends ArgumentsDescriptor {
1414

1515
public static final EmptyArgumentsDescriptor INSTANCE = new EmptyArgumentsDescriptor();

src/main/java/org/truffleruby/language/arguments/KeywordArgumentsDescriptor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
*/
1010
package org.truffleruby.language.arguments;
1111

12-
/** An arguments descriptor that says that keyword arguments are present. */
12+
/** An arguments descriptor that says that keyword arguments were passed (either foo(a: 1) or foo(**kw)). Note that
13+
* currently, if kw is empty, then this descriptor is used even though it is semantically the same as if no keyword
14+
* arguments were passed. The callee must handle that for now. */
1315
public class KeywordArgumentsDescriptor extends ArgumentsDescriptor {
1416

1517
public static final KeywordArgumentsDescriptor INSTANCE = new KeywordArgumentsDescriptor();

0 commit comments

Comments
 (0)