summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/method_compiler.h
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-05-28 21:49:23 -0700
committer Shih-wei Liao <sliao@google.com> 2012-06-03 08:59:14 -0700
commitaf543476661966c83a1e1c4db4fbef0d9a2d3afa (patch)
tree25a85124f4f3ecc96292d8d9d74d70eb62be1f22 /src/compiler_llvm/method_compiler.h
parentcb8f890e0723c4c9379aaf5c58bc80096c043f21 (diff)
Lazy pushing shadow frame.
Function: aget v0, v1, v2 return v0 Original: push shadow frame; if (null pointer) { throw; pop shadow frame; unwind; } if (index out of bounds) { throw; pop shadow frame; unwind; } load from array; pop shadow frame; return; New: if (null pointer) { push shadow frame; throw; pop shadow frame; unwind; } if (index out of bounds) { push shadow frame; throw; pop shadow frame; unwind; } load from array; return; Change-Id: I7fc0ff12b9a5454f8e1491b9ce1cdef3afcbed23
Diffstat (limited to 'src/compiler_llvm/method_compiler.h')
-rw-r--r--src/compiler_llvm/method_compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler_llvm/method_compiler.h b/src/compiler_llvm/method_compiler.h
index 9e4c81b5b8..44ab863c4a 100644
--- a/src/compiler_llvm/method_compiler.h
+++ b/src/compiler_llvm/method_compiler.h
@@ -264,6 +264,7 @@ class MethodCompiler {
void EmitMarkGCCard(llvm::Value* value, llvm::Value* target_addr);
// Shadow frame helper function
+ void EmitPushShadowFrame(bool is_inline);
void EmitPopShadowFrame();
void EmitUpdateDexPC(uint32_t dex_pc);
@@ -430,6 +431,7 @@ class MethodCompiler {
bool has_invoke;
bool need_shadow_frame_entry;
bool need_shadow_frame;
+ bool lazy_push_shadow_frame;
};
MethodInfo method_info_;
@@ -474,6 +476,9 @@ class MethodCompiler {
llvm::AllocaInst* jvalue_temp_;
llvm::Value* old_shadow_frame_;
+ llvm::Value* already_pushed_shadow_frame_;
+ uint32_t shadow_frame_size_;
+
uint16_t elf_func_idx_;
};