From d4e2aa22eb0f8f8d982cb4d54ecbb72547b4e400 Mon Sep 17 00:00:00 2001 From: "asiva@google.com" Date: Fri, 27 Apr 2012 01:10:10 +0000 Subject: [PATCH] Changes to allow for -O2 compiles on macos in debug builds. Review URL: https://chromiumcodereview.appspot.com//10180013 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7052 260f80e4-7a28-3924-810f-c04153c831b5 --- runtime/platform/thread_macos.cc | 7 ++++++- runtime/vm/compiler.cc | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/runtime/platform/thread_macos.cc b/runtime/platform/thread_macos.cc index 4dd208bac3f..28620d484b5 100644 --- a/runtime/platform/thread_macos.cc +++ b/runtime/platform/thread_macos.cc @@ -71,7 +71,12 @@ int Thread::Start(ThreadStartFunction function, uword parameter) { result = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); RETURN_ON_PTHREAD_FAILURE(result); - result = pthread_attr_setstacksize(&attr, 128 * KB); +#ifdef DEBUG + const int kStackSize = (256 * KB); +#else + const int kStackSize = (128 * KB); +#endif + result = pthread_attr_setstacksize(&attr, kStackSize); RETURN_ON_PTHREAD_FAILURE(result); ThreadStartData* data = new ThreadStartData(function, parameter); diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc index 7536f0ce285..c6e914474ed 100644 --- a/runtime/vm/compiler.cc +++ b/runtime/vm/compiler.cc @@ -85,7 +85,6 @@ static void ExtractTypeFeedback(const Code& code, RawError* Compiler::Compile(const Library& library, const Script& script) { Isolate* isolate = Isolate::Current(); - Error& error = Error::Handle(); LongJump* base = isolate->long_jump_base(); LongJump jump; isolate->set_long_jump_base(&jump); @@ -99,12 +98,17 @@ RawError* Compiler::Compile(const Library& library, const Script& script) { const String& library_key = String::Handle(library.private_key()); script.Tokenize(library_key); Parser::ParseCompilationUnit(library, script); + isolate->set_long_jump_base(base); + return Error::null(); } else { + Error& error = Error::Handle(); error = isolate->object_store()->sticky_error(); isolate->object_store()->clear_sticky_error(); + isolate->set_long_jump_base(base); + return error.raw(); } - isolate->set_long_jump_base(base); - return error.raw(); + UNREACHABLE(); + return Error::null(); }