From 881d313eb2688c7d6abefcbb7e060d9009842cca Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sat, 4 Oct 2008 17:10:07 +0200 Subject: Revert "Add class MLKContinuation." This reverts commit 7e5a799a46f6aca1525efa2df38026a1917f3edd. Conflicts: MLKContinuation.m Toilet Lisp.xcodeproj/project.pbxproj --- GNUmakefile | 1 - MLKContinuation.h | 37 ----------------------- MLKContinuation.m | 56 ----------------------------------- Toilet Lisp.xcodeproj/project.pbxproj | 8 ----- globals.h | 2 -- globals.m | 4 +-- 6 files changed, 1 insertion(+), 107 deletions(-) delete mode 100644 MLKContinuation.h delete mode 100644 MLKContinuation.m diff --git a/GNUmakefile b/GNUmakefile index a9984d9..c6bc134 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -65,7 +65,6 @@ ToiletKit_OBJC_FILES = functions.m globals.m MLKArray.m \ MLKBinaryStreamCharacterStream.m MLKBinding.m \ MLKCharacter.m MLKCharacterStream.m \ MLKCommaReader.m MLKCompiledClosure.m MLKCons.m \ - MLKContinuation.m \ MLKDoubleFloat.m \ MLKDispatchingMacroCharacterReader.m \ MLKDynamicContext.m MLKEnvironment.m \ diff --git a/MLKContinuation.h b/MLKContinuation.h deleted file mode 100644 index ca97f61..0000000 --- a/MLKContinuation.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- mode: objc; coding: utf-8 -*- */ -/* Toilet Lisp, a Common Lisp subset for the Étoilé runtime. - * Copyright (C) 2008 Matthias Andreas Benkard. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#import "MLKFuncallable.h" -#import "SCM/continue.h" - -#import - - -@interface MLKContinuation : NSObject -{ - CONTINUATION *_continuation; -} - -- (id)init; -+ (id)continuation; -+ (NSArray *)callWithCurrentContinuation:(id )function; - -- (NSArray *)applyToArray:(NSArray *)arguments; - -- (void)dealloc; -@end diff --git a/MLKContinuation.m b/MLKContinuation.m deleted file mode 100644 index 2c68c6e..0000000 --- a/MLKContinuation.m +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- mode: objc; coding: utf-8 -*- */ -/* Toilet Lisp, a Common Lisp subset for the Étoilé runtime. - * Copyright (C) 2008 Matthias Andreas Benkard. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#import "MLKContinuation.h" -#import "globals.h" -#import "util.h" - - -@implementation MLKContinuation -- (id)init -{ - self = [super init]; - _continuation = make_continuation (MLKRootContinuation); - setjump (_continuation->jmpbuf); - return self; -} - -+ (id)continuation -{ - return LAUTORELEASE ([[self alloc] init]); -} - -+ (NSArray *)callWithCurrentContinuation:(id )function -{ - id cont = [self continuation]; - return [function applyToArray:[NSArray arrayWithObject:cont]]; -} - -- (NSArray *)applyToArray:(NSArray *)arguments -{ - throw_to_continuation (_continuation, (long)arguments, MLKRootContinuation); - return nil; -} - -- (void)dealloc -{ - // ... _continuation->other ... (only if CONTINUATION_OTHER is defined in scmflags.h) - free_continuation (_continuation); - [super dealloc]; -} -@end diff --git a/Toilet Lisp.xcodeproj/project.pbxproj b/Toilet Lisp.xcodeproj/project.pbxproj index a8a7b8f..7e45fc9 100644 --- a/Toilet Lisp.xcodeproj/project.pbxproj +++ b/Toilet Lisp.xcodeproj/project.pbxproj @@ -173,8 +173,6 @@ A7E5C4A10E216C0F00A01D81 /* MLKNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = A7E5C49F0E216C0F00A01D81 /* MLKNumber.m */; }; A7E5C55C0E21740C00A01D81 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7E5C55B0E21740C00A01D81 /* Foundation.framework */; }; A7E5C55D0E21740C00A01D81 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7E5C55B0E21740C00A01D81 /* Foundation.framework */; }; - A7EE013F0E850E010024E903 /* MLKContinuation.h in Headers */ = {isa = PBXBuildFile; fileRef = A7EE013D0E850E010024E903 /* MLKContinuation.h */; }; - A7EE01400E850E010024E903 /* MLKContinuation.m in Sources */ = {isa = PBXBuildFile; fileRef = A7EE013E0E850E010024E903 /* MLKContinuation.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -459,8 +457,6 @@ A7E5C49E0E216C0F00A01D81 /* MLKNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLKNumber.h; sourceTree = ""; }; A7E5C49F0E216C0F00A01D81 /* MLKNumber.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLKNumber.m; sourceTree = ""; }; A7E5C55B0E21740C00A01D81 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - A7EE013D0E850E010024E903 /* MLKContinuation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MLKContinuation.h; sourceTree = ""; }; - A7EE013E0E850E010024E903 /* MLKContinuation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MLKContinuation.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -734,8 +730,6 @@ A7E5C4390E21695800A01D81 /* NSObject-MLKPrinting.m */, A7E5C43B0E21695800A01D81 /* NSString-MLKPrinting.m */, A72BC70A0E65EA1100486804 /* MLKListenerController.m */, - A7EE013D0E850E010024E903 /* MLKContinuation.h */, - A7EE013E0E850E010024E903 /* MLKContinuation.m */, ); name = "Source Files"; sourceTree = ""; @@ -811,7 +805,6 @@ A7A862920E6E776000021916 /* MLKNoSuchSymbolError.h in Headers */, A7A862940E6E776000021916 /* MLKStreamError.h in Headers */, A7A862960E6E776000021916 /* MLKUnboundVariableError.h in Headers */, - A7EE013F0E850E010024E903 /* MLKContinuation.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1024,7 +1017,6 @@ A7A862930E6E776000021916 /* MLKNoSuchSymbolError.m in Sources */, A7A862950E6E776000021916 /* MLKStreamError.m in Sources */, A7A862970E6E776000021916 /* MLKUnboundVariableError.m in Sources */, - A7EE01400E850E010024E903 /* MLKContinuation.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/globals.h b/globals.h index bd7ca5e..3dbda38 100644 --- a/globals.h +++ b/globals.h @@ -17,11 +17,9 @@ */ #import -#import "SCM/continue.h" extern id MLKEndOfArgumentsMarker; -extern CONTINUATION *MLKRootContinuation; extern id MLKDefaultCompiler; extern BOOL MLKLoadCompilesP; diff --git a/globals.m b/globals.m index e97ff56..8781620 100644 --- a/globals.m +++ b/globals.m @@ -20,8 +20,8 @@ #import + id MLKEndOfArgumentsMarker; -CONTINUATION *MLKRootContinuation; id MLKDefaultCompiler = nil; BOOL MLKLoadCompilesP = NO; @@ -34,8 +34,6 @@ BOOL MLKLoadCompilesP = NO; @implementation MLKGlobalManager +(void) load { - STACKITEM i; MLKEndOfArgumentsMarker = [[NSObject alloc] init]; - MLKRootContinuation = make_root_continuation (&i); } @end -- cgit v1.2.3