summaryrefslogtreecommitdiff
path: root/compiler/dex/quick_compiler_callbacks.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-07-15 15:36:11 -0700
committer Ian Rogers <irogers@google.com> 2014-07-15 17:07:49 -0700
commite63db27db913f1a88e2095a1ee8239b2bb9124e8 (patch)
tree893dee6783bca6717259321a6e4ba029c9c123e2 /compiler/dex/quick_compiler_callbacks.cc
parent07b8441303ea82fca3cb85d71ecf8752d73cedd7 (diff)
Break apart header files.
Create libart-gtest for common runtime and compiler gtest routines. Rename CompilerCallbacksImpl that is quick compiler specific. Rename trace clock source constants to not use the overloaded profiler term. Change-Id: I4aac4bdc7e7850c68335f81e59a390133b54e933
Diffstat (limited to 'compiler/dex/quick_compiler_callbacks.cc')
-rw-r--r--compiler/dex/quick_compiler_callbacks.cc39
1 files changed, 39 insertions, 0 deletions
diff --git a/compiler/dex/quick_compiler_callbacks.cc b/compiler/dex/quick_compiler_callbacks.cc
new file mode 100644
index 0000000000..03bda78498
--- /dev/null
+++ b/compiler/dex/quick_compiler_callbacks.cc
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2011 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.
+ */
+
+#include "quick_compiler_callbacks.h"
+
+#include "quick/dex_file_to_method_inliner_map.h"
+#include "verifier/method_verifier-inl.h"
+#include "verification_results.h"
+
+namespace art {
+
+bool QuickCompilerCallbacks::MethodVerified(verifier::MethodVerifier* verifier) {
+ bool result = verification_results_->ProcessVerifiedMethod(verifier);
+ if (result) {
+ MethodReference ref = verifier->GetMethodReference();
+ method_inliner_map_->GetMethodInliner(ref.dex_file)
+ ->AnalyseMethodCode(verifier);
+ }
+ return result;
+}
+
+void QuickCompilerCallbacks::ClassRejected(ClassReference ref) {
+ verification_results_->AddRejectedClass(ref);
+}
+
+} // namespace art