Various fixes to the interpreter. First 23 run-test tests pass.
- Factored out code to throw stack overflow error into its own method.
- Increased kStackOverflowReservedBytes to 10kB to support interpreter.
- Reordered return type checks to prevent type resolution with an
exception pending.
- Fixed field checks so they pass if the field is static or the object
is the declaring class.
- Suppressed using the interpreter for proxy methods.
Change-Id: Ide73ec928ab0aa7b31229c4e69679a35dd948e43
diff --git a/src/thread.h b/src/thread.h
index be7c673..4e1f0e7 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -106,11 +106,7 @@
class PACKED Thread {
public:
// Space to throw a StackOverflowError in.
-#if !defined(ART_USE_LLVM_COMPILER)
- static const size_t kStackOverflowReservedBytes = 4 * KB;
-#else // LLVM_x86 requires more memory to throw stack overflow exception.
- static const size_t kStackOverflowReservedBytes = 8 * KB;
-#endif
+ static const size_t kStackOverflowReservedBytes = 10 * KB;
// Creates a new native thread corresponding to the given managed peer.
// Used to implement Thread.start.
@@ -448,10 +444,14 @@
}
// Size of stack less any space reserved for stack overflow
- size_t GetStackSize() {
+ size_t GetStackSize() const {
return stack_size_ - (stack_end_ - stack_begin_);
}
+ byte* GetStackEnd() const {
+ return stack_end_;
+ }
+
// Set the stack end to that to be used during a stack overflow
void SetStackEndForStackOverflow() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);