-
-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename MaybePointer to NullablePointer (#3293)
Resolves #3273 as of [RFC 63](https://github.com/ponylang/rfcs/blob/master/text/0063-rename-maybe-pointer.md) According to my research all the changes in files relates to MaybePointer and only MaybePointer. Excerps from the old code follows as a proof of thought: codegen.h ``` typedef struct compile_t { const char* str_Maybe; } ``` codegen.c ``` static void init_runtime(compile_t* c) { c->str_Maybe = stringtab("MaybePointer"); } ``` genserialise.c ``` if(package == c->str_builtin) { // Don't serialise MaybePointer[A] if(name == c->str_Maybe) return true; } ``` gentype.c ``` if(package == c->str_builtin) { if(name == c->str_Pointer) genprim_pointer_methods(c, t); else if(name == c->str_Maybe) genprim_maybe_methods(c, t); } ``` ffi.c ``` // Parameter type is Pointer[None] // If the argument is Pointer[A], MaybePointer[A] or USize, allow it while(ast_id(arg_type) == TK_ARROW) arg_type = ast_childidx(arg_type, 1); if(is_pointer(arg_type) || is_maybe(arg_type) || is_literal(arg_type, "USize")) return true; ``` reference.c ``` if(is_maybe(ast)) { // MaybePointer[A] must be bound to a struct. ... ``` subtype.c ``` bool is_maybe(ast_t* type) { return is_literal(type, "MaybePointer"); } ``` gentrace.c ``` if(is_maybe(type)) return TRACE_MAYBE; ```
- Loading branch information
1 parent
9a7c564
commit b1fe1a0
Showing
21 changed files
with
62 additions
and
61 deletions.
There are no files selected for viewing
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
12 changes: 6 additions & 6 deletions
12
packages/builtin/maybe_pointer.pony → packages/builtin/nullable_pointer.pony
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.