From 1507118ff9b025d96f3e21ed41a953f5f2717b63 Mon Sep 17 00:00:00 2001 From: Geoffrey Broadwell Date: Sat, 20 Mar 2010 14:21:59 -0700 Subject: [PATCH] [LIB,TESTS] Rename Util to Plumage::NQPUtil phase 2: update references --- Configure.nqp | 2 +- TASKS | 2 +- docs/hacking/design-internals.pod | 20 ++++++++++---------- probes/cap-test.nqp | 4 ++-- probes/regex-test.nqp | 4 ++-- src/Makefile.in | 3 ++- src/lib/Plumage/NQPUtil.nqp | 4 ++-- src/lib/Plumage/Util.nqp | 4 ++-- src/plumage.nqp | 6 +++--- t/02-load-all.t | 2 +- t/03-plumage-nqputil.t | 2 +- t/sanity.t | 4 ++-- 12 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Configure.nqp b/Configure.nqp index b1ea2f6..e76bd2a 100644 --- a/Configure.nqp +++ b/Configure.nqp @@ -17,7 +17,7 @@ sub MAIN () { say("Hello, I'm Configure. My job is to poke and prod\nyour system to figure out how to build Plumage.\n"); # Load utility functions - pir::load_bytecode('src/lib/Util.pir'); + pir::load_bytecode('src/lib/Plumage/NQPUtil.pir'); # Slurp in the unconfigured Makefile text my $unconfigured := slurp(@*ARGS[0] || 'src/Makefile.in'); diff --git a/TASKS b/TASKS index 3906d87..20cfb55 100644 --- a/TASKS +++ b/TASKS @@ -84,7 +84,7 @@ project itself requires unavailable credentials or the project won't build with missing submodules, but that can probably be put off for now. -------- -Adding more "builtins" to Util.nqp: +Adding more "builtins" to src/lib/Plumage/NQPUtil.nqp: The guiding principles are: diff --git a/docs/hacking/design-internals.pod b/docs/hacking/design-internals.pod index 6089786..1537ea0 100644 --- a/docs/hacking/design-internals.pod +++ b/docs/hacking/design-internals.pod @@ -16,7 +16,7 @@ The Plumage stack currently looks like this: | | ,---------------+--+--------------------. | | | | | Plumage::Metadata | | | +--+--+---------------------------------------+--+--+ - | Util | + | Plumage::NQPUtil | +---------------------------------------------------+ | Parrot Libraries | Parrot Languages | | | | @@ -28,20 +28,20 @@ The Plumage stack currently looks like this: It is intended that as Plumage's functionality grows, more libraries (and probably more layers) will be added in the C namespace. There -has also been some discussion of moving C or its functional equivalent -into NQP-rx as an optional utility library. +has also been some discussion of merging C or its +functional equivalent into Kakapo, the standard library project for NQP-rx. =head1 Component Overviews The following sections give a mild overview of each major component, from the -C layer on up. There are some additional details for particular pieces -available in other documents; these are noted below. For even more detail, -read the source or visit C<#parrot> on C, and we'll be happy -to help you. +C layer on up. There are some additional details for +particular pieces available in other documents; these are noted below. For +even more detail, read the source or visit C<#parrot> on C, +and we'll be happy to help you. -=head2 Util +=head2 Plumage::NQPUtil This component provides a very simple library of common functions to all of the layers above it. These range from functional constructs like C, @@ -49,8 +49,8 @@ C, and C, to portable system utilities like C, C, and C, to generally useful tools like C, C, and C. -In addition, C provides the magic that sets up the "interpreter globals", -such as C<$*PROGRAM_NAME>, C<@*ARGS>, and C<%*VM>. +In addition, C provides the magic that sets up the +"interpreter globals", such as C<$*PROGRAM_NAME>, C<@*ARGS>, and C<%*VM>. =head2 Plumage::Metadata diff --git a/probes/cap-test.nqp b/probes/cap-test.nqp index 336214b..a010f1f 100644 --- a/probes/cap-test.nqp +++ b/probes/cap-test.nqp @@ -13,8 +13,8 @@ my %*ENV; my %*VM; # Next, load the utility functions and fill in the "globals" -pir::load_bytecode('src/lib/Util.pir'); -say("Util loaded.\n"); +pir::load_bytecode('src/lib/Plumage/NQPUtil.pir'); +say("Plumage::NQPUtil loaded.\n"); # Inline PIR print("Inline PIR says: "); diff --git a/probes/regex-test.nqp b/probes/regex-test.nqp index e9c5aff..7e321ca 100644 --- a/probes/regex-test.nqp +++ b/probes/regex-test.nqp @@ -6,8 +6,8 @@ # $ parrot-nqp regex-test.nqp -# Load Util module, which includes the regex helper functions -pir::load_bytecode('src/lib/Util.pir'); +# Load Plumage::NQPUtil module, which includes the regex helper functions +pir::load_bytecode('src/lib/Plumage/NQPUtil.pir'); # Load data structure dumper pir::load_bytecode('dumper.pbc'); diff --git a/src/Makefile.in b/src/Makefile.in index 71c38fb..2dc8e6d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -44,7 +44,7 @@ plumage$(EXE): src/plumage$(EXE) $(CP) src/plumage$(EXE) plumage$(EXE) $(CHMOD) 0755 plumage$(EXE) -src/plumage$(EXE): Makefile src/lib/Util.pbc src/lib/Plumage/Util.pbc src/lib/Plumage/Metadata.pbc src/lib/Plumage/Project.pbc src/lib/Plumage/Dependencies.pbc src/plumage.pbc +src/plumage$(EXE): Makefile src/lib/Plumage/NQPUtil.pbc src/lib/Plumage/Util.pbc src/lib/Plumage/Metadata.pbc src/lib/Plumage/Project.pbc src/lib/Plumage/Dependencies.pbc src/plumage.pbc $(PBC_TO_EXE) src/plumage.pbc .SUFFIXES: .nqp .pir .pbc @@ -62,6 +62,7 @@ clean: FORCE $(RM_F) "*~" "src/*~" "src/lib/*~" "src/lib/Plumage/*~" \ "*.pbc" "src/*.pbc" "src/lib/*.pbc" "src/lib/Plumage/*.pbc" \ src/plumage.pir src/lib/Metadata.pir \ + src/lib/Util.nqp src/lib/Util.pir \ src/lib/Plumage/Metadata.pir src/lib/Plumage/Project.pir \ src/lib/Plumage/Dependencies.pir src/lib/Plumage/Util.pir \ "src/*.c" "src/*$(O)" src/plumage$(EXE) plumage$(EXE) Makefile diff --git a/src/lib/Plumage/NQPUtil.nqp b/src/lib/Plumage/NQPUtil.nqp index bbb6d03..21ab9e6 100644 --- a/src/lib/Plumage/NQPUtil.nqp +++ b/src/lib/Plumage/NQPUtil.nqp @@ -2,12 +2,12 @@ =head1 NAME -Util.nqp - Utility functions for NQP +Plumage::NQPUtil.nqp - Utility functions for NQP =head1 SYNOPSIS # Load this library - pir::load_bytecode('Util.pbc'); + pir::load_bytecode('Plumage/NQPUtil.pbc'); # Hash methods $found := %hash.exists($key); diff --git a/src/lib/Plumage/Util.nqp b/src/lib/Plumage/Util.nqp index fad66c4..380922e 100644 --- a/src/lib/Plumage/Util.nqp +++ b/src/lib/Plumage/Util.nqp @@ -2,7 +2,7 @@ =head1 NAME -Pluamge::Util - Plumage-specific utility functions +Plumage::Util - Plumage-specific utility functions =head1 SYNOPSIS @@ -17,7 +17,7 @@ Pluamge::Util - Plumage-specific utility functions These utility functions are likely only directly useful to Plumage-related programs, unlike the more general utility functions provided by -F. +F. =over 4 diff --git a/src/plumage.nqp b/src/plumage.nqp index c2ce09b..a100d47 100644 --- a/src/plumage.nqp +++ b/src/plumage.nqp @@ -126,9 +126,6 @@ sub load_helper_libraries () { # Support OO pir::load_bytecode('P6object.pbc'); - # Utility functions and standard "globals" - pir::load_bytecode('Util.pbc'); - # Process command line options pir::load_bytecode('Getopt/Obj.pbc'); @@ -138,6 +135,9 @@ sub load_helper_libraries () { # Data structure dumper for PMCs (used for debugging) pir::load_bytecode('dumper.pbc'); + # Utility functions and standard "globals" + pir::load_bytecode('Plumage/NQPUtil.pbc'); + # Plumage modules: util, metadata, project, dependencies pir::load_bytecode('Plumage/Util.pbc'); pir::load_bytecode('Plumage/Metadata.pbc'); diff --git a/t/02-load-all.t b/t/02-load-all.t index 30bd38a..b29fcdb 100644 --- a/t/02-load-all.t +++ b/t/02-load-all.t @@ -28,7 +28,7 @@ sub test_load_pbcs() { Getopt/Obj.pbc P6object.pbc P6Regex.pbc - Util.pbc + Plumage/NQPUtil.pbc Plumage/Util.pbc Plumage/Metadata.pbc Plumage/Dependencies.pbc diff --git a/t/03-plumage-nqputil.t b/t/03-plumage-nqputil.t index 07d7faf..2506638 100644 --- a/t/03-plumage-nqputil.t +++ b/t/03-plumage-nqputil.t @@ -10,7 +10,7 @@ sub MAIN () { pir::compreg__PS('parrot').import('Test::More'); # Load library to be tested - pir::load_bytecode('src/lib/Util.pbc'); + pir::load_bytecode('src/lib/Plumage/NQPUtil.pbc'); # Run all tests for this library run_tests(); diff --git a/t/sanity.t b/t/sanity.t index f2bf128..8a42154 100644 --- a/t/sanity.t +++ b/t/sanity.t @@ -9,8 +9,8 @@ sub MAIN () { pir::load_language('parrot'); pir::compreg__PS('parrot').import('Test::More'); - # Load Util library - pir::load_bytecode('src/lib/Util.pbc'); + # Load NQP utilities library + pir::load_bytecode('src/lib/Plumage/NQPUtil.pbc'); # Set correct path for plumage binary $PLUMAGE := fscat(['.'], 'plumage');