0
@@ -709,7 +709,8 @@ static bool valueIsTrue(id value)
0
id args = [[cdr cdr] car];
0
id body = [[cdr cdr] cdr];
0
NuBlock *block = [[NuBlock alloc] initWithParameters:args body:body context:context];
0
- [context setPossiblyNullObject:block forKey:symbol]; // this defines the function in the calling context
0
+ // this defines the function in the calling context
0
+ [context setPossiblyNullObject:block forKey:symbol];
0
// this defines the function in the block context, which allows recursion
0
[[block context] setPossiblyNullObject:block forKey:symbol];
0
@@ -745,7 +746,8 @@ static bool valueIsTrue(id value)
0
NuMacro *macro = [[NuMacro alloc] initWithName:name body:body];
0
- [context setPossiblyNullObject:macro forKey:name]; // this defines the function in the calling context
0
+ // this defines the function in the calling context
0
+ [context setPossiblyNullObject:macro forKey:name];
0
@@ -1144,6 +1146,7 @@ static bool valueIsTrue(id value)
0
@interface Nu_gets_operator : NuOperator {}
0
@@ -1156,6 +1159,7 @@ static bool valueIsTrue(id value)
0
@interface Nu_print_operator : NuOperator {}
0
@@ -1395,7 +1399,7 @@ id loadNuLibraryFile(NSString *nuFileName, id parser, id context, id symbolTable
0
NuSymbolTable *symbolTable = [context objectForKey:SYMBOLS_KEY];
0
id className = [cdr car];
0
+ #if
defined(__x86_64__) || defined(IPHONE)0
@@ -1410,7 +1414,7 @@ id loadNuLibraryFile(NSString *nuFileName, id parser, id context, id symbolTable
0
[NSException raise:@"NuUndefinedSuperclass" format:@"undefined superclass %@", [parentName stringValue]];
0
+ #if
defined(__x86_64__) || defined(IPHONE)0
newClass = objc_allocateClassPair(parentClass, [[className stringValue] cStringUsingEncoding:NSUTF8StringEncoding], 0);
0
childClass = [NuClass classWithClass:newClass];
0
[childClass setRegistered:NO];
0
@@ -1440,7 +1444,7 @@ id loadNuLibraryFile(NSString *nuFileName, id parser, id context, id symbolTable
0
result = [block evalWithArguments:Nu__null context:Nu__null];
0
+ #if
defined(__x86_64__) || defined(IPHONE)0
if (newClass && ([childClass isRegistered] == NO)) {
0
[childClass registerClass];
0
@@ -1492,7 +1496,7 @@ id loadNuLibraryFile(NSString *nuFileName, id parser, id context, id symbolTable
0
NuSymbolTable *symbolTable = [context objectForKey:SYMBOLS_KEY];
0
NuClass *classWrapper = [context objectForKey:[symbolTable symbolWithCString:"_class"]];
0
+ #if
defined(__x86_64__) || defined(IPHONE)0
// this will only work if the class is unregistered...
0
if ([classWrapper isRegistered]) {
0
[NSException raise:@"NuIvarAddedTooLate" format:@"instance variables must be added when a class is created and before any method declarations"];
0
@@ -1527,7 +1531,7 @@ id loadNuLibraryFile(NSString *nuFileName, id parser, id context, id symbolTable
0
NuSymbolTable *symbolTable = [context objectForKey:SYMBOLS_KEY];
0
NuClass *classWrapper = [context objectForKey:[symbolTable symbolWithCString:"_class"]];
0
+ #if
defined(__x86_64__) || defined(IPHONE)0
// this will only work if the class is unregistered...
0
if ([classWrapper isRegistered]) {
0
[NSException raise:@"NuIvarAddedTooLate" format:@"instance variables must be added when a class is created and before any method declarations"];
0
@@ -1756,8 +1760,8 @@ void load_builtins(NuSymbolTable *symbolTable)
0
install("car", Nu_car_operator);
0
install("cdr", Nu_cdr_operator);
0
- install("first", Nu_car_operator);
0
- install("rest", Nu_cdr_operator);
0
+ install("first", Nu_car_operator);
0
+ install("rest", Nu_cdr_operator);
0
install("head", Nu_car_operator);
0
install("tail", Nu_cdr_operator);
0
install("atom", Nu_atom_operator);
0
@@ -1825,7 +1829,9 @@ void load_builtins(NuSymbolTable *symbolTable)
0
install("do", Nu_do_operator);
0
install("gets", Nu_gets_operator);
0
install("puts", Nu_puts_operator);
0
install("print", Nu_print_operator);
Comments
No one has commented yet.