Skip to content

Commit f7ba2fa

Browse files
authored
Merge pull request #10 from xyproto/strings
Minor changes to strings and comments
2 parents b8aebf5 + d5fae32 commit f7ba2fa

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ main(int argc, char **argv)
125125
}
126126

127127
if(optind >= argc) {
128-
fprintf(stderr, "Need .bc file to parse/run\n");
128+
fprintf(stderr, "Please provide a .wasm or .bc file as the first argument.\n");
129129
exit(1);
130130
}
131131

src/vmir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ vmir_load(ir_unit_t *iu, const uint8_t *u8, int len)
914914
break;
915915

916916
case 0xdec04342: // LLVM Bitcode
917-
// Webassembly need memory at 0. Bitcode dont really.
917+
// WebAssembly need memory at 0. Bitcode don't really.
918918
iu->iu_data_ptr = 4096;
919919
ir_parse_blocks(iu, 2, NULL, NULL, &bs);
920920
break;

src/vmir.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ vmir_errcode_t vmir_load(ir_unit_t *iu, const uint8_t *bitcode,
166166

167167
/**
168168
* Destroy the environment and free all resources except the memory
169-
* passed in to vmir_create(). THe user is responsible for freeing this
169+
* passed in to vmir_create(). The user is responsible for freeing this
170170
* memory.
171171
*
172172
* After this the ir_unit is also free'd and no longer available
@@ -300,7 +300,7 @@ uint32_t vmir_mem_copy(ir_unit_t *iu, const void *data, size_t size);
300300
void vmir_mem_free(ir_unit_t *iu, uint32_t addr);
301301

302302
/**
303-
* Filedescriptors
303+
* File descriptors
304304
*/
305305
#define VMIR_FD_TYPE_FILEHANDLE 1
306306
#define VMIR_FD_TYPE_SOCKET 2

src/vmir_bitcode_instr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ parse_call_or_invoke(ir_unit_t *iu, unsigned int argc, const int64_t *argv,
474474
fnty = type_get(iu, type_get_pointee(iu, fn->iv_type));
475475
break;
476476
default:
477-
parser_error(iu, "Funcation call via value '%s' not supported",
477+
parser_error(iu, "Function call via value '%s' not supported",
478478
value_str(iu, fn));
479479
break;
480480
}

src/vmir_jit_arm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ jit_emit_conditional_branch(ir_unit_t *iu, int true_bb, int false_bb, int pred,
10631063

10641064
if(tib->ib_jit) {
10651065
if(tib->ib_only_jit_sucessors && TAILQ_NEXT(curbb, ib_link) == tib) {
1066-
// Jumping to consecustive BB can be skipped
1066+
// Jumping to consecutive BB can be skipped
10671067
false_cond = armcond(invert_pred(pred));
10681068
may_push_pool = 0;
10691069
} else {
@@ -1080,7 +1080,7 @@ jit_emit_conditional_branch(ir_unit_t *iu, int true_bb, int false_bb, int pred,
10801080

10811081
if(fib->ib_jit) {
10821082
if(fib->ib_only_jit_sucessors && TAILQ_NEXT(curbb, ib_link) == fib) {
1083-
// Jumping to consecustive BB can be skipped
1083+
// Jumping to consecutive BB can be skipped
10841084
may_push_pool = 0;
10851085
} else {
10861086
// Jumping to another JITen instruction, emit a branch
@@ -1129,7 +1129,7 @@ jit_br(ir_unit_t *iu, ir_instr_br_t *ii, jitctx_t *jc, ir_bb_t *curbb)
11291129
ir_bb_t *ib = bb_find(iu->iu_current_function, ii->true_branch);
11301130
if(ib->ib_jit) {
11311131
if(TAILQ_NEXT(curbb, ib_link) == ib && ib->ib_only_jit_sucessors) {
1132-
// Jumping to consecustive BB can be skipped
1132+
// Jumping to consecutive BB can be skipped
11331133
return;
11341134
}
11351135
// Jumping to another JITed BB, emit a branch

src/vmir_transform.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ break_critical_edge(ir_function_t *f, ir_bb_edge_t *ibe)
11821182
// Create new edge from new bb to target bb
11831183
cfg_add_edge(f, nb, to->ib_id, 0);
11841184

1185-
// Adjust final instrction of previous bb to point to new bb
1185+
// Adjust final instruction of previous bb to point to new bb
11861186
bb_change_branch(from, to, nb, f);
11871187

11881188
ir_instr_t *ii;
@@ -2645,7 +2645,7 @@ static void
26452645
legalize_aggregate_insertval(ir_unit_t *iu, ir_instr_insertval_t *ins)
26462646
{
26472647
if(ins->num_indicies != 1) {
2648-
parser_error(iu, "Unable to legalize insertval with %d indicies",
2648+
parser_error(iu, "Unable to legalize insertval with %d indices",
26492649
ins->num_indicies);
26502650
}
26512651

@@ -2722,7 +2722,7 @@ legalize_aggregate(ir_unit_t *iu, ir_value_t *iv)
27222722
ir_instr_extractval_t *iie = (ir_instr_extractval_t *)ii;
27232723

27242724
if(iie->num_indicies != 1) {
2725-
parser_error(iu, "Unable to legalize extractval with %d indicies",
2725+
parser_error(iu, "Unable to legalize extractval with %d indices",
27262726
iie->num_indicies);
27272727
}
27282728

src/vmir_vm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3624,7 +3624,7 @@ emit_br(ir_unit_t *iu, ir_instr_br_t *ii, ir_bb_t *currentib)
36243624
if(ii->condition.value == -1) {
36253625
ir_bb_t *next = TAILQ_NEXT(currentib, ib_link);
36263626
if(next != NULL && next->ib_id == ii->true_branch) {
3627-
// Jump to next bb is NOP as basic-blocks are contigous in memory
3627+
// Jump to next bb is NOP as basic-blocks are contiguous in memory
36283628
VECTOR_POP(&iu->iu_branch_fixups);
36293629
return;
36303630
}
@@ -3806,12 +3806,12 @@ emit_move(ir_unit_t *iu, ir_instr_move_t *ii)
38063806

38073807
if(v1->iv_reg + 4 != v2->iv_reg ||
38083808
ii->super.ii_rets[0].type != ii->super.ii_rets[1].type)
3809-
parser_error(iu, "Bad aggregate destionation for move");
3809+
parser_error(iu, "Bad aggregate destination for move");
38103810

38113811
const ir_type_t *ty = type_get(iu, ii->super.ii_rets[0].type);
38123812
typecode = legalize_type(ty);
38133813
if(typecode != IR_TYPE_INT32)
3814-
parser_error(iu, "Bad aggregate destionation type for move");
3814+
parser_error(iu, "Bad aggregate destination type for move");
38153815

38163816
// Merge to one 64bit reg
38173817
retreg = value_reg(v1);

0 commit comments

Comments
 (0)