From e69d0a7b45bab455c9136912376386bfe592424e Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 22 Jun 2015 15:59:15 -0700 Subject: [PATCH] locals.parser: only need to clone manifest. --- basis/locals/parser/parser-tests.factor | 18 ++++++++---------- basis/locals/parser/parser.factor | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/basis/locals/parser/parser-tests.factor b/basis/locals/parser/parser-tests.factor index dca8a9bff7..5c42a0a556 100644 --- a/basis/locals/parser/parser-tests.factor +++ b/basis/locals/parser/parser-tests.factor @@ -3,7 +3,6 @@ locals.parser namespaces parser prettyprint sequences sorting tools.test vocabs vocabs.parser ; IN: locals.parser.tests -<< ! (::) { "dobiedoo" @@ -21,10 +20,9 @@ IN: locals.parser.tests [ "um" parse-def local>> name>> - manifest get qualified-vocabs>> last words>> keys "um" swap member? + qualified-vocabs last words>> keys "um" swap member? ] with-compilation-unit ] unit-test ->> ! check-local-name { "hello" } [ @@ -56,14 +54,15 @@ IN: locals.parser.tests [ locals>> [ name>> ] map ] [ keys ] bi* ] unit-test -<< ! with-lambda-scope { t } [ - qualified-vocabs length - H{ } clone [ - "hey there!" qualified-vocabs push [ ] - ] with-lambda-scope drop - qualified-vocabs length = + [ + qualified-vocabs length + H{ } clone [ + "hey there!" qualified-vocabs push [ ] + ] with-lambda-scope drop + qualified-vocabs length = + ] with-compilation-unit ] unit-test { @@ -76,4 +75,3 @@ IN: locals.parser.tests ] with-lexer ] with-compilation-unit unparse ] unit-test ->> diff --git a/basis/locals/parser/parser.factor b/basis/locals/parser/parser.factor index 84ca8da4c6..3f318a7cf9 100644 --- a/basis/locals/parser/parser.factor +++ b/basis/locals/parser/parser.factor @@ -35,7 +35,7 @@ SINGLETON: lambda-parser '[ in-lambda? on lambda-parser quotation-parser set - manifest [ clone [ clone ] change-qualified-vocabs ] change + manifest [ clone ] change use-words @ ] with-scope ; inline