Index: uspace/app/sbi/src/run_expr.c
===================================================================
--- uspace/app/sbi/src/run_expr.c	(revision d0febca9f86b5690d11fec7c645836a758567fe6)
+++ uspace/app/sbi/src/run_expr.c	(revision b535aebfcb7a8ea104bc8714a16879753bb853d0)
@@ -43,4 +43,5 @@
 #include "stree.h"
 #include "strtab.h"
+#include "tdata.h"
 
 #include "run_expr.h"
@@ -72,7 +73,7 @@
 static void run_new(run_t *run, stree_new_t *new_op, rdata_item_t **res);
 static void run_new_array(run_t *run, stree_new_t *new_op,
-    rdata_titem_t *titem, rdata_item_t **res);
+    tdata_item_t *titem, rdata_item_t **res);
 static void run_new_object(run_t *run, stree_new_t *new_op,
-    rdata_titem_t *titem, rdata_item_t **res);
+    tdata_item_t *titem, rdata_item_t **res);
 
 static void run_access(run_t *run, stree_access_t *access, rdata_item_t **res);
@@ -199,5 +200,5 @@
 		assert(csi != NULL);
 	} else {
-		csi = proc_ar->proc_sym->outer_csi;
+		csi = proc_ar->proc->outer_symbol->outer_csi;
 		obj = NULL;
 	}
@@ -231,7 +232,7 @@
 			printf("Error: Cannot access non-static member "
 			    "function '");
-			symbol_print_fqn(run->program, sym);
+			symbol_print_fqn(sym);
 			printf("' from nested CSI '");
-			symbol_print_fqn(run->program, csi_sym);
+			symbol_print_fqn(csi_sym);
 			printf("'.\n");
 			exit(1);
@@ -267,7 +268,7 @@
 			printf("Error: Cannot access non-static member "
 			    "variable '");
-			symbol_print_fqn(run->program, sym);
+			symbol_print_fqn(sym);
 			printf("' from nested CSI '");
-			symbol_print_fqn(run->program, csi_sym);
+			symbol_print_fqn(csi_sym);
 			printf("'.\n");
 			exit(1);
@@ -632,5 +633,5 @@
 static void run_new(run_t *run, stree_new_t *new_op, rdata_item_t **res)
 {
-	rdata_titem_t *titem;
+	tdata_item_t *titem;
 
 #ifdef DEBUG_RUN_TRACE
@@ -638,5 +639,6 @@
 #endif
 	/* Evaluate type expression */
-	run_texpr(run, new_op->texpr, &titem);
+	run_texpr(run->program, run_get_current_csi(run), new_op->texpr,
+	    &titem);
 
 	switch (titem->tic) {
@@ -644,5 +646,5 @@
 		run_new_array(run, new_op, titem, res);
 		break;
-	case tic_tcsi:
+	case tic_tobject:
 		run_new_object(run, new_op, titem, res);
 		break;
@@ -656,7 +658,7 @@
 /** Create new array. */
 static void run_new_array(run_t *run, stree_new_t *new_op,
-    rdata_titem_t *titem, rdata_item_t **res)
-{
-	rdata_tarray_t *tarray;
+    tdata_item_t *titem, rdata_item_t **res)
+{
+	tdata_array_t *tarray;
 	rdata_array_t *array;
 	rdata_var_t *array_var;
@@ -744,5 +746,5 @@
 /** Create new object. */
 static void run_new_object(run_t *run, stree_new_t *new_op,
-    rdata_titem_t *titem, rdata_item_t **res)
+    tdata_item_t *titem, rdata_item_t **res)
 {
 	rdata_object_t *obj;
@@ -764,6 +766,6 @@
 
 	/* Lookup object CSI. */
-	assert(titem->tic == tic_tcsi);
-	csi = titem->u.tcsi->csi;
+	assert(titem->tic == tic_tobject);
+	csi = titem->u.tobject->csi;
 	csi_sym = csi_to_symbol(csi);
 
@@ -823,5 +825,5 @@
 	printf("Run access operation on pre-evaluated base.\n");
 #endif
-	vc = rdata_item_get_vc(arg);
+	vc = run_item_get_vc(run, arg);
 
 	switch (vc) {
@@ -883,5 +885,5 @@
 	if (member == NULL) {
 		printf("Error: CSI '");
-		symbol_print_fqn(run->program, deleg_v->sym);
+		symbol_print_fqn(deleg_v->sym);
 		printf("' has no member named '%s'.\n",
 		    strtab_get_str(access->member_name->sid));
@@ -936,5 +938,5 @@
 	if (member == NULL) {
 		printf("Error: Object of class '");
-		symbol_print_fqn(run->program, object->class_sym);
+		symbol_print_fqn(object->class_sym);
 		printf("' has no member named '%s'.\n",
 		    strtab_get_str(access->member_name->sid));
@@ -1030,5 +1032,5 @@
 #ifdef DEBUG_RUN_TRACE
 	printf("Call function '");
-	symbol_print_fqn(run->program, deleg_v->sym);
+	symbol_print_fqn(deleg_v->sym);
 	printf("'\n");
 #endif
@@ -1050,6 +1052,5 @@
 
 	/* Create procedure activation record. */
-	run_proc_ar_create(run, deleg_v->obj, deleg_v->sym, fun->body,
-	    &proc_ar);
+	run_proc_ar_create(run, deleg_v->obj, fun->proc, &proc_ar);
 
 	/* Fill in argument values. */
@@ -1080,5 +1081,5 @@
 	run_expr(run, index->base, &rbase);
 
-	vc = rdata_item_get_vc(rbase);
+	vc = run_item_get_vc(run, rbase);
 
 	/* Implicitly dereference. */
@@ -1089,5 +1090,5 @@
 	}
 
-	vc = rdata_item_get_vc(base_i);
+	vc = run_item_get_vc(run, base_i);
 
 	/* Evaluate arguments (indices). */
@@ -1224,5 +1225,4 @@
 	printf("Run object index operation.\n");
 #endif
-	(void) run;
 	(void) index;
 
@@ -1252,4 +1252,10 @@
 	indexer_sym = symbol_search_csi(run->program, obj_csi, indexer_ident);
 
+	if (indexer_sym == NULL) {
+		printf("Error: Accessing object which does not have an "
+		    "indexer.\n");
+		exit(1);
+	}
+
 	/* Construct delegate. */
 	object_d = rdata_deleg_new();
