From 2b142dabae6507d496a30f253ace74883fe76e21 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 23 Oct 2009 04:32:17 -0500 Subject: [PATCH] Re-organize a few things to reduce '-include=' image size --- basis/bootstrap/stage2.factor | 2 -- basis/bootstrap/tools/tools.factor | 3 ++- basis/debugger/debugger.factor | 11 +++++++---- basis/mirrors/mirrors.factor | 6 +++++- basis/tools/errors/errors.factor | 4 ---- core/source-files/errors/errors.factor | 1 + 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/basis/bootstrap/stage2.factor b/basis/bootstrap/stage2.factor index 3cbe155dd2..0b517c0e66 100644 --- a/basis/bootstrap/stage2.factor +++ b/basis/bootstrap/stage2.factor @@ -77,8 +77,6 @@ SYMBOL: bootstrap-time "stage2: deployment mode" print ] [ "debugger" require - "inspector" require - "tools.errors" require "listener" require "none" require ] if diff --git a/basis/bootstrap/tools/tools.factor b/basis/bootstrap/tools/tools.factor index 6bdfd6241c..848e310d63 100644 --- a/basis/bootstrap/tools/tools.factor +++ b/basis/bootstrap/tools/tools.factor @@ -2,8 +2,10 @@ USING: vocabs.loader sequences ; IN: bootstrap.tools { + "editors" "inspector" "bootstrap.image" + "see" "tools.annotations" "tools.crossref" "tools.errors" @@ -19,5 +21,4 @@ IN: bootstrap.tools "vocabs.hierarchy" "vocabs.refresh" "vocabs.refresh.monitor" - "editors" } [ require ] each diff --git a/basis/debugger/debugger.factor b/basis/debugger/debugger.factor index 4888896866..2920421e6b 100644 --- a/basis/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -8,19 +8,22 @@ continuations.private combinators generic.math classes.builtin classes compiler.units generic.standard generic.single vocabs init kernel.private io.encodings accessors math.order destructors source-files parser classes.tuple.parser effects.parser lexer -generic.parser strings.parser vocabs.loader vocabs.parser see +generic.parser strings.parser vocabs.loader vocabs.parser source-files.errors ; IN: debugger -GENERIC: error. ( error -- ) GENERIC: error-help ( error -- topic ) -M: object error. . ; - M: object error-help drop f ; M: tuple error-help class ; +M: source-file-error error-help error>> error-help ; + +GENERIC: error. ( error -- ) + +M: object error. . ; + M: string error. print ; : :s ( -- ) diff --git a/basis/mirrors/mirrors.factor b/basis/mirrors/mirrors.factor index e1871a35ca..65978f0b46 100644 --- a/basis/mirrors/mirrors.factor +++ b/basis/mirrors/mirrors.factor @@ -3,7 +3,7 @@ USING: assocs hashtables kernel sequences generic words arrays classes slots slots.private classes.tuple classes.tuple.private math vectors math.vectors quotations -accessors combinators byte-arrays ; +accessors combinators byte-arrays vocabs vocabs.loader ; IN: mirrors TUPLE: mirror { object read-only } ; @@ -59,3 +59,7 @@ M: hashtable make-mirror ; M: integer make-mirror drop f ; M: enumerated-sequence make-mirror ; M: object make-mirror ; + +"specialized-arrays" vocab [ + "specialized-arrays.mirrors" require +] when diff --git a/basis/tools/errors/errors.factor b/basis/tools/errors/errors.factor index 963ea7592c..0bf271535a 100644 --- a/basis/tools/errors/errors.factor +++ b/basis/tools/errors/errors.factor @@ -8,10 +8,6 @@ IN: tools.errors #! Tools for source-files.errors. Used by tools.tests and others #! for error reporting -M: source-file-error compute-restarts error>> compute-restarts ; - -M: source-file-error error-help error>> error-help ; - CONSTANT: +listener-input+ "" : error-location ( error -- string ) diff --git a/core/source-files/errors/errors.factor b/core/source-files/errors/errors.factor index 93078c162b..f021944f86 100644 --- a/core/source-files/errors/errors.factor +++ b/core/source-files/errors/errors.factor @@ -17,6 +17,7 @@ TUPLE: source-file-error error asset file line# ; M: source-file-error error-file [ error>> error-file ] [ file>> ] bi or ; M: source-file-error error-line [ error>> error-line ] [ line#>> ] bi or ; +M: source-file-error compute-restarts error>> compute-restarts ; : sort-errors ( errors -- alist ) [ [ line#>> ] sort-with ] { } assoc-map-as sort-keys ;