blob: 01959b77f5810de991ee1f79b2f9f8387a2c05df [file] [log] [blame]
buzbee1fd33462013-03-25 13:40:45 -07001/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Brian Carlstromfc0e3212013-07-17 14:40:12 -070017#ifndef ART_COMPILER_DEX_BACKEND_H_
18#define ART_COMPILER_DEX_BACKEND_H_
buzbee1fd33462013-03-25 13:40:45 -070019
20#include "compiled_method.h"
buzbee862a7602013-04-05 10:58:54 -070021#include "arena_allocator.h"
buzbee1fd33462013-03-25 13:40:45 -070022
23namespace art {
24
25class Backend {
buzbee1fd33462013-03-25 13:40:45 -070026 public:
Brian Carlstrom9b7085a2013-07-18 15:15:21 -070027 virtual ~Backend() {}
buzbee1fd33462013-03-25 13:40:45 -070028 virtual void Materialize() = 0;
29 virtual CompiledMethod* GetCompiledMethod() = 0;
30
31 protected:
Brian Carlstrom9b7085a2013-07-18 15:15:21 -070032 explicit Backend(ArenaAllocator* arena) : arena_(arena) {}
Ian Rogers6282dc12013-04-18 15:54:02 -070033 ArenaAllocator* const arena_;
buzbee1fd33462013-03-25 13:40:45 -070034}; // Class Backend
35
36} // namespace art
37
Brian Carlstromfc0e3212013-07-17 14:40:12 -070038#endif // ART_COMPILER_DEX_BACKEND_H_