libs-steptalk/Languages/Smalltalk/STExecutionContext.m

120 lines
2.2 KiB
Mathematica
Raw Normal View History

/**
STExecutionContext.m
Copyright (c) 2002 Free Software Foundation
This file is part of the StepTalk project.
*/
#import "STExecutionContext.h"
#import "STMethodContext.h"
#import "STStack.h"
#import <Foundation/NSDebug.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSString.h>
static unsigned nextId = 1;
* STEngine.h: Fixed declaration to match implementation to avoid compiler warnings. * STEnvironment.h: Ditto. * STScriptsManager.h: Ditto. * STLanguage.h: Corrected declaration. * STScriptsManager.m: Added needed interface declaration. * GNUmakefile: Added flags to show all warnings except for import. * Module/ObjectiveC/GNUmakefile: Added flags to show all warnings except for import. * Module/Foundation/GNUmakefile: Added flags to show all warnings except for import. * Module/AppKit/AppKitExceptions.m: Used variable to supress compiler warnings. * Module/AppKit/AppKitNotifications.m: Ditto. * Module/AppKit/GNUmakefile: Added flags to show all warnings except for import. * Module/GDL2/GDL2Constants.m: Used variable to supress compiler warnings. * Module/GDL2/GNUmakefile: Added flags to show all warnings except for import. * Module/SimpleTranscripts/GNUmakefile: Added flags to show all warnings except for import. * Module/StepTalk/GNUmakefile: Added flags to show all warnings except for import. * Tools/stalk.m: Added needed interface declaration. * Tools/stupdate_languages.m: Corrected variable declaration and added cast. ApplicationScripting * GNUmakefile: Added flags to be able to compile from the building directories and show all warnings except for import. * NSApplication+additions.m: Added import of needed headers. Added interface declarations to supress compiler warnings. Commented unused variables to supress compiler warnings. Corrected variable types and added necessary casts. * STScriptingSupport.m: Added interface declaraions to supress compiler warnings. Examples/Shell * GNUmakefile: Added flags to show all warnings except for import. * STShell.m: Unified name for private categories. Examples/Server * ChangeLog: Added new file. * GNUmakefile: Added flags to show all warnings except for import. Languages/Smalltalk/ChangeLog * GNUmakefile: Added flags to show all warnings except for import. * STBlock.m: Initialzed variables to supress compiler warnings. * STCompiledMethod.m: Added needed import. * STCompiler.m: Added missing declaration. Wrapped declarations only needed for DEBUG into #ifdefs to supress compiler warnings. Initialzed variables to supress compiler warnings. * STExecutionContext.m: Unified name for private categories. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@16351 72102866-910b-0410-8b05-ffd578937521
2003-04-04 10:57:04 +00:00
@interface STExecutionContext(STPrivateMethods)
- (unsigned)contextId;
@end
@implementation STExecutionContext
- initWithStackSize:(unsigned)stackSize
{
[super init];
stack = [[STStack alloc] initWithSize:stackSize];
contextId = nextId ++;
return self;
}
- (void)dealloc
{
RELEASE(stack);
[super dealloc];
}
- (unsigned)contextId
{
return contextId;
}
- (NSString *)description
{
NSMutableString *str;
str = [NSMutableString stringWithFormat:
@"%@ %i (home %i)",
[self className],
contextId,
[[self homeContext] contextId]];
return str;
}
- (void)invalidate
{
[self subclassResponsibility:_cmd];
}
- (BOOL)isValid
{
[self subclassResponsibility:_cmd];
return NO;
}
- (unsigned)instructionPointer
{
return instructionPointer;
}
- (void)setInstructionPointer:(unsigned)value
{
instructionPointer = value;
}
- (STMethodContext *)homeContext
{
[self subclassResponsibility:_cmd];
return nil;
}
- (void)setHomeContext:(STMethodContext *)newContext
{
[self subclassResponsibility:_cmd];
}
- (STStack *)stack
{
return stack;
}
- (BOOL)isBlockContext;
{
[self subclassResponsibility:_cmd];
return NO;
}
- (id)temporaryAtIndex:(unsigned)index
{
[self subclassResponsibility:_cmd];
return nil;
}
- (void)setTemporary:anObject atIndex:(unsigned)index
{
[self subclassResponsibility:_cmd];
}
- (NSString *)referenceNameAtIndex:(unsigned)index
{
[self subclassResponsibility:_cmd];
return nil;
}
- (STBytecodes *)bytecodes
{
[self subclassResponsibility:_cmd];
return nil;
}
- (id)literalObjectAtIndex:(unsigned)index
{
[self subclassResponsibility:_cmd];
return nil;
}
- (id)receiver
{
[self subclassResponsibility:_cmd];
return nil;
}
@end