Changeset 3bacee1 in mainline for uspace/app/sbi
- Timestamp:
- 2018-04-12T16:27:17Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3cf22f9
- Parents:
- 76d0981d
- git-author:
- Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
- Location:
- uspace/app/sbi/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/sbi/src/run_expr.c
r76d0981d r3bacee1 311 311 assert(csi != NULL); 312 312 313 if (symbol_search_csi(run->program, csi, nameref->name) 314 ==NULL) {313 if (symbol_search_csi(run->program, csi, nameref->name) == 314 NULL) { 315 315 /* Function is not in the current object. */ 316 316 printf("Error: Cannot access non-static member " … … 349 349 assert(csi != NULL); 350 350 351 if (symbol_search_csi(run->program, csi, nameref->name) 352 ==NULL && !stree_symbol_is_static(sym)) {351 if (symbol_search_csi(run->program, csi, nameref->name) == 352 NULL && !stree_symbol_is_static(sym)) { 353 353 /* Symbol is not in the current object. */ 354 354 printf("Error: Cannot access non-static member " … … 1271 1271 switch (unop->uc) { 1272 1272 case uo_plus: 1273 1273 bigint_clone(&val->var->u.int_v->value, &int_v->value); 1274 1274 break; 1275 1275 case uo_minus: … … 1318 1318 c2 = &v2->var->u.char_v->value; 1319 1319 1320 1320 bigint_sub(c1, c2, &diff); 1321 1321 *res = bigint_is_zero(&diff); 1322 1322 break; … … 1438 1438 } 1439 1439 1440 i = 0; length = 1; 1440 i = 0; 1441 length = 1; 1441 1442 while (node != NULL) { 1442 1443 expr = list_node_data(node, stree_expr_t *); … … 1567 1568 *res = run_recovery_item(run); 1568 1569 goto cleanup; 1569 1570 } 1570 1571 1571 1572 if (rarg == NULL) { … … 2755 2756 2756 2757 switch (rarg_vi->u.value->var->vc) { 2757 case vc_bool: csi_sym = bi->boxed_bool; break; 2758 case vc_char: csi_sym = bi->boxed_char; break; 2759 case vc_int: csi_sym = bi->boxed_int; break; 2760 case vc_string: csi_sym = bi->boxed_string; break; 2758 case vc_bool: 2759 csi_sym = bi->boxed_bool; 2760 break; 2761 case vc_char: 2762 csi_sym = bi->boxed_char; 2763 break; 2764 case vc_int: 2765 csi_sym = bi->boxed_int; 2766 break; 2767 case vc_string: 2768 csi_sym = bi->boxed_string; 2769 break; 2761 2770 2762 2771 case vc_ref: -
uspace/app/sbi/src/stype_expr.c
r76d0981d r3bacee1 151 151 152 152 switch (expr->ec) { 153 case ec_nameref: stype_nameref(stype, expr->u.nameref, &et); break; 154 case ec_literal: stype_literal(stype, expr->u.literal, &et); break; 155 case ec_self_ref: stype_self_ref(stype, expr->u.self_ref, &et); break; 156 case ec_binop: stype_binop(stype, expr->u.binop, &et); break; 157 case ec_unop: stype_unop(stype, expr->u.unop, &et); break; 158 case ec_new: stype_new(stype, expr->u.new_op, &et); break; 159 case ec_access: stype_access(stype, expr->u.access, &et); break; 160 case ec_call: stype_call(stype, expr->u.call, &et); break; 161 case ec_index: stype_index(stype, expr->u.index, &et); break; 162 case ec_assign: stype_assign(stype, expr->u.assign, &et); break; 163 case ec_as: stype_as(stype, expr->u.as_op, &et); break; 164 case ec_box: stype_box(stype, expr->u.box, &et); break; 153 case ec_nameref: 154 stype_nameref(stype, expr->u.nameref, &et); 155 break; 156 case ec_literal: 157 stype_literal(stype, expr->u.literal, &et); 158 break; 159 case ec_self_ref: 160 stype_self_ref(stype, expr->u.self_ref, &et); 161 break; 162 case ec_binop: 163 stype_binop(stype, expr->u.binop, &et); 164 break; 165 case ec_unop: 166 stype_unop(stype, expr->u.unop, &et); 167 break; 168 case ec_new: 169 stype_new(stype, expr->u.new_op, &et); 170 break; 171 case ec_access: 172 stype_access(stype, expr->u.access, &et); 173 break; 174 case ec_call: 175 stype_call(stype, expr->u.call, &et); 176 break; 177 case ec_index: 178 stype_index(stype, expr->u.index, &et); 179 break; 180 case ec_assign: 181 stype_assign(stype, expr->u.assign, &et); 182 break; 183 case ec_as: 184 stype_as(stype, expr->u.as_op, &et); 185 break; 186 case ec_box: 187 stype_box(stype, expr->u.box, &et); 188 break; 165 189 } 166 190 … … 362 386 363 387 switch (literal->ltc) { 364 case ltc_bool: tpc = tpc_bool; break; 365 case ltc_char: tpc = tpc_char; break; 366 case ltc_int: tpc = tpc_int; break; 367 case ltc_ref: tpc = tpc_nil; break; 368 case ltc_string: tpc = tpc_string; break; 388 case ltc_bool: 389 tpc = tpc_bool; 390 break; 391 case ltc_char: 392 tpc = tpc_char; 393 break; 394 case ltc_int: 395 tpc = tpc_int; 396 break; 397 case ltc_ref: 398 tpc = tpc_nil; 399 break; 400 case ltc_string: 401 tpc = tpc_string; 402 break; 369 403 } 370 404 … … 1771 1805 * conversion destination. 1772 1806 */ 1773 if (stype_targs_check_equal(stype, pred_ti, as_op->arg->titem) 1774 !=EOK) {1807 if (stype_targs_check_equal(stype, pred_ti, as_op->arg->titem) != 1808 EOK) { 1775 1809 stype_convert_failure(stype, convc_as, as_op->arg, titem); 1776 1810 *rtitem = titem;
Note:
See TracChangeset
for help on using the changeset viewer.