diff options
author | Pekka Enberg <penberg@kernel.org> | 2013-03-24 17:02:20 +0000 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2013-03-24 17:03:06 +0000 |
commit | e7e4faf6a7c2ff765942dcc1e33f4ae138c1dcb5 (patch) | |
tree | e23dfa8cb7c9f250f5f54b9db818f01126a65b89 | |
parent | 196b35cbe2a183da94ebc28170095c6d21961c99 (diff) | |
download | jato-e7e4faf6a7c2ff765942dcc1e33f4ae138c1dcb5.tar.gz |
vm: Fix VM method API naming
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r-- | arch/x86/emit_32.c | 2 | ||||
-rw-r--r-- | arch/x86/emit_64.c | 2 | ||||
-rw-r--r-- | arch/x86/inline-cache.c | 2 | ||||
-rw-r--r-- | arch/x86/insn-selector_32.brg | 2 | ||||
-rw-r--r-- | arch/x86/insn-selector_64.brg | 2 | ||||
-rw-r--r-- | include/vm/method.h | 11 | ||||
-rw-r--r-- | jit/emit.c | 6 | ||||
-rw-r--r-- | jit/invoke-bc.c | 2 | ||||
-rw-r--r-- | jit/trace-jit.c | 4 |
9 files changed, 14 insertions, 19 deletions
diff --git a/arch/x86/emit_32.c b/arch/x86/emit_32.c index 8d69e0b7..2bcb5da1 100644 --- a/arch/x86/emit_32.c +++ b/arch/x86/emit_32.c @@ -939,7 +939,7 @@ void emit_trampoline(struct compilation_unit *cu, MACH_REG_ECX); __emit_test_membase_reg(buf, MACH_REG_ECX, 0, MACH_REG_ECX); - if (method_is_virtual(cu->method)) { + if (vm_method_is_virtual(cu->method)) { __emit_push_reg(buf, MACH_REG_EAX); __emit_push_membase(buf, MACH_REG_EBP, 0x08); diff --git a/arch/x86/emit_64.c b/arch/x86/emit_64.c index d240257b..17895894 100644 --- a/arch/x86/emit_64.c +++ b/arch/x86/emit_64.c @@ -1355,7 +1355,7 @@ void emit_trampoline(struct compilation_unit *cu, MACH_REG_RCX); __emit64_test_membase_reg(buf, MACH_REG_RCX, 0, MACH_REG_RCX); - if (method_is_virtual(cu->method)) { + if (vm_method_is_virtual(cu->method)) { unsigned long this_disp; if (vm_method_is_jni(cu->method)) diff --git a/arch/x86/inline-cache.c b/arch/x86/inline-cache.c index 5c49a5c0..5b0dd9c6 100644 --- a/arch/x86/inline-cache.c +++ b/arch/x86/inline-cache.c @@ -78,7 +78,7 @@ bool ic_supports_method(struct vm_method *vmm) { assert(vmm != NULL); - return method_is_virtual(vmm) + return vm_method_is_virtual(vmm) && !vm_method_is_native(vmm) && !vm_method_is_special(vmm) && vmm->class diff --git a/arch/x86/insn-selector_32.brg b/arch/x86/insn-selector_32.brg index 95bd4817..4b9f841b 100644 --- a/arch/x86/insn-selector_32.brg +++ b/arch/x86/insn-selector_32.brg @@ -2511,7 +2511,7 @@ static void select_trace_return_value(struct basic_block *s, struct var_info *edx = get_fixed_var(s->b_parent, MACH_REG_xDX); struct var_info *esp = get_fixed_var(s->b_parent, MACH_REG_xSP); - enum vm_type ret_vm_type = method_return_type(vmm); + enum vm_type ret_vm_type = vm_method_return_type(vmm); if (ret_vm_type == J_FLOAT) { select_insn(s, tree, imm_reg_insn(INSN_SUB_IMM_REG, 4, esp)); diff --git a/arch/x86/insn-selector_64.brg b/arch/x86/insn-selector_64.brg index 06261f2c..40a43401 100644 --- a/arch/x86/insn-selector_64.brg +++ b/arch/x86/insn-selector_64.brg @@ -2306,7 +2306,7 @@ static void select_trace_return_value(struct basic_block *s, struct var_info *rax, *rdi, *rsi; enum vm_type ret_vm_type; - ret_vm_type = method_return_type(vmm); + ret_vm_type = vm_method_return_type(vmm); /* FIXME: floating point return values are not supported */ diff --git a/include/vm/method.h b/include/vm/method.h index 6885f637..a06da3c8 100644 --- a/include/vm/method.h +++ b/include/vm/method.h @@ -114,22 +114,17 @@ static inline bool vm_method_is_abstract(struct vm_method *vmm) return vmm->method->access_flags & CAFEBABE_METHOD_ACC_ABSTRACT; } -static inline bool method_is_synchronized(struct vm_method *vmm) +static inline bool vm_method_is_synchronized(struct vm_method *vmm) { return vmm->method->access_flags & CAFEBABE_METHOD_ACC_SYNCHRONIZED; } -static inline bool method_is_private(struct vm_method *vmm) -{ - return vmm->method->access_flags & CAFEBABE_METHOD_ACC_PRIVATE; -} - static inline bool vm_method_is_constructor(struct vm_method *vmm) { return strcmp(vmm->name, "<init>") == 0; } -static inline bool method_is_virtual(struct vm_method *vmm) +static inline bool vm_method_is_virtual(struct vm_method *vmm) { if (vm_method_is_constructor(vmm)) return false; @@ -170,7 +165,7 @@ static inline bool vm_method_is_compiled(struct vm_method *vmm) return compilation_unit_is_compiled(vmm->compilation_unit); } -static inline enum vm_type method_return_type(struct vm_method *method) +static inline enum vm_type vm_method_return_type(struct vm_method *method) { char *return_type = index(method->type, ')') + 1; return str_to_type(return_type); @@ -210,7 +210,7 @@ int emit_machine_code(struct compilation_unit *cu) emit_prolog(cu->objcode, cu->stack_frame, frame_size); - if (method_is_synchronized(cu->method)) + if (vm_method_is_synchronized(cu->method)) emit_monitorenter(cu, frame_size); if (opt_trace_invoke) @@ -220,13 +220,13 @@ int emit_machine_code(struct compilation_unit *cu) emit_body(bb, cu->objcode); emit_body(cu->exit_bb, cu->objcode); - if (method_is_synchronized(cu->method)) + if (vm_method_is_synchronized(cu->method)) emit_monitorexit(cu, frame_size); cu->exit_past_unlock_ptr = buffer_current(cu->objcode); emit_epilog(cu->objcode); emit_body(cu->unwind_bb, cu->objcode); - if (method_is_synchronized(cu->method)) + if (vm_method_is_synchronized(cu->method)) emit_monitorexit(cu, frame_size); cu->unwind_past_unlock_ptr = buffer_current(cu->objcode); emit_unwind(cu->objcode); diff --git a/jit/invoke-bc.c b/jit/invoke-bc.c index 729a1ec6..4b708770 100644 --- a/jit/invoke-bc.c +++ b/jit/invoke-bc.c @@ -171,7 +171,7 @@ static struct statement * invoke_stmt(struct parse_context *ctx, stmt->target_method = target; - return_type = method_return_type(target); + return_type = vm_method_return_type(target); switch (return_type) { case J_VOID: stmt->invoke_result = NULL; diff --git a/jit/trace-jit.c b/jit/trace-jit.c index 0e117799..05a3f15e 100644 --- a/jit/trace-jit.c +++ b/jit/trace-jit.c @@ -165,7 +165,7 @@ void print_compilation(struct vm_method *vmm) else comp_char = ' '; - if (method_is_synchronized(vmm)) + if (vm_method_is_synchronized(vmm)) sync_char = 's'; else sync_char = ' '; @@ -878,7 +878,7 @@ void trace_return_value(struct vm_method *vmm, unsigned long long value) gate_level--; dummy = 0; - type = method_return_type(vmm); + type = vm_method_return_type(vmm); trace_printf("trace return: %s.%s%s\n", vmm->class->name, vmm->name, vmm->type); |