From 9320675cb21a53b3dd59d80d440a96e04c84f28d Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Tue, 17 Jan 2017 13:20:55 +0000 Subject: [PATCH] MethodHandles: Remove experimental flag. Runtime::IsMethodHandlesEnabled now always returns true. This change also removes the (now unnecessary) run scripts for method handle tests. Note that the --experimental=method-handles flag is left in place for the test build steps (etc/default-build) because it's still a convenient way to supply arguments to jack / smali. Test: make test-art-host Change-Id: I8475c7b8ac2615ac382a06ce54be39dce3cc7713 --- cmdline/cmdline_types.h | 2 -- runtime/class_linker_test.cc | 1 - runtime/mirror/dex_cache_test.cc | 1 - runtime/parsed_options.cc | 2 -- runtime/runtime.h | 2 +- runtime/runtime_options.def | 2 +- test/953-invoke-polymorphic-compiler/run | 20 -------------------- test/954-invoke-polymorphic-verifier/run | 20 -------------------- test/955-methodhandles-smali/run | 20 -------------------- test/956-methodhandles/run | 20 -------------------- test/957-methodhandle-transforms/run | 20 -------------------- test/958-methodhandle-emulated-stackframe/run | 20 -------------------- test/959-invoke-polymorphic-accessors/run | 20 -------------------- 13 files changed, 2 insertions(+), 148 deletions(-) delete mode 100755 test/953-invoke-polymorphic-compiler/run delete mode 100755 test/954-invoke-polymorphic-verifier/run delete mode 100755 test/955-methodhandles-smali/run delete mode 100755 test/956-methodhandles/run delete mode 100755 test/957-methodhandle-transforms/run delete mode 100755 test/958-methodhandle-emulated-stackframe/run delete mode 100644 test/959-invoke-polymorphic-accessors/run diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h index e41d9bde5..28c009edf 100644 --- a/cmdline/cmdline_types.h +++ b/cmdline/cmdline_types.h @@ -770,8 +770,6 @@ struct CmdlineType : CmdlineTypeParser { existing = existing | ExperimentalFlags::kAgents; } else if (option == "runtime-plugins") { existing = existing | ExperimentalFlags::kRuntimePlugins; - } else if (option == "method-handles") { - existing = existing | ExperimentalFlags::kMethodHandles; } else { return Result::Failure(std::string("Unknown option '") + option + "'"); } diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc index b8306f30d..bbe7280bb 100644 --- a/runtime/class_linker_test.cc +++ b/runtime/class_linker_test.cc @@ -460,7 +460,6 @@ class ClassLinkerMethodHandlesTest : public ClassLinkerTest { protected: virtual void SetUpRuntimeOptions(RuntimeOptions* options) OVERRIDE { CommonRuntimeTest::SetUpRuntimeOptions(options); - options->push_back(std::make_pair("-Xexperimental:method-handles", nullptr)); } }; diff --git a/runtime/mirror/dex_cache_test.cc b/runtime/mirror/dex_cache_test.cc index 916f1cf1e..8f978e122 100644 --- a/runtime/mirror/dex_cache_test.cc +++ b/runtime/mirror/dex_cache_test.cc @@ -35,7 +35,6 @@ class DexCacheMethodHandlesTest : public DexCacheTest { protected: virtual void SetUpRuntimeOptions(RuntimeOptions* options) OVERRIDE { CommonRuntimeTest::SetUpRuntimeOptions(options); - options->push_back(std::make_pair("-Xexperimental:method-handles", nullptr)); } }; diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc index e1022b000..a72159bc8 100644 --- a/runtime/parsed_options.cc +++ b/runtime/parsed_options.cc @@ -763,8 +763,6 @@ void ParsedOptions::Usage(const char* fmt, ...) { "(Enable new and experimental agent support)\n"); UsageMessage(stream, " -Xexperimental:agents" "(Enable new and experimental agent support)\n"); - UsageMessage(stream, " -Xexperimental:method-handles" - "(Enable new and experimental method handles support)\n"); UsageMessage(stream, "\n"); UsageMessage(stream, "The following previously supported Dalvik options are ignored:\n"); diff --git a/runtime/runtime.h b/runtime/runtime.h index 8fc211c6a..a87e1c136 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -304,7 +304,7 @@ class Runtime { } bool IsMethodHandlesEnabled() const { - return experimental_flags_ & ExperimentalFlags::kMethodHandles; + return true; } void DisallowNewSystemWeaks() REQUIRES_SHARED(Locks::mutator_lock_); diff --git a/runtime/runtime_options.def b/runtime/runtime_options.def index d1970fe7a..ecabf9adc 100644 --- a/runtime/runtime_options.def +++ b/runtime/runtime_options.def @@ -117,7 +117,7 @@ RUNTIME_OPTIONS_KEY (unsigned int, ZygoteMaxFailedBoots, 10) RUNTIME_OPTIONS_KEY (Unit, NoDexFileFallback) RUNTIME_OPTIONS_KEY (std::string, CpuAbiList) RUNTIME_OPTIONS_KEY (std::string, Fingerprint) -RUNTIME_OPTIONS_KEY (ExperimentalFlags, Experimental, ExperimentalFlags::kNone) // -Xexperimental:{none, agents, method-handles} +RUNTIME_OPTIONS_KEY (ExperimentalFlags, Experimental, ExperimentalFlags::kNone) // -Xexperimental:{none, agents} RUNTIME_OPTIONS_KEY (std::vector, AgentLib) // -agentlib:=, Requires -Xexperimental:agents RUNTIME_OPTIONS_KEY (std::vector, AgentPath) // -agentpath:=, Requires -Xexperimental:agents RUNTIME_OPTIONS_KEY (std::vector, Plugins) // -Xplugin: Requires -Xexperimental:runtime-plugins diff --git a/test/953-invoke-polymorphic-compiler/run b/test/953-invoke-polymorphic-compiler/run deleted file mode 100755 index a9f182288..000000000 --- a/test/953-invoke-polymorphic-compiler/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -./default-run "$@" --experimental method-handles diff --git a/test/954-invoke-polymorphic-verifier/run b/test/954-invoke-polymorphic-verifier/run deleted file mode 100755 index a9f182288..000000000 --- a/test/954-invoke-polymorphic-verifier/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -./default-run "$@" --experimental method-handles diff --git a/test/955-methodhandles-smali/run b/test/955-methodhandles-smali/run deleted file mode 100755 index a9f182288..000000000 --- a/test/955-methodhandles-smali/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -./default-run "$@" --experimental method-handles diff --git a/test/956-methodhandles/run b/test/956-methodhandles/run deleted file mode 100755 index a9f182288..000000000 --- a/test/956-methodhandles/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -./default-run "$@" --experimental method-handles diff --git a/test/957-methodhandle-transforms/run b/test/957-methodhandle-transforms/run deleted file mode 100755 index a9f182288..000000000 --- a/test/957-methodhandle-transforms/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -./default-run "$@" --experimental method-handles diff --git a/test/958-methodhandle-emulated-stackframe/run b/test/958-methodhandle-emulated-stackframe/run deleted file mode 100755 index a9f182288..000000000 --- a/test/958-methodhandle-emulated-stackframe/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -./default-run "$@" --experimental method-handles diff --git a/test/959-invoke-polymorphic-accessors/run b/test/959-invoke-polymorphic-accessors/run deleted file mode 100644 index a9f182288..000000000 --- a/test/959-invoke-polymorphic-accessors/run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -./default-run "$@" --experimental method-handles -- 2.11.0