blob: 596b3c980204e178f74e948cbd241e45ee4c2aa5 [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
buzbee1fd33462013-03-25 13:40:45 -070020namespace art {
21
Nicolas Geoffray68a5fef2014-02-18 16:43:35 +000022class ArenaAllocator;
23class CompiledMethod;
24
buzbee1fd33462013-03-25 13:40:45 -070025class 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_