Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #3 from noahgibbs/rtl_mjit_mac
Minor Mac and CLang type fixes, add extra files to .gitignore
  • Loading branch information
vnmakarov committed Sep 29, 2017
2 parents c779631 + ea50c74 commit 21bbbd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -182,3 +182,6 @@ y.tab.c
# /win32/
/win32/*.ico
/win32/.time
rb_mjit_header.h
rb_mjit_import.h
rb_mjit_min_header-*.h
6 changes: 3 additions & 3 deletions mjit.c
Expand Up @@ -1416,7 +1416,7 @@ translate_iseq_insn(FILE *f, size_t pos, struct rb_mjit_unit_iseq *ui,
&& (local_cc.call == vm_call_ivar || local_cc.call == vm_call_attrset)
&& local_cc.aux.index > 0) {
ptrdiff_t call_start = code[pos + 2];
int call_ivar_obj_op = features.recv_p ? code[pos + 2] : code[pos + 3];
long call_ivar_obj_op = features.recv_p ? code[pos + 2] : code[pos + 3];
const char *rec = (insn == BIN(simple_call_self)
? "&cfp->self" : get_op_str(buf, call_ivar_obj_op, tcp));
assert(insn == BIN(simple_call_recv) || insn == BIN(simple_call) || insn == BIN(simple_call_self) || insn == BIN(call_super));
Expand Down Expand Up @@ -2638,7 +2638,7 @@ mjit_store_failed_spec_insn(rb_iseq_t *iseq, size_t pc, int mutation_num) {
insn = rb_vm_insn_addr2insn((void *) insn);
#endif
ui->mutation_insns[mutation_num].pc = pc;
ui->mutation_insns[mutation_num].insn = insn;
ui->mutation_insns[mutation_num].insn = (enum ruby_vminsn_type)insn;
}

/* It is called when our whole function speculation about ivar
Expand Down Expand Up @@ -2994,7 +2994,7 @@ unit_iseq_compare(const void *el1, const void *el2) {

if (overall_calls2 < overall_calls1) return -1;
if (overall_calls1 < overall_calls2) return 1;
return (long) ui2->iseq_size - (long) ui1->iseq_size;
return (int)((long) ui2->iseq_size - (long) ui1->iseq_size);
}

/* Allocate and return a new array of done unit iseqs sorted
Expand Down

0 comments on commit 21bbbd3

Please sign in to comment.