GC_List_Push(&staticObjects, pointer);
}
+/* Is invoked by intern method Sys:force_garbage_collection */
+void Nit_gc_force_garbage_collection( void ) {
+ GC_enlarge_and_collect( 0 );
+}
else if n == once "copy_to".to_symbol then
s = "(void)memcpy(UNBOX_NativeString({regs[1]})+UNTAG_Int({regs[4]}), UNBOX_NativeString({regs[0]})+UNTAG_Int({regs[3]}), UNTAG_Int({regs[2]}));"
end
+ else if c == once "Sys".to_symbol then
+ if n == once "force_garbage_collection".to_symbol then
+ s = "Nit_gc_force_garbage_collection()"
+ end
else if n == once "object_id".to_symbol then
s = "TAG_Int((bigint)((obj_t){regs[0]})[1].object_id)"
else if n == once "sys".to_symbol then
--- /dev/null
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Copyright 2012 Alexis Laferrière <alexis.laf@xymus.net>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+var x = "foo"
+var y = "bar"
+sys.force_garbage_collection
+print x
+print y
+