diff options
author | Dave Allison <dallison@google.com> | 2014-03-13 19:24:47 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-03-13 19:24:47 +0000 |
commit | 135ce2ea28e98df624aa071688bd01e0dadf2f62 (patch) | |
tree | 034d820c4829e0dcf6161473cc39f7250123bfaa /runtime/gc | |
parent | 9545a446e99b22248099fe66f5f9431530c20851 (diff) | |
parent | b373e091eac39b1a79c11f2dcbd610af01e9e8a9 (diff) | |
download | art-135ce2ea28e98df624aa071688bd01e0dadf2f62.zip art-135ce2ea28e98df624aa071688bd01e0dadf2f62.tar.gz art-135ce2ea28e98df624aa071688bd01e0dadf2f62.tar.bz2 |
Merge "Implicit null/suspend checks (oat version bump)"
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/space/image_space.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/runtime/gc/space/image_space.cc b/runtime/gc/space/image_space.cc index ca5b5a9..5480639 100644 --- a/runtime/gc/space/image_space.cc +++ b/runtime/gc/space/image_space.cc @@ -67,6 +67,37 @@ static bool GenerateImage(const std::string& image_file_name, std::string* error arg_vector.push_back("--runtime-arg"); arg_vector.push_back("-Xmx64m"); + arg_vector.push_back("--runtime-arg"); + std::string checkstr = "-implicit-checks"; + int nchecks = 0; + char checksep = ':'; + + if (!Runtime::Current()->ExplicitNullChecks()) { + checkstr += checksep; + checksep = ','; + checkstr += "null"; + ++nchecks; + } + if (!Runtime::Current()->ExplicitSuspendChecks()) { + checkstr += checksep; + checksep = ','; + checkstr += "suspend"; + ++nchecks; + } + + if (!Runtime::Current()->ExplicitStackOverflowChecks()) { + checkstr += checksep; + checksep = ','; + checkstr += "stack"; + ++nchecks; + } + + if (nchecks == 0) { + checkstr += ":none"; + } + + arg_vector.push_back(checkstr); + for (size_t i = 0; i < boot_class_path.size(); i++) { arg_vector.push_back(std::string("--dex-file=") + boot_class_path[i]); } |