1. # This file contains various stubs. Note that a few are created already
  2. # outside of the setting, such as Mu/Any/Cool, Attribute, Signature/Parameter,
  3. # Code/Block/Routine/Sub/Method and Str/Int/Num. They are built in BOOTSTRAP.nqp
  4. # in Perl6::Metamodel for now, though should be a BEGIN block in CORE.setting
  5. # in the end.
  6. my class Exception { ... }
  7. my class X::AdHoc { ... }
  8. my class FatRat { ... }
  9. my class Pair { ... }
  10. my class Promise { ... }
  11. my class Channel { ... }
  12. my class X::OutOfRange { ... }
  13. my class X::Dynamic::NotFound { ... }
  14. my class X::SecurityPolicy::Eval { ... }
  15. my class X::Channel::ReceiveOnClosed { ... }
  16. my role QuantHash { ... }
  17. my role Setty { ... }
  18. my class Set { ... }
  19. my class SetHash { ... }
  20. my role Baggy { ... }
  21. my class Bag { ... }
  22. my class BagHash { ... }
  23. my role Mixy { ... }
  24. my class Mix { ... }
  25. my class MixHash { ... }
  26. my class Lock is repr('ReentrantMutex') { ... }
  27. my class Lock::Async { ... }
  28. sub DYNAMIC(\name) is raw {
  29. nqp::ifnull(
  30. nqp::getlexdyn(name),
  31. nqp::stmts(
  32. nqp::unless(
  33. nqp::isnull(my $prom := nqp::getlexdyn('$*PROMISE')),
  34. (my Mu $x := nqp::getlexreldyn(
  35. nqp::getattr($prom,Promise,'$!dynamic_context'),name)
  36. )
  37. ),
  38. nqp::ifnull(
  39. $x,
  40. nqp::stmts(
  41. (my str $pkgname = nqp::replace(name,1,1,'')),
  42. nqp::ifnull(
  43. nqp::atkey(GLOBAL.WHO,$pkgname),
  44. nqp::ifnull(
  45. nqp::atkey(PROCESS.WHO,$pkgname),
  46. Rakudo::Internals.INITIALIZE-DYNAMIC(name)
  47. )
  48. )
  49. )
  50. )
  51. )
  52. )
  53. }
  54. # Set up ClassHOW's auto-gen proto (nested scope so it won't
  55. # actually appear in the setting).
  56. {
  57. my class Dummy {
  58. our proto method AUTOGEN(::T $: |) {*}
  59. }
  60. Dummy.HOW.set_autogen_proto(&Dummy::AUTOGEN);
  61. }