diff options
author | 2020-11-06 13:39:54 +0000 | |
---|---|---|
committer | 2020-11-06 15:26:27 +0000 | |
commit | 8f2eb25ca40136a36a5d7002c8ca5a05723e334e (patch) | |
tree | 51778c592bdd3eb65d3fde8c21997eec30bd1e23 /compiler/optimizing/nodes.h | |
parent | 8411c5ddb824bae1d3202a3bc2e42c77d351e916 (diff) |
Remove NeedsDexCache logic from the compiler.
The compiled code and runtime stubs don't need to have direct access to
the dex cache anymore.
Test: test.py
Change-Id: Id3aab9b10445ba2599e1a9ffd8e36506a745bfec
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 9200689f27..ad56d31667 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2468,10 +2468,6 @@ class HInstruction : public ArenaObject<kArenaAllocInstruction> { return NeedsEnvironment() || IsCurrentMethod(); } - // Returns whether the code generation of the instruction will require to have access - // to the dex cache of the current method's declaring class via the current method. - virtual bool NeedsDexCacheOfDeclaringClass() const { return false; } - // Does this instruction have any use in an environment before // control flow hits 'other'? bool HasAnyEnvironmentUseBefore(HInstruction* other); @@ -4355,9 +4351,9 @@ class HNewInstance final : public HExpression<1> { QuickEntrypointEnum entrypoint_; }; -enum IntrinsicNeedsEnvironmentOrCache { - kNoEnvironmentOrCache, // Intrinsic does not require an environment or dex cache. - kNeedsEnvironmentOrCache // Intrinsic requires an environment or requires a dex cache. +enum IntrinsicNeedsEnvironment { + kNoEnvironment, // Intrinsic does not require an environment. + kNeedsEnvironment // Intrinsic requires an environment. }; enum IntrinsicSideEffects { @@ -4446,7 +4442,7 @@ class HInvoke : public HVariableInputSizeInstruction { } void SetIntrinsic(Intrinsics intrinsic, - IntrinsicNeedsEnvironmentOrCache needs_env_or_cache, + IntrinsicNeedsEnvironment needs_env, IntrinsicSideEffects side_effects, IntrinsicExceptions exceptions); @@ -4740,7 +4736,6 @@ class HInvokeStaticOrDirect final : public HInvoke { MethodLoadKind GetMethodLoadKind() const { return dispatch_info_.method_load_kind; } CodePtrLocation GetCodePtrLocation() const { return dispatch_info_.code_ptr_location; } bool IsRecursive() const { return GetMethodLoadKind() == MethodLoadKind::kRecursive; } - bool NeedsDexCacheOfDeclaringClass() const override; bool IsStringInit() const { return GetMethodLoadKind() == MethodLoadKind::kStringInit; } bool HasMethodAddress() const { return GetMethodLoadKind() == MethodLoadKind::kJitDirectAddress; } bool HasPcRelativeMethodLoadKind() const { @@ -4972,11 +4967,6 @@ class HInvokeInterface final : public HInvoke { return (obj == InputAt(0)) && !IsIntrinsic(); } - bool NeedsDexCacheOfDeclaringClass() const override { - // The assembly stub currently needs it. - return true; - } - size_t GetSpecialInputIndex() const { return GetNumberOfArguments(); } @@ -6535,10 +6525,6 @@ class HLoadClass final : public HInstruction { dex::TypeIndex GetTypeIndex() const { return type_index_; } const DexFile& GetDexFile() const { return dex_file_; } - bool NeedsDexCacheOfDeclaringClass() const override { - return GetLoadKind() == LoadKind::kRuntimeCall; - } - static SideEffects SideEffectsForArchRuntimeCalls() { return SideEffects::CanTriggerGC(); } @@ -6745,10 +6731,6 @@ class HLoadString final : public HInstruction { return true; } - bool NeedsDexCacheOfDeclaringClass() const override { - return GetLoadKind() == LoadKind::kRuntimeCall; - } - bool CanBeNull() const override { return false; } bool CanThrow() const override { return NeedsEnvironment(); } |