Changeset 622
- Timestamp:
- 09/04/10 19:16:57 (17 months ago)
- Location:
- interpreter/trunk
- Files:
-
- 4 added
- 7 edited
-
backend/common/kite_lexer.l (modified) (1 diff)
-
backend/common/kite_parser.y (modified) (4 diffs)
-
backend/kite-vm-1.0/kite_execute.c (modified) (1 diff)
-
docs/version.texi (modified) (1 diff)
-
modules/Makefile.am (modified) (1 diff)
-
modules/System/object.c (modified) (2 diffs)
-
modules/inherit_list.kt (added)
-
tests/check_tests.sh (modified) (1 diff)
-
tests/declarations/_inherit_defs.kt (added)
-
tests/declarations/inherit_list_multiple.kt (added)
-
tests/declarations/inherit_list_multiple.kt.out (added)
Legend:
- Unmodified
- Added
- Removed
-
interpreter/trunk/backend/common/kite_lexer.l
r617 r622 92 92 null { fillBoth(yyscanner); return NULL_VALUE; } 93 93 version { fillBoth(yyscanner); return VERSION_KEYWORD; } 94 options[ \t\r\n]+set { fillBoth(yyscanner); return OPTIONS_SET; } 94 95 95 96 "<<" { fillBoth(yyscanner); return LEFT_SHIFT; } -
interpreter/trunk/backend/common/kite_parser.y
r619 r622 54 54 extern int yylex(void *, void *, void *); 55 55 56 /* Need to grab dylib path from compiler. TODO: use separate method to manipulate. */ 57 extern char *kite_dylib_path; 56 58 %} 57 59 … … 111 113 %token REGEX_VALUE_CI 112 114 %token ARRAY_SET 115 %token OPTIONS_SET 113 116 114 117 /* Needed since we can't quite lay out the associativity using the rules yet. */ … … 182 185 statement: 183 186 | data_manipulation_statement 187 | options_set_statement 184 188 | loop_statement 185 189 | from_statement … … 196 200 | operator_definition 197 201 ; 198 202 203 options_set_statement: OPTIONS_SET STRING_VALUE STRING_VALUE { 204 if (strcmp("import_path", $<stringValue>2) == 0) 205 { 206 /* TODO: thread safety */ 207 char *old_kite_dylib_path = kite_dylib_path; 208 #ifndef HAVE_GC_H 209 kite_dylib_path = malloc(strlen(old_kite_dylib_path) + strlen($<stringValue>3) + 2); 210 #else 211 kite_dylib_path = GC_malloc(strlen(old_kite_dylib_path) + strlen($<stringValue>3) + 2); 212 #endif 213 strcpy(kite_dylib_path, old_kite_dylib_path); 214 strcat(kite_dylib_path, ":"); 215 strcat(kite_dylib_path, $<stringValue>3); 216 } 217 else 218 { 219 /* TODO: throw exception if no valid option found. */ 220 } 221 }; 222 199 223 import_statement: IMPORT STRING_VALUE { 200 224 kite_compiler_t *compiler = (kite_compiler_t*)yyget_extra(parm); -
interpreter/trunk/backend/kite-vm-1.0/kite_execute.c
r619 r622 447 447 KITE_FIND_ANY_IN_SYMTAB(entry, curr->object_data.properties, name); 448 448 if (entry) { 449 if ((!entry->global && obj != curr ) ||449 if ((!entry->global && obj != curr && curr->type != OBJ_INSTANCE) || 450 450 (entry->value && entry->value->type == OBJ_METHOD && 451 451 obj != curr)) { -
interpreter/trunk/docs/version.texi
r621 r622 1 @set UPDATED 21December 20081 @set UPDATED 16 December 2008 2 2 @set UPDATED-MONTH December 2008 3 3 @set EDITION 1.0.4 -
interpreter/trunk/modules/Makefile.am
r594 r622 21 21 interface/text.kt interface/text/readline.kt interface/text/base64.kt \ 22 22 interface/text/binary.kt interface/pop3.kt interface/smtp.kt all_modules.kt \ 23 System/compile_options.kt System/package/builder.kt local-pkgs/blank.kt 23 System/compile_options.kt System/package/builder.kt local-pkgs/blank.kt inherit_list.kt 24 24 25 25 AM_CFLAGS = -Wdeclaration-after-statement -Wextra -fno-omit-frame-pointer -ISystem/digest/ -I../objs -I../backend/common -fPIC -W -Wall -DCINVOKE_BUILD -
interpreter/trunk/modules/System/object.c
r619 r622 777 777 778 778 kite_add_method(thd, this, KITE_GET_STRING_VALUE(name), method); 779 } 780 781 /***************************************************************************** 782 * Call method on given object. 783 ****************************************************************************/ 784 KITE_CLASS_METHOD(Object_callWithObject) 785 { 786 kite_object_t *method, *a; 787 788 KITE_GET_METHOD_ARGUMENT(method, 1); 789 KITE_GET_METHOD_ARGUMENT(a, 2); 790 791 if (method->type == OBJ_METHOD) 792 { 793 kite_vm_call_object(thd, this, method, a); 794 } 795 else 796 { 797 kite_vm_call_method(thd, this, KITE_GET_STRING_VALUE(method), a, TRUE); 798 } 779 799 } 780 800 … … 899 919 "name", "The method's name.", 900 920 "numargs", "The number of arguments of the given method.")); 921 kite_add_method(thread, newclass, "call_with_object", 922 kite_new_method_compiled_with_docs(thread, Object_callWithObject, 923 "Calls the given method with the given arguments.", 2, 924 "m", "The method object or name to call.", 925 "args", "The list of method arguments to pass in.")); 901 926 kite_add_method(thread, newclass, "get_destructor", 902 927 kite_new_method_compiled_with_docs(thread, Object_getDestructor, -
interpreter/trunk/tests/check_tests.sh
r570 r622 18 18 rm -f $LOC/test.log 19 19 cd $LOC/tmp/lib/kite 20 for i in `find $LOC/tests -name ' *.kt' | grep -v '.svn'`; do20 for i in `find $LOC/tests -name '[A-Za-z]*.kt' | grep -v '.svn'`; do 21 21 echo -n "$i: " 22 22 echo "$i:" >>$LOC/test.log
Note: See TracChangeset
for help on using the changeset viewer.
