This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Read a sequence of bytes from the stream corresponding to a single Unicode character that is | |
* encoded in the UTF-8 format. If the character is in the surrogate range, the second codepoint | |
* in the pair will also be read, and joined with the first. | |
* | |
* @param in the BinaryInput stream | |
* | |
* @return the character read from the stream in UTF-8 format | |
* | |
* @throws IllegalUTF if there is a flaw in the UTF-8 encoding or in the resulting codepoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TestSimple | |
{ | |
@Inject Console console; | |
void run() | |
{ | |
function Int() f = makeMeAClosure(); | |
console.println($"after losing the stack frame, the returned closure evaluates to {f()}"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Determine if any elements of the `Collection` match the provided criteria. | |
* | |
* @param match a function that evaluates elements of this collection for inclusion | |
* | |
* @return True if any element matched the specified criteria | |
* @return (conditional) the first element that matched the criteria | |
*/ | |
conditional Element any(function Boolean(Element) match = _ -> True) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Generate assembly code for a method. This is the entry point for the compilation of a method. | |
* | |
* @param code the code object to which the assembly is added | |
* @param errs the error listener to log to | |
* | |
* @return true if nothing occurred during the compilation that should stop further progress | |
*/ | |
public boolean compileMethod(Code code, ErrorListener errs) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import reflect.Argument; | |
import reflect.Annotation; | |
/** | |
* The LinkedList annotation is used to turn a property into a linked list, **without using any | |
* additional memory** beyond the property or properties that represent the next and previous | |
* pointers. | |
* | |
* There are three dimensions that define a total of six distinct scenarios supported by this mixin: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The Unicode General Category of the character. | |
* | |
* This information is field 2 in the `UnicodeData.txt` data file from the Unicode Consortium. | |
* From [https://www.unicode.org/reports/tr44/#General_Category_Values]: | |
* | |
* > This is a useful breakdown into various character types which can be used as a default | |
* > categorization in implementations. For the property values, see | |
* > [General Category Values](https://www.unicode.org/reports/tr44/#General_Category_Values). | |
* |