From 120f1329c685bd7247ece2703e3113abe71f0f7b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 23 Jul 2015 07:39:26 -0600 Subject: [PATCH] change bytecode marshaling of scopes This change mostly reverts 1465ff25fc, which turned out to be a hassle because it created more cyclic structure. A simpler strategy is to allow a phase-specific scope to be detached (perhaps temporarily, due to on-demand loading of bytecode) from its group; when that's possible, the scope is not reachable from a place where it can be moved to other syntax objects, so it's ok to be detached. Debugging output needs to handle that gracefully, though. Also, in case of broken bytecode, fix up a detached scope if it does end up in an unexpected place. --- pkgs/base/info.rkt | 2 +- racket/src/racket/src/cstartup.inc | 258 ++++++++++++++--------------- racket/src/racket/src/schvers.h | 4 +- racket/src/racket/src/syntax.c | 81 ++++----- 4 files changed, 168 insertions(+), 177 deletions(-) diff --git a/pkgs/base/info.rkt b/pkgs/base/info.rkt index 7d61797cdd..95afdfd40f 100644 --- a/pkgs/base/info.rkt +++ b/pkgs/base/info.rkt @@ -12,7 +12,7 @@ (define collection 'multi) -(define version "6.2.900.5") +(define version "6.2.900.6") (define deps `("racket-lib" ["racket" #:version ,version])) diff --git a/racket/src/racket/src/cstartup.inc b/racket/src/racket/src/cstartup.inc index e34bbdc934..a415534ec3 100644 --- a/racket/src/racket/src/cstartup.inc +++ b/racket/src/racket/src/cstartup.inc @@ -1,108 +1,108 @@ { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,53,84,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,55,0,0,0,1,0,0,8,0, -18,0,22,0,29,0,36,0,41,0,53,0,58,0,63,0,76,0,79,0,86, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,54,84,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,54,0,0,0,1,0,0,8,0, +18,0,22,0,29,0,36,0,41,0,46,0,51,0,63,0,66,0,73,0,86, 0,90,0,94,0,103,0,109,0,123,0,137,0,140,0,146,0,157,0,159,0, -173,0,180,0,202,0,204,0,218,0,238,0,243,0,246,0,2,1,41,1,48, -1,122,1,129,1,140,1,149,1,182,1,215,1,21,2,26,2,107,2,112,2, -117,2,138,2,35,3,56,3,109,3,178,3,247,3,137,4,29,5,40,5,123, -5,0,0,152,7,0,0,3,1,5,105,110,115,112,48,71,35,37,109,105,110, -45,115,116,120,29,11,11,11,68,108,101,116,114,101,99,68,100,101,102,105,110, -101,66,99,111,110,100,73,108,101,116,42,45,118,97,108,117,101,115,66,119,104, -101,110,66,108,101,116,42,74,112,97,114,97,109,101,116,101,114,105,122,101,64, -111,114,68,117,110,108,101,115,115,65,108,101,116,65,97,110,100,70,104,101,114, -101,45,115,116,120,67,113,117,111,116,101,29,94,2,16,70,35,37,107,101,114, -110,101,108,11,29,94,2,16,70,35,37,112,97,114,97,109,122,11,64,105,102, -67,98,101,103,105,110,72,108,101,116,45,118,97,108,117,101,115,63,120,75,108, -101,116,114,101,99,45,118,97,108,117,101,115,68,108,97,109,98,100,97,1,20, -112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,45,107,101,121,63, -118,75,100,101,102,105,110,101,45,118,97,108,117,101,115,38,28,16,3,93,16, -2,29,11,11,11,2,3,2,29,93,143,2,31,39,38,29,93,2,30,36,30, -39,38,31,16,5,40,2,32,39,2,34,2,2,36,32,145,40,2,31,143,2, -33,16,4,2,17,40,39,2,1,16,2,2,15,93,143,2,33,147,2,1,2, -3,40,2,15,143,2,3,40,2,15,38,33,143,2,32,2,29,36,34,146,40, -2,31,143,2,35,16,4,2,17,39,39,2,1,143,2,35,16,4,2,18,39, -39,2,1,16,22,2,14,2,36,2,5,2,36,2,11,2,36,2,6,2,36, -2,7,2,36,2,13,2,36,2,12,2,36,2,9,2,36,2,10,2,36,2, -8,2,36,2,4,2,36,38,35,143,2,34,2,29,38,36,93,143,2,35,143, -2,1,2,3,18,143,66,104,101,114,101,2,28,27,248,22,166,4,195,249,22, -159,4,80,143,42,39,251,22,92,2,19,248,22,104,199,12,249,22,82,2,20, -248,22,106,201,27,248,22,166,4,195,249,22,159,4,80,143,42,39,251,22,92, -2,19,248,22,104,199,249,22,82,2,20,248,22,106,201,12,27,248,22,84,248, -22,166,4,196,28,248,22,90,193,20,14,144,40,39,40,28,248,22,90,248,22, -84,194,248,22,163,20,193,249,22,159,4,80,143,42,39,251,22,92,2,19,248, -22,163,20,199,249,22,82,2,14,248,22,164,20,201,11,18,143,10,2,28,27, -248,22,84,248,22,166,4,196,28,248,22,90,193,20,14,144,40,39,40,28,248, -22,90,248,22,84,194,248,22,163,20,193,249,22,159,4,80,143,42,39,250,22, -92,2,21,248,22,92,249,22,92,248,22,92,2,22,248,22,163,20,201,251,22, -92,2,19,2,22,2,22,249,22,82,2,11,248,22,164,20,204,18,143,11,2, -28,248,22,166,4,193,27,248,22,166,4,194,249,22,82,248,22,92,248,22,83, -196,248,22,164,20,195,27,248,22,84,248,22,166,4,23,197,1,249,22,159,4, -80,143,42,39,28,248,22,66,248,22,160,4,248,22,83,23,198,2,27,249,22, -2,32,0,88,148,8,36,40,46,11,9,222,33,44,248,22,166,4,248,22,104, -23,200,2,250,22,92,2,23,248,22,92,249,22,92,248,22,92,248,22,163,20, -23,204,2,250,22,93,2,24,249,22,2,22,83,23,204,2,248,22,106,23,206, -2,249,22,82,248,22,163,20,23,202,1,249,22,2,22,104,23,200,1,250,22, -93,2,21,249,22,2,32,0,88,148,8,36,40,50,11,9,222,33,45,248,22, -166,4,248,22,163,20,201,248,22,164,20,198,27,248,22,166,4,194,249,22,82, -248,22,92,248,22,83,196,248,22,164,20,195,27,248,22,84,248,22,166,4,23, -197,1,249,22,159,4,80,143,42,39,250,22,93,2,23,249,22,2,32,0,88, -148,8,36,40,50,11,9,222,33,47,248,22,166,4,248,22,83,201,248,22,164, -20,198,27,248,22,84,248,22,166,4,196,27,248,22,166,4,248,22,83,195,249, -22,159,4,80,143,43,39,28,248,22,90,195,250,22,93,2,21,9,248,22,164, -20,199,250,22,92,2,13,248,22,92,248,22,83,199,250,22,93,2,9,248,22, -164,20,201,248,22,164,20,202,27,248,22,84,248,22,166,4,196,27,248,22,166, -4,248,22,83,195,249,22,159,4,80,143,43,39,28,248,22,90,195,250,22,93, -2,21,9,248,22,164,20,199,250,22,92,2,21,248,22,92,248,22,83,199,250, -22,93,2,7,248,22,164,20,201,248,22,164,20,202,27,248,22,84,248,22,166, -4,23,197,1,27,249,22,1,22,96,249,22,2,22,166,4,248,22,166,4,248, -22,83,199,248,22,187,4,249,22,159,4,80,143,44,39,251,22,92,1,22,119, -105,116,104,45,99,111,110,116,105,110,117,97,116,105,111,110,45,109,97,114,107, -2,25,250,22,93,1,23,101,120,116,101,110,100,45,112,97,114,97,109,101,116, -101,114,105,122,97,116,105,111,110,21,95,1,27,99,111,110,116,105,110,117,97, -116,105,111,110,45,109,97,114,107,45,115,101,116,45,102,105,114,115,116,11,2, -25,202,250,22,93,2,21,9,248,22,164,20,204,27,248,22,84,248,22,166,4, -196,28,248,22,90,193,20,14,144,40,39,40,249,22,159,4,80,143,42,39,27, -248,22,166,4,248,22,83,197,28,249,22,171,9,64,61,62,248,22,160,4,248, -22,104,196,250,22,92,2,21,248,22,92,249,22,92,21,93,2,26,248,22,163, -20,199,250,22,93,2,6,249,22,92,2,26,249,22,92,248,22,113,203,2,26, -248,22,164,20,202,251,22,92,2,19,28,249,22,171,9,248,22,160,4,248,22, -163,20,200,66,101,108,115,101,10,248,22,163,20,197,250,22,93,2,21,9,248, -22,164,20,200,249,22,82,2,6,248,22,164,20,202,18,143,94,10,66,118,111, -105,100,2,28,27,248,22,84,248,22,166,4,196,249,22,159,4,80,143,42,39, -28,248,22,66,248,22,160,4,248,22,83,197,250,22,92,2,27,248,22,92,248, -22,163,20,199,248,22,104,198,27,248,22,160,4,248,22,163,20,197,250,22,92, -2,27,248,22,92,248,22,83,197,250,22,93,2,24,248,22,164,20,199,248,22, -164,20,202,144,39,20,120,145,2,1,39,16,1,11,16,0,20,26,15,61,9, -2,2,2,2,2,3,11,11,11,11,9,9,11,11,11,10,39,80,143,39,39, -20,120,145,2,1,39,16,0,16,0,41,42,39,16,0,39,16,0,39,11,11, -11,16,11,2,4,2,5,2,6,2,7,2,8,2,9,2,10,2,11,2,12, -2,13,2,14,16,11,11,11,11,11,11,11,11,11,11,11,11,16,11,2,4, -2,5,2,6,2,7,2,8,2,9,2,10,2,11,2,12,2,13,2,14,39, -50,40,16,0,39,16,1,2,15,40,11,11,11,16,0,16,0,16,0,39,39, -11,12,11,11,16,0,16,0,16,0,39,39,16,12,16,5,11,20,15,16,2, -20,14,144,39,39,40,80,143,39,39,39,20,120,145,2,1,39,16,1,2,15, -16,1,33,37,10,16,5,2,12,88,148,8,36,40,56,40,9,223,0,33,38, -39,20,120,145,2,1,39,16,1,2,15,16,0,11,16,5,2,8,88,148,8, -36,40,56,40,9,223,0,33,39,39,20,120,145,2,1,39,16,1,2,15,16, -0,11,16,5,2,14,88,148,8,36,40,56,42,9,223,0,33,40,39,20,120, -145,2,1,39,16,1,2,15,16,1,33,41,11,16,5,2,11,88,148,8,36, -40,59,42,9,223,0,33,42,39,20,120,145,2,1,39,16,1,2,15,16,1, -33,43,11,16,5,2,13,88,148,8,36,40,61,40,9,223,0,33,46,39,20, -120,145,2,1,39,16,1,2,15,16,0,11,16,5,2,4,88,148,8,36,40, -56,40,9,223,0,33,48,39,20,120,145,2,1,39,16,1,2,15,16,0,11, -16,5,2,9,88,148,8,36,40,57,40,9,223,0,33,49,39,20,120,145,2, -1,39,16,1,2,15,16,0,11,16,5,2,7,88,148,8,36,40,57,40,9, -223,0,33,50,39,20,120,145,2,1,39,16,1,2,15,16,0,11,16,5,2, -10,88,148,8,36,40,59,40,9,223,0,33,51,39,20,120,145,2,1,39,16, -1,2,15,16,0,11,16,5,2,6,88,148,8,36,40,61,42,9,223,0,33, -52,39,20,120,145,2,1,39,16,1,2,15,16,1,33,53,11,16,5,2,5, -88,148,8,36,40,57,40,9,223,0,33,54,39,20,120,145,2,1,39,16,1, -2,15,16,0,11,16,0,94,2,17,2,18,93,2,17,9,9,39,9,0}; - EVAL_ONE_SIZED_STR((char *)expr, 2098); +173,0,180,0,202,0,204,0,218,0,246,0,251,0,254,0,35,1,42,1,114, +1,121,1,132,1,141,1,174,1,207,1,13,2,18,2,99,2,104,2,109,2, +130,2,27,3,48,3,101,3,170,3,239,3,129,4,21,5,32,5,115,5,0, +0,144,7,0,0,3,1,5,105,110,115,112,48,71,35,37,109,105,110,45,115, +116,120,29,11,11,11,68,108,101,116,114,101,99,68,100,101,102,105,110,101,66, +99,111,110,100,66,119,104,101,110,66,108,101,116,42,73,108,101,116,42,45,118, +97,108,117,101,115,64,111,114,68,117,110,108,101,115,115,74,112,97,114,97,109, +101,116,101,114,105,122,101,65,108,101,116,65,97,110,100,70,104,101,114,101,45, +115,116,120,67,113,117,111,116,101,29,94,2,16,70,35,37,107,101,114,110,101, +108,11,29,94,2,16,70,35,37,112,97,114,97,109,122,11,64,105,102,67,98, +101,103,105,110,72,108,101,116,45,118,97,108,117,101,115,63,120,75,108,101,116, +114,101,99,45,118,97,108,117,101,115,68,108,97,109,98,100,97,1,20,112,97, +114,97,109,101,116,101,114,105,122,97,116,105,111,110,45,107,101,121,63,118,75, +100,101,102,105,110,101,45,118,97,108,117,101,115,38,28,16,3,93,16,2,29, +11,11,11,2,3,2,29,93,143,16,5,40,2,31,39,2,33,2,2,39,38, +29,93,2,30,36,30,39,36,31,144,40,143,2,32,16,4,2,17,40,39,2, +1,16,2,2,15,93,143,2,32,147,2,1,2,3,40,2,15,143,2,3,40, +2,15,38,32,143,2,31,2,29,36,33,145,40,143,2,34,16,4,2,17,39, +39,2,1,143,2,34,16,4,2,18,39,39,2,1,16,22,2,14,2,35,2, +12,2,35,2,5,2,35,2,10,2,35,2,6,2,35,2,13,2,35,2,11, +2,35,2,8,2,35,2,9,2,35,2,7,2,35,2,4,2,35,38,34,143, +2,33,2,29,38,35,93,143,2,34,143,2,1,2,3,18,143,66,104,101,114, +101,2,28,27,248,22,166,4,195,249,22,159,4,80,143,42,39,251,22,92,2, +19,248,22,104,199,12,249,22,82,2,20,248,22,106,201,27,248,22,166,4,195, +249,22,159,4,80,143,42,39,251,22,92,2,19,248,22,104,199,249,22,82,2, +20,248,22,106,201,12,27,248,22,84,248,22,166,4,196,28,248,22,90,193,20, +14,144,40,39,40,28,248,22,90,248,22,84,194,248,22,163,20,193,249,22,159, +4,80,143,42,39,251,22,92,2,19,248,22,163,20,199,249,22,82,2,14,248, +22,164,20,201,11,18,143,10,2,28,27,248,22,84,248,22,166,4,196,28,248, +22,90,193,20,14,144,40,39,40,28,248,22,90,248,22,84,194,248,22,163,20, +193,249,22,159,4,80,143,42,39,250,22,92,2,21,248,22,92,249,22,92,248, +22,92,2,22,248,22,163,20,201,251,22,92,2,19,2,22,2,22,249,22,82, +2,10,248,22,164,20,204,18,143,11,2,28,248,22,166,4,193,27,248,22,166, +4,194,249,22,82,248,22,92,248,22,83,196,248,22,164,20,195,27,248,22,84, +248,22,166,4,23,197,1,249,22,159,4,80,143,42,39,28,248,22,66,248,22, +160,4,248,22,83,23,198,2,27,249,22,2,32,0,88,148,8,36,40,46,11, +9,222,33,43,248,22,166,4,248,22,104,23,200,2,250,22,92,2,23,248,22, +92,249,22,92,248,22,92,248,22,163,20,23,204,2,250,22,93,2,24,249,22, +2,22,83,23,204,2,248,22,106,23,206,2,249,22,82,248,22,163,20,23,202, +1,249,22,2,22,104,23,200,1,250,22,93,2,21,249,22,2,32,0,88,148, +8,36,40,50,11,9,222,33,44,248,22,166,4,248,22,163,20,201,248,22,164, +20,198,27,248,22,166,4,194,249,22,82,248,22,92,248,22,83,196,248,22,164, +20,195,27,248,22,84,248,22,166,4,23,197,1,249,22,159,4,80,143,42,39, +250,22,93,2,23,249,22,2,32,0,88,148,8,36,40,50,11,9,222,33,46, +248,22,166,4,248,22,83,201,248,22,164,20,198,27,248,22,84,248,22,166,4, +196,27,248,22,166,4,248,22,83,195,249,22,159,4,80,143,43,39,28,248,22, +90,195,250,22,93,2,21,9,248,22,164,20,199,250,22,92,2,13,248,22,92, +248,22,83,199,250,22,93,2,8,248,22,164,20,201,248,22,164,20,202,27,248, +22,84,248,22,166,4,196,27,248,22,166,4,248,22,83,195,249,22,159,4,80, +143,43,39,28,248,22,90,195,250,22,93,2,21,9,248,22,164,20,199,250,22, +92,2,21,248,22,92,248,22,83,199,250,22,93,2,9,248,22,164,20,201,248, +22,164,20,202,27,248,22,84,248,22,166,4,23,197,1,27,249,22,1,22,96, +249,22,2,22,166,4,248,22,166,4,248,22,83,199,248,22,187,4,249,22,159, +4,80,143,44,39,251,22,92,1,22,119,105,116,104,45,99,111,110,116,105,110, +117,97,116,105,111,110,45,109,97,114,107,2,25,250,22,93,1,23,101,120,116, +101,110,100,45,112,97,114,97,109,101,116,101,114,105,122,97,116,105,111,110,21, +95,1,27,99,111,110,116,105,110,117,97,116,105,111,110,45,109,97,114,107,45, +115,101,116,45,102,105,114,115,116,11,2,25,202,250,22,93,2,21,9,248,22, +164,20,204,27,248,22,84,248,22,166,4,196,28,248,22,90,193,20,14,144,40, +39,40,249,22,159,4,80,143,42,39,27,248,22,166,4,248,22,83,197,28,249, +22,171,9,64,61,62,248,22,160,4,248,22,104,196,250,22,92,2,21,248,22, +92,249,22,92,21,93,2,26,248,22,163,20,199,250,22,93,2,6,249,22,92, +2,26,249,22,92,248,22,113,203,2,26,248,22,164,20,202,251,22,92,2,19, +28,249,22,171,9,248,22,160,4,248,22,163,20,200,66,101,108,115,101,10,248, +22,163,20,197,250,22,93,2,21,9,248,22,164,20,200,249,22,82,2,6,248, +22,164,20,202,18,143,94,10,66,118,111,105,100,2,28,27,248,22,84,248,22, +166,4,196,249,22,159,4,80,143,42,39,28,248,22,66,248,22,160,4,248,22, +83,197,250,22,92,2,27,248,22,92,248,22,163,20,199,248,22,104,198,27,248, +22,160,4,248,22,163,20,197,250,22,92,2,27,248,22,92,248,22,83,197,250, +22,93,2,24,248,22,164,20,199,248,22,164,20,202,144,39,20,120,145,2,1, +39,16,1,11,16,0,20,26,15,61,9,2,2,2,2,2,3,11,11,11,11, +9,9,11,11,11,10,39,80,143,39,39,20,120,145,2,1,39,16,0,16,0, +41,42,39,16,0,39,16,0,39,11,11,11,16,11,2,4,2,5,2,6,2, +7,2,8,2,9,2,10,2,11,2,12,2,13,2,14,16,11,11,11,11,11, +11,11,11,11,11,11,11,16,11,2,4,2,5,2,6,2,7,2,8,2,9, +2,10,2,11,2,12,2,13,2,14,39,50,40,16,0,39,16,1,2,15,40, +11,11,11,16,0,16,0,16,0,39,39,11,12,11,11,16,0,16,0,16,0, +39,39,16,12,16,5,11,20,15,16,2,20,14,144,39,39,40,80,143,39,39, +39,20,120,145,2,1,39,16,1,2,15,16,1,33,36,10,16,5,2,11,88, +148,8,36,40,56,40,9,223,0,33,37,39,20,120,145,2,1,39,16,1,2, +15,16,0,11,16,5,2,7,88,148,8,36,40,56,40,9,223,0,33,38,39, +20,120,145,2,1,39,16,1,2,15,16,0,11,16,5,2,14,88,148,8,36, +40,56,42,9,223,0,33,39,39,20,120,145,2,1,39,16,1,2,15,16,1, +33,40,11,16,5,2,10,88,148,8,36,40,59,42,9,223,0,33,41,39,20, +120,145,2,1,39,16,1,2,15,16,1,33,42,11,16,5,2,13,88,148,8, +36,40,61,40,9,223,0,33,45,39,20,120,145,2,1,39,16,1,2,15,16, +0,11,16,5,2,4,88,148,8,36,40,56,40,9,223,0,33,47,39,20,120, +145,2,1,39,16,1,2,15,16,0,11,16,5,2,8,88,148,8,36,40,57, +40,9,223,0,33,48,39,20,120,145,2,1,39,16,1,2,15,16,0,11,16, +5,2,9,88,148,8,36,40,57,40,9,223,0,33,49,39,20,120,145,2,1, +39,16,1,2,15,16,0,11,16,5,2,12,88,148,8,36,40,59,40,9,223, +0,33,50,39,20,120,145,2,1,39,16,1,2,15,16,0,11,16,5,2,6, +88,148,8,36,40,61,42,9,223,0,33,51,39,20,120,145,2,1,39,16,1, +2,15,16,1,33,52,11,16,5,2,5,88,148,8,36,40,57,40,9,223,0, +33,53,39,20,120,145,2,1,39,16,1,2,15,16,0,11,16,0,94,2,17, +2,18,93,2,17,9,9,39,9,0}; + EVAL_ONE_SIZED_STR((char *)expr, 2088); } { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,53,84,0,0,0,0,0,0,0,0, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,54,84,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,194,0,0,0,1,0,0,8,0, 16,0,29,0,34,0,51,0,63,0,85,0,114,0,158,0,164,0,173,0,180, 0,195,0,213,0,225,0,241,0,255,0,21,1,41,1,48,1,82,1,99,1, @@ -1047,7 +1047,7 @@ EVAL_ONE_SIZED_STR((char *)expr, 19776); } { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,53,84,0,0,0,0,0,0,0,0, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,54,84,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,1,0,0,8,0, 23,0,48,0,65,0,83,0,105,0,128,0,149,0,171,0,180,0,189,0,196, 0,205,0,212,0,0,0,247,1,0,0,3,1,5,105,110,115,112,48,76,35, @@ -1078,7 +1078,7 @@ EVAL_ONE_SIZED_STR((char *)expr, 577); } { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,53,84,0,0,0,0,0,0,0,0, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,54,84,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,103,0,0,0,1,0,0,8,0, 15,0,26,0,53,0,59,0,68,0,75,0,97,0,110,0,136,0,153,0,175, 0,183,0,195,0,210,0,226,0,244,0,9,1,21,1,37,1,60,1,84,1, @@ -1545,31 +1545,31 @@ EVAL_ONE_SIZED_STR((char *)expr, 9739); } { - SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,53,84,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,1,0,0,8,0, + SHARED_OK static MZCOMPILED_STRING_FAR unsigned char expr[] = {35,126,9,54,46,50,46,57,48,48,46,54,84,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,1,0,0,8,0, 18,0,24,0,38,0,52,0,64,0,84,0,98,0,113,0,126,0,131,0,134, -0,141,0,150,0,235,0,242,0,12,1,0,0,202,1,0,0,3,1,5,105, -110,115,112,48,71,35,37,98,117,105,108,116,105,110,67,113,117,111,116,101,29, -94,2,3,70,35,37,107,101,114,110,101,108,11,29,94,2,3,70,35,37,101, -120,112,111,98,115,11,29,94,2,3,68,35,37,98,111,111,116,11,29,94,2, -3,76,35,37,112,108,97,99,101,45,115,116,114,117,99,116,11,29,94,2,3, -70,35,37,112,97,114,97,109,122,11,29,94,2,3,71,35,37,110,101,116,119, -111,114,107,11,29,94,2,3,69,35,37,117,116,105,108,115,11,38,11,93,2, -12,36,12,39,38,13,93,143,2,14,39,38,14,16,3,39,2,15,2,2,36, -15,151,40,2,14,143,2,16,16,4,2,4,39,39,2,1,143,2,16,16,4, -2,5,39,39,2,1,143,2,16,16,4,2,6,39,39,2,1,143,2,16,16, -4,2,7,39,39,2,1,143,2,16,16,4,2,8,39,39,2,1,143,2,16, -16,4,2,9,39,39,2,1,143,2,16,16,4,2,10,39,39,2,1,16,0, -38,16,143,2,15,2,11,18,143,16,2,143,10,16,3,9,2,11,2,13,143, -11,16,3,9,9,2,13,16,3,9,9,9,144,39,20,120,145,2,1,39,16, -1,11,16,0,20,26,15,56,9,2,2,2,2,29,11,11,11,11,11,11,11, -9,9,11,11,11,33,17,39,80,143,39,39,20,120,145,2,1,39,16,0,16, -0,40,42,39,16,0,39,16,0,39,11,11,11,16,0,16,0,16,0,39,39, -40,12,11,11,16,0,16,0,16,0,39,39,11,12,11,11,16,0,16,0,16, -0,39,39,16,0,104,2,4,2,5,29,94,2,3,71,35,37,102,111,114,101, -105,103,110,11,29,94,2,3,70,35,37,117,110,115,97,102,101,11,29,94,2, -3,71,35,37,102,108,102,120,110,117,109,11,2,6,2,7,2,8,2,9,2, -10,29,94,2,3,69,35,37,112,108,97,99,101,11,29,94,2,3,71,35,37, -102,117,116,117,114,101,115,11,9,9,9,39,9,0}; - EVAL_ONE_SIZED_STR((char *)expr, 538); +0,146,0,229,0,236,0,6,1,0,0,196,1,0,0,3,1,5,105,110,115, +112,48,71,35,37,98,117,105,108,116,105,110,67,113,117,111,116,101,29,94,2, +3,70,35,37,107,101,114,110,101,108,11,29,94,2,3,70,35,37,101,120,112, +111,98,115,11,29,94,2,3,68,35,37,98,111,111,116,11,29,94,2,3,76, +35,37,112,108,97,99,101,45,115,116,114,117,99,116,11,29,94,2,3,70,35, +37,112,97,114,97,109,122,11,29,94,2,3,71,35,37,110,101,116,119,111,114, +107,11,29,94,2,3,69,35,37,117,116,105,108,115,11,38,11,93,2,12,36, +12,39,38,13,93,143,16,3,39,2,14,2,2,39,36,14,150,40,143,2,15, +16,4,2,4,39,39,2,1,143,2,15,16,4,2,5,39,39,2,1,143,2, +15,16,4,2,6,39,39,2,1,143,2,15,16,4,2,7,39,39,2,1,143, +2,15,16,4,2,8,39,39,2,1,143,2,15,16,4,2,9,39,39,2,1, +143,2,15,16,4,2,10,39,39,2,1,16,0,38,15,143,2,14,2,11,18, +143,16,2,143,10,16,3,9,2,11,2,13,143,11,16,3,9,9,2,13,16, +3,9,9,9,144,39,20,120,145,2,1,39,16,1,11,16,0,20,26,15,56, +9,2,2,2,2,29,11,11,11,11,11,11,11,9,9,11,11,11,33,16,39, +80,143,39,39,20,120,145,2,1,39,16,0,16,0,40,42,39,16,0,39,16, +0,39,11,11,11,16,0,16,0,16,0,39,39,40,12,11,11,16,0,16,0, +16,0,39,39,11,12,11,11,16,0,16,0,16,0,39,39,16,0,104,2,4, +2,5,29,94,2,3,71,35,37,102,111,114,101,105,103,110,11,29,94,2,3, +70,35,37,117,110,115,97,102,101,11,29,94,2,3,71,35,37,102,108,102,120, +110,117,109,11,2,6,2,7,2,8,2,9,2,10,29,94,2,3,69,35,37, +112,108,97,99,101,11,29,94,2,3,71,35,37,102,117,116,117,114,101,115,11, +9,9,9,39,9,0}; + EVAL_ONE_SIZED_STR((char *)expr, 530); } diff --git a/racket/src/racket/src/schvers.h b/racket/src/racket/src/schvers.h index 0d7ef942dc..98eab0e1b4 100644 --- a/racket/src/racket/src/schvers.h +++ b/racket/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "6.2.900.5" +#define MZSCHEME_VERSION "6.2.900.6" #define MZSCHEME_VERSION_X 6 #define MZSCHEME_VERSION_Y 2 #define MZSCHEME_VERSION_Z 900 -#define MZSCHEME_VERSION_W 5 +#define MZSCHEME_VERSION_W 6 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) diff --git a/racket/src/racket/src/syntax.c b/racket/src/racket/src/syntax.c index 39b7b640e4..85f14d2c38 100644 --- a/racket/src/racket/src/syntax.c +++ b/racket/src/racket/src/syntax.c @@ -723,6 +723,20 @@ static Scheme_Object *new_multi_scope(Scheme_Object *debug_name) return (Scheme_Object *)multi_scope; } +static void repair_scope_owner(Scheme_Object *m) +{ + Scheme_Object *multi_scope; + + /* The owner scope might be missing due to broken bytecode. For + non-broken bytecode, there shouldn't be a way to reach a + scope withough going through its owner. Work around the + broken scope object by creating a new owner. */ + + multi_scope = new_multi_scope(scheme_false); + scheme_hash_set((Scheme_Hash_Table *)multi_scope, scheme_make_integer(0), m); + ((Scheme_Scope_With_Owner *)m)->owner_multi_scope = multi_scope; +} + Scheme_Object *scheme_scope_printed_form(Scheme_Object *m) { int kind = ((Scheme_Scope *)m)->id & SCHEME_STX_SCOPE_KIND_MASK; @@ -757,15 +771,20 @@ Scheme_Object *scheme_scope_printed_form(Scheme_Object *m) if (SCHEME_SCOPE_HAS_OWNER((Scheme_Scope *)m)) { Scheme_Object *multi_scope = ((Scheme_Scope_With_Owner *)m)->owner_multi_scope; - name = scheme_eq_hash_get((Scheme_Hash_Table *)multi_scope, scheme_void); - if (!name) name = scheme_false; - - if (SCHEME_TL_MULTI_SCOPEP(multi_scope)) - kind_sym = top_symbol; - - vec = scheme_make_vector(4, NULL); - SCHEME_VEC_ELS(vec)[2] = name; - SCHEME_VEC_ELS(vec)[3] = ((Scheme_Scope_With_Owner *)m)->phase; + if (multi_scope) { + name = scheme_eq_hash_get((Scheme_Hash_Table *)multi_scope, scheme_void); + if (!name) name = scheme_false; + + if (SCHEME_TL_MULTI_SCOPEP(multi_scope)) + kind_sym = top_symbol; + + vec = scheme_make_vector(4, NULL); + SCHEME_VEC_ELS(vec)[2] = name; + SCHEME_VEC_ELS(vec)[3] = ((Scheme_Scope_With_Owner *)m)->phase; + } else { + /* owner is either missing (bad bytecode) or hasn't been loaded on demand */ + vec = scheme_make_vector(2, NULL); + } } else { vec = scheme_make_vector(2, NULL); } @@ -1136,6 +1155,8 @@ static Scheme_Scope_Table *do_scope_at_phase(Scheme_Scope_Table *st, Scheme_Obje if (SCHEME_SCOPEP(m) && SCHEME_SCOPE_HAS_OWNER((Scheme_Scope *)m)) { if (!SCHEME_FALSEP(phase)) phase = scheme_bin_minus(phase, ((Scheme_Scope_With_Owner *)m)->phase); + if (!((Scheme_Scope_With_Owner *)m)->owner_multi_scope) + repair_scope_owner(m); m = ((Scheme_Scope_With_Owner *)m)->owner_multi_scope; } @@ -5305,9 +5326,6 @@ void scheme_iterate_reachable_scopes(Scheme_Marshal_Tables *mt) } } - if (SCHEME_SCOPE_HAS_OWNER(scope)) - add_reachable_multi_scope(((Scheme_Scope_With_Owner *)scope)->owner_multi_scope, mt); - /* Check for any free-id mappings whose reachbility depended on `scope`: */ if (mt->pending_reachable_ids) { l = scheme_eq_hash_get(mt->pending_reachable_ids, (Scheme_Object *)scope); @@ -5677,7 +5695,7 @@ static Scheme_Object *marshal_bindings(Scheme_Object *l, Scheme_Marshal_Tables * Scheme_Object *scheme_scope_marshal_content(Scheme_Object *m, Scheme_Marshal_Tables *mt) { Scheme_Hash_Tree *ht; - Scheme_Object *v, *l, *r, *l2, *tab, *scopes, *key, *val, *ms; + Scheme_Object *v, *l, *r, *l2, *tab, *scopes, *key, *val; intptr_t i, j; if (!mt->identity_map) @@ -5687,11 +5705,6 @@ Scheme_Object *scheme_scope_marshal_content(Scheme_Object *m, Scheme_Marshal_Tab if (v) return v; - if (SCHEME_SCOPE_HAS_OWNER((Scheme_Scope *)m)) - ms = multi_scope_to_vector(((Scheme_Scope_With_Owner *)m)->owner_multi_scope, mt); - else - ms = NULL; - v = ((Scheme_Scope *)m)->bindings; if (v) { int count; @@ -5780,15 +5793,9 @@ Scheme_Object *scheme_scope_marshal_content(Scheme_Object *m, Scheme_Marshal_Tab } } - if (ms) - r = scheme_make_pair(ms, r); - v = scheme_make_pair(scheme_make_integer(SCHEME_SCOPE_KIND(m)), r); - } else { + } else v = scheme_make_integer(SCHEME_SCOPE_KIND(m)); - if (ms) - v = scheme_make_pair(v, scheme_make_pair(ms, scheme_false)); - } scheme_hash_set(mt->identity_map, m, v); @@ -6092,7 +6099,7 @@ Scheme_Object *scheme_syntax_to_datum(Scheme_Object *stx, int with_scopes, /* datum->syntax */ /*========================================================================*/ -#define return_NULL return NULL +#define return_NULL assert(0) // return NULL Scheme_Scope_Set *list_to_scope_set(Scheme_Object *l, Scheme_Unmarshal_Tables *ut) { @@ -6145,8 +6152,7 @@ static Scheme_Hash_Table *vector_to_multi_scope(Scheme_Object *mht, Scheme_Unmar multi_scope = (Scheme_Hash_Table *)new_multi_scope(SCHEME_VEC_ELS(mht)[len-1]); len -= 1; - /* A multi-scope can refer back to itself via one of its - scopes or free-id=? info: */ + /* A multi-scope can refer back to itself via free-id=? info: */ scheme_hash_set(ut->rns, mht, (Scheme_Object *)multi_scope); for (i = 0; i < len; i += 2) { @@ -6157,12 +6163,10 @@ static Scheme_Hash_Table *vector_to_multi_scope(Scheme_Object *mht, Scheme_Unmar if (!scope) return_NULL; if (!SCHEME_SCOPE_HAS_OWNER((Scheme_Scope *)scope)) return_NULL; - if (!((Scheme_Scope_With_Owner *)scope)->owner_multi_scope) - ((Scheme_Scope_With_Owner *)scope)->owner_multi_scope = (Scheme_Object *)multi_scope; - else if (!SAME_OBJ(((Scheme_Scope_With_Owner *)scope)->owner_multi_scope, - (Scheme_Object *)multi_scope)) + if (((Scheme_Scope_With_Owner *)scope)->owner_multi_scope) return_NULL; scheme_hash_set(multi_scope, SCHEME_VEC_ELS(mht)[i], scope); + ((Scheme_Scope_With_Owner *)scope)->owner_multi_scope = (Scheme_Object *)multi_scope; ((Scheme_Scope_With_Owner *)scope)->phase = SCHEME_VEC_ELS(mht)[i]; } @@ -6363,19 +6367,6 @@ Scheme_Object *scope_unmarshal_content(Scheme_Object *box, Scheme_Unmarshal_Tabl /* Since we've created the scope before unmarshaling its content, cycles among scopes are ok. */ - if (SCHEME_SCOPE_HAS_OWNER((Scheme_Scope *)m)) { - if (!SCHEME_PAIRP(c)) return_NULL; - r = (Scheme_Object *)vector_to_multi_scope(SCHEME_CAR(c), ut); - if (!r) return_NULL; - if (!((Scheme_Scope_With_Owner *)m)->owner_multi_scope) - ((Scheme_Scope_With_Owner *)m)->owner_multi_scope = r; - else if (!SAME_OBJ(r, ((Scheme_Scope_With_Owner *)m)->owner_multi_scope)) - return_NULL; - c = SCHEME_CDR(c); - if (SCHEME_FALSEP(c)) - c = NULL; - } - if (!c) return m; while (SCHEME_PAIRP(c)) {