resolved conflicts for merge of 7940e44f to dalvik-dev

Change-Id: I6529b2fc27dfaedd2cb87b3697d049ccabed36ee
diff --git a/Android.mk b/Android.mk
index daff6cb..4ffa9ac 100644
--- a/Android.mk
+++ b/Android.mk
@@ -16,38 +16,8 @@
 
 LOCAL_PATH := $(call my-dir)
 
-# These can be overridden via the environment or by editing to
-# enable/disable certain build configuration.
-#
-# For example, to disable everything but the host debug build you use:
-#
-# (export ART_BUILD_TARGET_NDEBUG=false && export ART_BUILD_TARGET_DEBUG=false && export ART_BUILD_HOST_NDEBUG=false && ...)
-#
-# Beware that tests may use the non-debug build for performance, notable 055-enum-performance
-#
-ART_BUILD_TARGET_NDEBUG ?= true
-ART_BUILD_TARGET_DEBUG ?= true
-ART_BUILD_HOST_NDEBUG ?= true
-ART_BUILD_HOST_DEBUG ?= true
-
-ifeq ($(ART_BUILD_TARGET_NDEBUG),false)
-$(info Disabling ART_BUILD_TARGET_NDEBUG)
-endif
-ifeq ($(ART_BUILD_TARGET_DEBUG),false)
-$(info Disabling ART_BUILD_TARGET_DEBUG)
-endif
-ifeq ($(ART_BUILD_HOST_NDEBUG),false)
-$(info Disabling ART_BUILD_HOST_NDEBUG)
-endif
-ifeq ($(ART_BUILD_HOST_DEBUG),false)
-$(info Disabling ART_BUILD_HOST_DEBUG)
-endif
-
-ART_HOST_SHLIB_EXTENSION := $(HOST_SHLIB_SUFFIX)
-ART_HOST_SHLIB_EXTENSION ?= .so
-
-build_path := $(LOCAL_PATH)/build
-include $(build_path)/Android.common.mk
+art_path := $(LOCAL_PATH)
+art_build_path := $(art_path)/build
 
 ########################################################################
 # clean-oat targets
@@ -111,17 +81,18 @@
 # we aren't building most of art on darwin right now, but we do need to build new dalvikvm
 ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86)
 art_dont_bother := true
-include $(LOCAL_PATH)/dalvikvm/Android.mk
+include $(art_path)/dalvikvm/Android.mk
 endif
 
 ifneq ($(art_dont_bother),true)
 
 ########################################################################
 # product targets
-include $(build_path)/Android.libart.mk
-include $(build_path)/Android.libart-compiler.mk
-include $(build_path)/Android.executable.mk
-include $(build_path)/Android.oat.mk
+include $(art_path)/runtime/Android.mk
+include $(art_path)/compiler/Android.mk
+include $(art_path)/dex2oat/Android.mk
+include $(art_path)/oatdump/Android.mk
+include $(art_build_path)/Android.oat.mk
 
 # ART_HOST_DEPENDENCIES depends on Android.executable.mk above for ART_HOST_EXECUTABLES
 ART_HOST_DEPENDENCIES := $(ART_HOST_EXECUTABLES) $(HOST_OUT_JAVA_LIBRARIES)/core-hostdex.jar
@@ -131,8 +102,8 @@
 ########################################################################
 # test targets
 
-include $(build_path)/Android.oattest.mk
-include $(build_path)/Android.gtest.mk
+include $(art_path)/test/Android.mk
+include $(art_build_path)/Android.gtest.mk
 
 # The ART_*_TEST_DEPENDENCIES definitions:
 # - depend on Android.oattest.mk above for ART_TEST_*_DEX_FILES
@@ -140,7 +111,7 @@
 ART_HOST_TEST_DEPENDENCIES   := $(ART_HOST_DEPENDENCIES)   $(ART_HOST_TEST_EXECUTABLES)   $(ART_TEST_HOST_DEX_FILES)   $(HOST_CORE_IMG_OUT)
 ART_TARGET_TEST_DEPENDENCIES := $(ART_TARGET_DEPENDENCIES) $(ART_TARGET_TEST_EXECUTABLES) $(ART_TEST_TARGET_DEX_FILES) $(TARGET_CORE_IMG_OUT)
 
-include $(build_path)/Android.libarttest.mk
+include $(art_build_path)/Android.libarttest.mk
 
 # "m build-art" for quick minimal build
 .PHONY: build-art
@@ -386,6 +357,7 @@
 
 ########################################################################
 
-include $(call all-makefiles-under,$(LOCAL_PATH))
+include $(art_path)/dalvikvm/Android.mk
+include $(art_path)/jdwpspy/Android.mk
 
 endif # !art_dont_bother
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 671ce5c..fcaa2bd 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -14,6 +14,36 @@
 # limitations under the License.
 #
 
+# These can be overridden via the environment or by editing to
+# enable/disable certain build configuration.
+#
+# For example, to disable everything but the host debug build you use:
+#
+# (export ART_BUILD_TARGET_NDEBUG=false && export ART_BUILD_TARGET_DEBUG=false && export ART_BUILD_HOST_NDEBUG=false && ...)
+#
+# Beware that tests may use the non-debug build for performance, notable 055-enum-performance
+#
+ART_BUILD_TARGET_NDEBUG ?= true
+ART_BUILD_TARGET_DEBUG ?= true
+ART_BUILD_HOST_NDEBUG ?= true
+ART_BUILD_HOST_DEBUG ?= true
+
+ifeq ($(ART_BUILD_TARGET_NDEBUG),false)
+$(info Disabling ART_BUILD_TARGET_NDEBUG)
+endif
+ifeq ($(ART_BUILD_TARGET_DEBUG),false)
+$(info Disabling ART_BUILD_TARGET_DEBUG)
+endif
+ifeq ($(ART_BUILD_HOST_NDEBUG),false)
+$(info Disabling ART_BUILD_HOST_NDEBUG)
+endif
+ifeq ($(ART_BUILD_HOST_DEBUG),false)
+$(info Disabling ART_BUILD_HOST_DEBUG)
+endif
+
+#
+# Used to enable smart mode
+#
 ART_SMALL_MODE := false
 ifneq ($(wildcard art/SMALL_ART),)
 $(info Enabling ART_SMALL_MODE because of existence of art/SMALL_ART)
@@ -23,6 +53,9 @@
 ART_SMALL_MODE := true
 endif
 
+#
+# Used to enable SEA mode
+#
 ART_SEA_IR_MODE := false
 ifneq ($(wildcard art/SEA_IR_ART),)
 $(info Enabling ART_SEA_IR_MODE because of existence of art/SEA_IR_ART)
@@ -32,6 +65,9 @@
 ART_SEA_IR_MODE := true
 endif
 
+#
+# Used to enable portable mode
+#
 ART_USE_PORTABLE_COMPILER := false
 ifneq ($(wildcard art/USE_PORTABLE_COMPILER),)
 $(info Enabling ART_USE_PORTABLE_COMPILER because of existence of art/USE_PORTABLE_COMPILER)
@@ -59,12 +95,14 @@
 
 ART_CPP_EXTENSION := .cc
 
+ART_HOST_SHLIB_EXTENSION := $(HOST_SHLIB_SUFFIX)
+ART_HOST_SHLIB_EXTENSION ?= .so
+
 ART_C_INCLUDES := \
 	external/gtest/include \
 	external/valgrind/main/include \
 	external/zlib \
-	frameworks/compile/mclinker/include \
-	art/src
+	frameworks/compile/mclinker/include
 
 art_cflags := \
 	-fno-rtti \
@@ -125,8 +163,11 @@
 else
   # Warn if not using GCC 4.6 for target builds when not doing a top-level or 'mma' build.
   ifneq ($(ONE_SHOT_MAKEFILE),)
-    # Enable target GCC 4.6 with: export TARGET_GCC_VERSION_EXP=4.6
-    $(info Using target GCC $(TARGET_GCC_VERSION) disables thread-safety checks.)
+    ifneq ($(ART_THREAD_SAFETY_CHECK_WARNING),true)
+      # Enable target GCC 4.6 with: export TARGET_GCC_VERSION_EXP=4.6
+      $(info Using target GCC $(TARGET_GCC_VERSION) disables thread-safety checks.)
+      ART_THREAD_SAFETY_CHECK_WARNING := true
+    endif
   endif
 endif
 # We build with GCC 4.6 on the host.
diff --git a/build/Android.executable.mk b/build/Android.executable.mk
index e74645c..54f9926 100644
--- a/build/Android.executable.mk
+++ b/build/Android.executable.mk
@@ -14,11 +14,7 @@
 # limitations under the License.
 #
 
-DEX2OAT_SRC_FILES := \
-	src/dex2oat.cc
-
-OATDUMP_SRC_FILES := \
-	src/oatdump.cc
+include art/build/Android.common.mk
 
 ART_HOST_EXECUTABLES :=
 ART_TARGET_EXECUTABLES :=
@@ -30,26 +26,28 @@
 
 # $(1): executable ("d" will be appended for debug version)
 # $(2): source
-# $(3): shared libraries
-# $(4): target or host
-# $(5): ndebug or debug
+# $(3): extra shared libraries
+# $(4): extra include directories
+# $(5): target or host
+# $(6): ndebug or debug
 define build-art-executable
-  ifneq ($(4),target)
-    ifneq ($(4),host)
-      $$(error expected target or host for argument 4, received $(4))
+  ifneq ($(5),target)
+    ifneq ($(5),host)
+      $$(error expected target or host for argument 5, received $(5))
     endif
   endif
-  ifneq ($(5),ndebug)
-    ifneq ($(5),debug)
-      $$(error expected ndebug or debug for argument 5, received $(5))
+  ifneq ($(6),ndebug)
+    ifneq ($(6),debug)
+      $$(error expected ndebug or debug for argument 6, received $(6))
     endif
   endif
 
   art_executable := $(1)
   art_source := $(2)
   art_shared_libraries := $(3)
-  art_target_or_host := $(4)
-  art_ndebug_or_debug := $(5)
+  art_c_includes := $(4)
+  art_target_or_host := $(5)
+  art_ndebug_or_debug := $(6)
 
   include $(CLEAR_VARS)
   ifeq ($$(art_target_or_host),target)
@@ -59,7 +57,7 @@
   LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION)
   LOCAL_MODULE_TAGS := optional
   LOCAL_SRC_FILES := $$(art_source)
-  LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
+  LOCAL_C_INCLUDES += $(ART_C_INCLUDES) art/runtime $$(art_c_includes)
   LOCAL_SHARED_LIBRARIES := $$(art_shared_libraries) # libnativehelper
 
   ifeq ($$(art_ndebug_or_debug),ndebug)
@@ -97,8 +95,8 @@
     LOCAL_SHARED_LIBRARIES += libstlport
   endif
 
-  LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/build/Android.common.mk
-  LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/build/Android.executable.mk
+  LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common.mk
+  LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.executable.mk
 
   ifeq ($$(art_target_or_host),target)
     include $(BUILD_EXECUTABLE)
@@ -109,27 +107,3 @@
   endif
 
 endef
-
-ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
-  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libart-compiler,target,ndebug))
-  $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,target,ndebug))
-endif
-ifeq ($(ART_BUILD_TARGET_DEBUG),true)
-  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libartd-compiler,target,debug))
-  $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,target,debug))
-endif
-
-# We always build dex2oat and dependencies, even if the host build is otherwise disabled, since they are used to cross compile for the target.
-ifeq ($(ART_BUILD_NDEBUG),true)
-  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libart-compiler,host,ndebug))
-endif
-ifeq ($(ART_BUILD_NDEBUG),true)
-  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libartd-compiler,host,debug))
-endif
-
-ifeq ($(ART_BUILD_HOST_NDEBUG),true)
-  $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,host,ndebug))
-endif
-ifeq ($(ART_BUILD_HOST_DEBUG),true)
-  $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,host,debug))
-endif
diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk
index 46311e7..99ee14f 100644
--- a/build/Android.gtest.mk
+++ b/build/Android.gtest.mk
@@ -14,46 +14,48 @@
 # limitations under the License.
 #
 
+LOCAL_PATH := art
+
 TEST_COMMON_SRC_FILES := \
-	src/barrier_test.cc \
-	src/base/histogram_test.cc \
-	src/base/mutex_test.cc \
-	src/base/unix_file/fd_file_test.cc \
-	src/base/unix_file/mapped_file_test.cc \
-	src/base/unix_file/null_file_test.cc \
-	src/base/unix_file/random_access_file_utils_test.cc \
-	src/base/unix_file/string_file_test.cc \
-	src/class_linker_test.cc \
-	src/compiler/driver/compiler_driver_test.cc \
-	src/compiler/elf_writer_test.cc \
-	src/compiler/jni/jni_compiler_test.cc \
-	src/dex_file_test.cc \
-	src/dex_instruction_visitor_test.cc \
-	src/dex_method_iterator_test.cc \
-	src/exception_test.cc \
-	src/gc/accounting/space_bitmap_test.cc \
-	src/gc/heap_test.cc \
-	src/gc/space/space_test.cc \
-	src/gtest_test.cc \
-	src/image_test.cc \
-	src/indenter_test.cc \
-	src/indirect_reference_table_test.cc \
-	src/intern_table_test.cc \
-	src/jni_internal_test.cc \
-	src/mirror/dex_cache_test.cc \
-	src/mirror/object_test.cc \
-	src/oat/utils/arm/managed_register_arm_test.cc \
-	src/oat/utils/x86/managed_register_x86_test.cc \
-	src/oat_test.cc \
-	src/output_stream_test.cc \
-	src/reference_table_test.cc \
-	src/runtime_support_test.cc \
-	src/runtime_test.cc \
-	src/thread_pool_test.cc \
-	src/utils_test.cc \
-	src/verifier/method_verifier_test.cc \
-	src/verifier/reg_type_test.cc \
-	src/zip_archive_test.cc
+	runtime/barrier_test.cc \
+	runtime/base/histogram_test.cc \
+	runtime/base/mutex_test.cc \
+	runtime/base/unix_file/fd_file_test.cc \
+	runtime/base/unix_file/mapped_file_test.cc \
+	runtime/base/unix_file/null_file_test.cc \
+	runtime/base/unix_file/random_access_file_utils_test.cc \
+	runtime/base/unix_file/string_file_test.cc \
+	runtime/class_linker_test.cc \
+	runtime/dex_file_test.cc \
+	runtime/dex_instruction_visitor_test.cc \
+	runtime/dex_method_iterator_test.cc \
+	runtime/exception_test.cc \
+	runtime/gc/accounting/space_bitmap_test.cc \
+	runtime/gc/heap_test.cc \
+	runtime/gc/space/space_test.cc \
+	runtime/gtest_test.cc \
+	runtime/image_test.cc \
+	runtime/indenter_test.cc \
+	runtime/indirect_reference_table_test.cc \
+	runtime/intern_table_test.cc \
+	runtime/jni_internal_test.cc \
+	runtime/mirror/dex_cache_test.cc \
+	runtime/mirror/object_test.cc \
+	runtime/oat/utils/arm/managed_register_arm_test.cc \
+	runtime/oat/utils/x86/managed_register_x86_test.cc \
+	runtime/oat_test.cc \
+	runtime/output_stream_test.cc \
+	runtime/reference_table_test.cc \
+	runtime/runtime_support_test.cc \
+	runtime/runtime_test.cc \
+	runtime/thread_pool_test.cc \
+	runtime/utils_test.cc \
+	runtime/verifier/method_verifier_test.cc \
+	runtime/verifier/reg_type_test.cc \
+	runtime/zip_archive_test.cc \
+	compiler/driver/compiler_driver_test.cc \
+	compiler/elf_writer_test.cc \
+	compiler/jni/jni_compiler_test.cc
 
 ifeq ($(ART_SEA_IR_MODE),true)
 TEST_COMMON_SRC_FILES += \
@@ -65,7 +67,7 @@
 
 TEST_HOST_SRC_FILES := \
 	$(TEST_COMMON_SRC_FILES) \
-	src/oat/utils/x86/assembler_x86_test.cc
+	runtime/oat/utils/x86/assembler_x86_test.cc
 
 ART_HOST_TEST_EXECUTABLES :=
 ART_TARGET_TEST_EXECUTABLES :=
@@ -101,11 +103,11 @@
   ifeq ($$(art_target_or_host),target)
     LOCAL_MODULE_TAGS := tests
   endif
-  LOCAL_SRC_FILES := $$(art_gtest_filename) src/common_test.cc
-  LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
+  LOCAL_SRC_FILES := $$(art_gtest_filename) runtime/common_test.cc
+  LOCAL_C_INCLUDES += $(ART_C_INCLUDES) art/runtime art/compiler
   LOCAL_SHARED_LIBRARIES := libartd-compiler libartd
-  LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/build/Android.common.mk
-  LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/build/Android.gtest.mk
+  LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common.mk
+  LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.gtest.mk
 
   # Mac OS linker doesn't understand --export-dynamic.
   ifneq ($(HOST_OS)-$$(art_target_or_host),darwin-host)
diff --git a/build/Android.libart.mk b/build/Android.libart.mk
deleted file mode 100644
index 2f17583..0000000
--- a/build/Android.libart.mk
+++ /dev/null
@@ -1,371 +0,0 @@
-#
-# 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.
-#
-
-LIBART_COMMON_SRC_FILES := \
-	src/atomic.cc.arm \
-	src/barrier.cc \
-	src/base/logging.cc \
-	src/base/mutex.cc \
-	src/base/stringpiece.cc \
-	src/base/stringprintf.cc \
-	src/base/timing_logger.cc \
-	src/base/unix_file/fd_file.cc \
-	src/base/unix_file/mapped_file.cc \
-	src/base/unix_file/null_file.cc \
-	src/base/unix_file/random_access_file_utils.cc \
-	src/base/unix_file/string_file.cc \
-	src/check_jni.cc \
-	src/class_linker.cc \
-	src/common_throws.cc \
-	src/compiled_method.cc \
-	src/debugger.cc \
-	src/dex_file.cc \
-	src/dex_file_verifier.cc \
-	src/dex_instruction.cc \
-	src/disassembler.cc \
-	src/disassembler_arm.cc \
-	src/disassembler_mips.cc \
-	src/disassembler_x86.cc \
-	src/elf_file.cc \
-	src/file_output_stream.cc \
-	src/gc/allocator/dlmalloc.cc \
-	src/gc/accounting/card_table.cc \
-	src/gc/accounting/heap_bitmap.cc \
-	src/gc/accounting/mod_union_table.cc \
-	src/gc/accounting/space_bitmap.cc \
-	src/gc/collector/garbage_collector.cc \
-	src/gc/collector/mark_sweep.cc \
-	src/gc/collector/partial_mark_sweep.cc \
-	src/gc/collector/sticky_mark_sweep.cc \
-	src/gc/heap.cc \
-	src/gc/space/dlmalloc_space.cc \
-	src/gc/space/image_space.cc \
-	src/gc/space/large_object_space.cc \
-	src/gc/space/space.cc \
-	src/hprof/hprof.cc \
-	src/image.cc \
-	src/indirect_reference_table.cc \
-	src/instrumentation.cc \
-	src/intern_table.cc \
-	src/interpreter/interpreter.cc \
-	src/jdwp/jdwp_event.cc \
-	src/jdwp/jdwp_expand_buf.cc \
-	src/jdwp/jdwp_handler.cc \
-	src/jdwp/jdwp_main.cc \
-	src/jdwp/jdwp_request.cc \
-	src/jdwp/jdwp_socket.cc \
-	src/jdwp/object_registry.cc \
-	src/jni_internal.cc \
-	src/jobject_comparator.cc \
-	src/locks.cc \
-	src/mem_map.cc \
-	src/memory_region.cc \
-	src/mirror/abstract_method.cc \
-	src/mirror/array.cc \
-	src/mirror/class.cc \
-	src/mirror/dex_cache.cc \
-	src/mirror/field.cc \
-	src/mirror/object.cc \
-	src/mirror/stack_trace_element.cc \
-	src/mirror/string.cc \
-	src/mirror/throwable.cc \
-	src/monitor.cc \
-	src/native/dalvik_system_DexFile.cc \
-	src/native/dalvik_system_VMDebug.cc \
-	src/native/dalvik_system_VMRuntime.cc \
-	src/native/dalvik_system_VMStack.cc \
-	src/native/dalvik_system_Zygote.cc \
-	src/native/java_lang_Class.cc \
-	src/native/java_lang_Object.cc \
-	src/native/java_lang_Runtime.cc \
-	src/native/java_lang_String.cc \
-	src/native/java_lang_System.cc \
-	src/native/java_lang_Thread.cc \
-	src/native/java_lang_Throwable.cc \
-	src/native/java_lang_VMClassLoader.cc \
-	src/native/java_lang_reflect_Array.cc \
-	src/native/java_lang_reflect_Constructor.cc \
-	src/native/java_lang_reflect_Field.cc \
-	src/native/java_lang_reflect_Method.cc \
-	src/native/java_lang_reflect_Proxy.cc \
-	src/native/java_util_concurrent_atomic_AtomicLong.cc \
-	src/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc \
-	src/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \
-	src/native/sun_misc_Unsafe.cc \
-	src/oat.cc \
-	src/oat/utils/arm/assembler_arm.cc \
-	src/oat/utils/arm/managed_register_arm.cc \
-	src/oat/utils/assembler.cc \
-	src/oat/utils/mips/assembler_mips.cc \
-	src/oat/utils/mips/managed_register_mips.cc \
-	src/oat/utils/x86/assembler_x86.cc \
-	src/oat/utils/x86/managed_register_x86.cc \
-	src/oat_file.cc \
-	src/offsets.cc \
-	src/os_linux.cc \
-	src/primitive.cc \
-	src/reference_table.cc \
-	src/reflection.cc \
-	src/runtime.cc \
-	src/runtime_support.cc \
-	src/runtime_support_llvm.cc \
-	src/signal_catcher.cc \
-	src/stack.cc \
-	src/thread.cc \
-	src/thread_list.cc \
-	src/thread_pool.cc \
-	src/throw_location.cc \
-	src/trace.cc \
-	src/utf.cc \
-	src/utils.cc \
-	src/vector_output_stream.cc \
-	src/verifier/dex_gc_map.cc \
-	src/verifier/instruction_flags.cc \
-	src/verifier/method_verifier.cc \
-	src/verifier/reg_type.cc \
-	src/verifier/reg_type_cache.cc \
-	src/verifier/register_line.cc \
-	src/well_known_classes.cc \
-	src/zip_archive.cc
-
-LIBART_COMMON_SRC_FILES += \
-	src/oat/runtime/context.cc \
-	src/oat/runtime/support_alloc.cc \
-	src/oat/runtime/support_cast.cc \
-	src/oat/runtime/support_deoptimize.cc \
-	src/oat/runtime/support_dexcache.cc \
-	src/oat/runtime/support_field.cc \
-	src/oat/runtime/support_fillarray.cc \
-	src/oat/runtime/support_instrumentation.cc \
-	src/oat/runtime/support_invoke.cc \
-	src/oat/runtime/support_jni.cc \
-	src/oat/runtime/support_locks.cc \
-	src/oat/runtime/support_math.cc \
-	src/oat/runtime/support_proxy.cc \
-	src/oat/runtime/support_stubs.cc \
-	src/oat/runtime/support_thread.cc \
-	src/oat/runtime/support_throw.cc \
-	src/oat/runtime/support_interpreter.cc
-
-ifeq ($(ART_SEA_IR_MODE),true)
-LIBART_COMMON_SRC_FILES += \
-	src/compiler/sea_ir/sea.cc \
-	src/compiler/sea_ir/instruction_tools.cc
-endif
-
-LIBART_TARGET_SRC_FILES := \
-	$(LIBART_COMMON_SRC_FILES) \
-	src/base/logging_android.cc \
-	src/jdwp/jdwp_adb.cc \
-	src/monitor_android.cc \
-	src/runtime_android.cc \
-	src/thread_android.cc
-
-ifeq ($(TARGET_ARCH),arm)
-LIBART_TARGET_SRC_FILES += \
-	src/oat/runtime/arm/context_arm.cc.arm \
-	src/oat/runtime/arm/oat_support_entrypoints_arm.cc \
-	src/oat/runtime/arm/runtime_support_arm.S
-else # TARGET_ARCH != arm
-ifeq ($(TARGET_ARCH),x86)
-LIBART_TARGET_SRC_FILES += \
-	src/oat/runtime/x86/context_x86.cc \
-	src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
-	src/oat/runtime/x86/runtime_support_x86.S
-else # TARGET_ARCH != x86
-ifeq ($(TARGET_ARCH),mips)
-LIBART_TARGET_SRC_FILES += \
-	src/oat/runtime/mips/context_mips.cc \
-	src/oat/runtime/mips/oat_support_entrypoints_mips.cc \
-	src/oat/runtime/mips/runtime_support_mips.S
-else # TARGET_ARCH != mips
-$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
-endif # TARGET_ARCH != mips
-endif # TARGET_ARCH != x86
-endif # TARGET_ARCH != arm
-
-ifeq ($(TARGET_ARCH),arm)
-LIBART_TARGET_SRC_FILES += src/thread_arm.cc
-else # TARGET_ARCH != arm
-ifeq ($(TARGET_ARCH),x86)
-LIBART_TARGET_SRC_FILES += src/thread_x86.cc
-else # TARGET_ARCH != x86
-ifeq ($(TARGET_ARCH),mips)
-LIBART_TARGET_SRC_FILES += src/thread_mips.cc
-else # TARGET_ARCH != mips
-$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
-endif # TARGET_ARCH != mips
-endif # TARGET_ARCH != x86
-endif # TARGET_ARCH != arm
-
-LIBART_HOST_SRC_FILES := \
-	$(LIBART_COMMON_SRC_FILES) \
-	src/base/logging_linux.cc \
-	src/monitor_linux.cc \
-	src/runtime_linux.cc \
-	src/thread_linux.cc
-
-ifeq ($(HOST_ARCH),x86)
-LIBART_HOST_SRC_FILES += \
-	src/oat/runtime/x86/context_x86.cc \
-	src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
-	src/oat/runtime/x86/runtime_support_x86.S
-else # HOST_ARCH != x86
-$(error unsupported HOST_ARCH=$(HOST_ARCH))
-endif # HOST_ARCH != x86
-
-ifeq ($(HOST_ARCH),x86)
-LIBART_HOST_SRC_FILES += src/thread_x86.cc
-else # HOST_ARCH != x86
-$(error unsupported HOST_ARCH=$(HOST_ARCH))
-endif # HOST_ARCH != x86
-
-
-LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := \
-	src/base/mutex.h \
-	src/compiler/dex/compiler_enums.h \
-	src/dex_file.h \
-	src/dex_instruction.h \
-	src/gc/collector/gc_type.h \
-	src/gc/space/space.h \
-	src/gc/heap.h \
-	src/indirect_reference_table.h \
-	src/instruction_set.h \
-	src/invoke_type.h \
-	src/jdwp/jdwp.h \
-	src/jdwp/jdwp_constants.h \
-	src/locks.h \
-	src/mirror/class.h \
-	src/thread.h \
-	src/thread_state.h \
-	src/verifier/method_verifier.h
-
-LIBART_CFLAGS :=
-ifeq ($(ART_USE_PORTABLE_COMPILER),true)
-  LIBART_CFLAGS += -DART_USE_PORTABLE_COMPILER=1
-endif
-
-# $(1): target or host
-# $(2): ndebug or debug
-define build-libart
-  ifneq ($(1),target)
-    ifneq ($(1),host)
-      $$(error expected target or host for argument 1, received $(1))
-    endif
-  endif
-  ifneq ($(2),ndebug)
-    ifneq ($(2),debug)
-      $$(error expected ndebug or debug for argument 2, received $(2))
-    endif
-  endif
-
-  art_target_or_host := $(1)
-  art_ndebug_or_debug := $(2)
-
-  include $(CLEAR_VARS)
-  ifeq ($$(art_target_or_host),target)
-    include external/stlport/libstlport.mk
-  endif
-  LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION)
-  ifeq ($$(art_ndebug_or_debug),ndebug)
-    LOCAL_MODULE := libart
-  else # debug
-    LOCAL_MODULE := libartd
-  endif
-
-  LOCAL_MODULE_TAGS := optional
-  LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-
-  ifeq ($$(art_target_or_host),target)
-    LOCAL_SRC_FILES := $(LIBART_TARGET_SRC_FILES)
-  else # host
-    LOCAL_SRC_FILES := $(LIBART_HOST_SRC_FILES)
-    LOCAL_IS_HOST_MODULE := true
-  endif
-
-  GENERATED_SRC_DIR := $$(call intermediates-dir-for,$$(LOCAL_MODULE_CLASS),$$(LOCAL_MODULE),$$(LOCAL_IS_HOST_MODULE),)
-  ENUM_OPERATOR_OUT_CC_FILES := $$(patsubst %.h,%_operator_out.cc,$$(LIBART_ENUM_OPERATOR_OUT_HEADER_FILES))
-  ENUM_OPERATOR_OUT_GEN := $$(addprefix $$(GENERATED_SRC_DIR)/,$$(ENUM_OPERATOR_OUT_CC_FILES))
-
-$$(ENUM_OPERATOR_OUT_GEN): art/tools/generate-operator-out.py
-$$(ENUM_OPERATOR_OUT_GEN): PRIVATE_CUSTOM_TOOL = art/tools/generate-operator-out.py $$< > $$@
-$$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : art/%.h
-	$$(transform-generated-source)
-
-  LOCAL_GENERATED_SOURCES += $$(ENUM_OPERATOR_OUT_GEN)
-
-  LOCAL_CFLAGS := $(LIBART_CFLAGS)
-  ifeq ($$(art_target_or_host),target)
-    LOCAL_CLANG := $(ART_TARGET_CLANG)
-    LOCAL_CFLAGS += $(ART_TARGET_CFLAGS)
-  else # host
-    LOCAL_CLANG := $(ART_HOST_CLANG)
-    LOCAL_CFLAGS += $(ART_HOST_CFLAGS)
-  endif
-  ifeq ($$(art_ndebug_or_debug),debug)
-    ifeq ($$(art_target_or_host),target)
-      LOCAL_CFLAGS += $(ART_TARGET_DEBUG_CFLAGS)
-    else # host
-      LOCAL_CFLAGS += $(ART_HOST_DEBUG_CFLAGS)
-      LOCAL_LDLIBS += $(ART_HOST_DEBUG_LDLIBS)
-      LOCAL_STATIC_LIBRARIES := libgtest_host
-    endif
-  else
-    ifeq ($$(art_target_or_host),target)
-      LOCAL_CFLAGS += $(ART_TARGET_NON_DEBUG_CFLAGS)
-    else # host
-      LOCAL_CFLAGS += $(ART_HOST_NON_DEBUG_CFLAGS)
-    endif
-  endif
-  LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
-  LOCAL_SHARED_LIBRARIES := liblog libnativehelper
-  LOCAL_SHARED_LIBRARIES += libcorkscrew # native stack trace support
-  ifeq ($$(art_target_or_host),target)
-    LOCAL_SHARED_LIBRARIES += libcutils libstlport libz libdl libselinux
-  else # host
-    LOCAL_STATIC_LIBRARIES += libcutils
-    LOCAL_SHARED_LIBRARIES += libz-host
-    LOCAL_LDLIBS += -ldl -lpthread
-    ifeq ($(HOST_OS),linux)
-      LOCAL_LDLIBS += -lrt
-    endif
-  endif
-  include $(LLVM_GEN_INTRINSICS_MK)
-  LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/build/Android.common.mk
-  LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/build/Android.libart.mk
-  ifeq ($$(art_target_or_host),target)
-    include $(LLVM_DEVICE_BUILD_MK)
-    include $(BUILD_SHARED_LIBRARY)
-  else # host
-    include $(LLVM_HOST_BUILD_MK)
-    include $(BUILD_HOST_SHARED_LIBRARY)
-  endif
-endef
-
-ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
-  $(eval $(call build-libart,target,ndebug))
-endif
-ifeq ($(ART_BUILD_TARGET_DEBUG),true)
-  $(eval $(call build-libart,target,debug))
-endif
-
-# We always build dex2oat and dependencies, even if the host build is otherwise disabled, since they are used to cross compile for the target.
-ifeq ($(ART_BUILD_NDEBUG),true)
-  $(eval $(call build-libart,host,ndebug))
-endif
-ifeq ($(ART_BUILD_DEBUG),true)
-  $(eval $(call build-libart,host,debug))
-endif
diff --git a/build/Android.libarttest.mk b/build/Android.libarttest.mk
index 64f8368..239f6c1 100644
--- a/build/Android.libarttest.mk
+++ b/build/Android.libarttest.mk
@@ -40,7 +40,7 @@
   endif
   LOCAL_SRC_FILES := $(LIBARTTEST_COMMON_SRC_FILES)
   LOCAL_SHARED_LIBRARIES := libartd
-  LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
+  LOCAL_C_INCLUDES += $(ART_C_INCLUDES) art/runtime
   LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/build/Android.common.mk
   LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/build/Android.libarttest.mk
   ifeq ($$(art_target_or_host),target)
diff --git a/build/Android.oattest.mk b/build/Android.oattest.mk
deleted file mode 100644
index 726298f..0000000
--- a/build/Android.oattest.mk
+++ /dev/null
@@ -1,138 +0,0 @@
-#
-# 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.
-#
-
-########################################################################
-
-# subdirectories of test/ which are used as inputs for gtests
-TEST_DEX_DIRECTORIES := \
-	AbstractMethod \
-	AllFields \
-	CreateMethodSignature \
-	ExceptionHandle \
-	Interfaces \
-	Main \
-	MyClass \
-	MyClassNatives \
-	Nested \
-	NonStaticLeafMethods \
-	ProtoCompare \
-	ProtoCompare2 \
-	StaticLeafMethods \
-	Statics \
-	StaticsFromCode \
-	XandY
-
-# subdirectories of test/ which are used with test-art-target-oat
-# Declare the simplest tests (Main, HelloWorld) first, the rest are alphabetical
-TEST_OAT_DIRECTORIES := \
-	Main \
-	HelloWorld \
-	NativeAllocations \
-	ParallelGC \
-	ReferenceMap \
-	StackWalk \
-	ThreadStress
-
-# TODO: Enable when the StackWalk2 tests are passing
-#	StackWalk2 \
-
-ART_TEST_TARGET_DEX_FILES :=
-ART_TEST_HOST_DEX_FILES :=
-
-# $(1): module prefix
-# $(2): input test directory
-# $(3): target output module path (default module path is used on host)
-define build-art-test-dex
-  ifeq ($(ART_BUILD_TARGET),true)
-    include $(CLEAR_VARS)
-    LOCAL_MODULE := $(1)-$(2)
-    LOCAL_MODULE_TAGS := tests
-    LOCAL_SRC_FILES := $(call all-java-files-under, test/$(2))
-    LOCAL_JAVA_LIBRARIES := $(TARGET_CORE_JARS)
-    LOCAL_NO_STANDARD_LIBRARIES := true
-    LOCAL_MODULE_PATH := $(3)
-    LOCAL_DEX_PREOPT_IMAGE := $(TARGET_CORE_IMG_OUT)
-    LOCAL_DEX_PREOPT := false
-    LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/build/Android.common.mk
-    LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/build/Android.oattest.mk
-    include $(BUILD_JAVA_LIBRARY)
-    ART_TEST_TARGET_DEX_FILES += $(3)/$$(LOCAL_MODULE).jar
-  endif
-
-  ifeq ($(ART_BUILD_HOST),true)
-    include $(CLEAR_VARS)
-    LOCAL_MODULE := $(1)-$(2)
-    LOCAL_SRC_FILES := $(call all-java-files-under, test/$(2))
-    LOCAL_JAVA_LIBRARIES := $(HOST_CORE_JARS)
-    LOCAL_NO_STANDARD_LIBRARIES := true
-    LOCAL_DEX_PREOPT_IMAGE := $(HOST_CORE_IMG_OUT)
-    LOCAL_BUILD_HOST_DEX := true
-    LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/build/Android.common.mk
-    LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/build/Android.oattest.mk
-    include $(BUILD_HOST_JAVA_LIBRARY)
-    ART_TEST_HOST_DEX_FILES += $$(LOCAL_MODULE_PATH)/$$(LOCAL_MODULE).jar
-  endif
-endef
-$(foreach dir,$(TEST_DEX_DIRECTORIES), $(eval $(call build-art-test-dex,art-test-dex,$(dir),$(ART_NATIVETEST_OUT))))
-$(foreach dir,$(TEST_OAT_DIRECTORIES), $(eval $(call build-art-test-dex,oat-test-dex,$(dir),$(ART_TEST_OUT))))
-
-########################################################################
-
-ART_TEST_TARGET_OAT_TARGETS :=
-ART_TEST_HOST_OAT_TARGETS :=
-ART_TEST_HOST_INTERPRETER_OAT_TARGETS :=
-
-# $(1): directory
-# $(2): arguments
-define declare-test-art-oat-targets
-.PHONY: test-art-target-oat-$(1)
-test-art-target-oat-$(1): $(ART_TEST_OUT)/oat-test-dex-$(1).jar test-art-target-sync
-	adb shell touch $(ART_TEST_DIR)/test-art-target-oat-$(1)
-	adb shell rm $(ART_TEST_DIR)/test-art-target-oat-$(1)
-	adb shell sh -c "dalvikvm -XXlib:libartd.so -Ximage:$(ART_TEST_DIR)/core.art -classpath $(ART_TEST_DIR)/oat-test-dex-$(1).jar -Djava.library.path=$(ART_TEST_DIR) $(1) $(2) && touch $(ART_TEST_DIR)/test-art-target-oat-$(1)"
-	$(hide) (adb pull $(ART_TEST_DIR)/test-art-target-oat-$(1) /tmp/ && echo test-art-target-oat-$(1) PASSED) || (echo test-art-target-oat-$(1) FAILED && exit 1)
-	$(hide) rm /tmp/test-art-target-oat-$(1)
-
-$(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex: $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar $(HOST_CORE_IMG_OUT) | $(DEX2OAT)
-	$(DEX2OAT) --runtime-arg -Xms16m --runtime-arg -Xmx16m --boot-image=$(HOST_CORE_IMG_OUT) --dex-file=$$< --oat-file=$$@ --instruction-set=$(HOST_ARCH) --host --host-prefix="" --android-root=$(HOST_OUT)
-
-.PHONY: test-art-host-oat-$(1)
-test-art-host-oat-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex test-art-host-dependencies
-	mkdir -p /tmp/android-data/test-art-host-oat-$(1)
-	ANDROID_DATA=/tmp/android-data/test-art-host-oat-$(1) \
-	  ANDROID_ROOT=$(HOST_OUT) \
-	  LD_LIBRARY_PATH=$(HOST_OUT_SHARED_LIBRARIES) \
-	  dalvikvm -XXlib:libartd.so -Ximage:$(shell pwd)/$(HOST_CORE_IMG_OUT) -classpath $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar -Djava.library.path=$(HOST_OUT_SHARED_LIBRARIES) $(1) $(2) \
-          && echo test-art-host-oat-$(1) PASSED || (echo test-art-host-oat-$(1) FAILED && exit 1)
-	$(hide) rm -r /tmp/android-data/test-art-host-oat-$(1)
-
-.PHONY: test-art-host-interpreter-oat-$(1)
-test-art-host-interpreter-oat-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex test-art-host-dependencies
-	mkdir -p /tmp/android-data/test-art-host-interpreter-oat-$(1)
-	ANDROID_DATA=/tmp/android-data/test-art-host-interpreter-oat-$(1) \
-	  ANDROID_ROOT=$(HOST_OUT) \
-	  LD_LIBRARY_PATH=$(HOST_OUT_SHARED_LIBRARIES) \
-	  dalvikvm -XXlib:libartd.so -Ximage:$(shell pwd)/$(HOST_CORE_IMG_OUT) -Xint -classpath $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar -Djava.library.path=$(HOST_OUT_SHARED_LIBRARIES) $(1) $(2) \
-          && echo test-art-host-interpreter-oat-$(1) PASSED || (echo test-art-host-interpreter-oat-$(1) FAILED && exit 1)
-	$(hide) rm -r /tmp/android-data/test-art-host-interpreter-oat-$(1)
-
-ART_TEST_TARGET_OAT_TARGETS += test-art-target-oat-$(1)
-ART_TEST_HOST_OAT_TARGETS += test-art-host-oat-$(1)
-ART_TEST_HOST_INTERPRETER_OAT_TARGETS += test-art-host-interpreter-oat-$(1)
-endef
-$(foreach dir,$(TEST_OAT_DIRECTORIES), $(eval $(call declare-test-art-oat-targets,$(dir))))
-
-########################################################################
diff --git a/build/Android.libart-compiler.mk b/compiler/Android.mk
similarity index 60%
rename from build/Android.libart-compiler.mk
rename to compiler/Android.mk
index ce6edba..40a74c1 100644
--- a/build/Android.libart-compiler.mk
+++ b/compiler/Android.mk
@@ -14,83 +14,90 @@
 # limitations under the License.
 #
 
+LOCAL_PATH := $(call my-dir)
+
+include art/build/Android.common.mk
+
 LIBART_COMPILER_SRC_FILES := \
-	src/compiler/dex/local_value_numbering.cc \
-	src/compiler/dex/arena_allocator.cc \
-	src/compiler/dex/arena_bit_vector.cc \
-	src/compiler/dex/quick/arm/assemble_arm.cc \
-	src/compiler/dex/quick/arm/call_arm.cc \
-	src/compiler/dex/quick/arm/fp_arm.cc \
-	src/compiler/dex/quick/arm/int_arm.cc \
-	src/compiler/dex/quick/arm/target_arm.cc \
-	src/compiler/dex/quick/arm/utility_arm.cc \
-	src/compiler/dex/quick/codegen_util.cc \
-	src/compiler/dex/quick/gen_common.cc \
-	src/compiler/dex/quick/gen_invoke.cc \
-	src/compiler/dex/quick/gen_loadstore.cc \
-	src/compiler/dex/quick/local_optimizations.cc \
-	src/compiler/dex/quick/mips/assemble_mips.cc \
-	src/compiler/dex/quick/mips/call_mips.cc \
-	src/compiler/dex/quick/mips/fp_mips.cc \
-	src/compiler/dex/quick/mips/int_mips.cc \
-	src/compiler/dex/quick/mips/target_mips.cc \
-	src/compiler/dex/quick/mips/utility_mips.cc \
-	src/compiler/dex/quick/mir_to_lir.cc \
-	src/compiler/dex/quick/ralloc_util.cc \
-	src/compiler/dex/quick/x86/assemble_x86.cc \
-	src/compiler/dex/quick/x86/call_x86.cc \
-	src/compiler/dex/quick/x86/fp_x86.cc \
-	src/compiler/dex/quick/x86/int_x86.cc \
-	src/compiler/dex/quick/x86/target_x86.cc \
-	src/compiler/dex/quick/x86/utility_x86.cc \
-	src/compiler/dex/portable/mir_to_gbc.cc \
-	src/compiler/dex/dex_to_dex_compiler.cc \
-	src/compiler/dex/mir_dataflow.cc \
-	src/compiler/dex/mir_optimization.cc \
-	src/compiler/dex/frontend.cc \
-	src/compiler/dex/mir_graph.cc \
-	src/compiler/dex/vreg_analysis.cc \
-	src/compiler/dex/ssa_transformation.cc \
-	src/compiler/driver/compiler_driver.cc \
-	src/compiler/driver/dex_compilation_unit.cc \
-	src/compiler/jni/portable/jni_compiler.cc \
-	src/compiler/jni/quick/arm/calling_convention_arm.cc \
-	src/compiler/jni/quick/mips/calling_convention_mips.cc \
-	src/compiler/jni/quick/x86/calling_convention_x86.cc \
-	src/compiler/jni/quick/calling_convention.cc \
-	src/compiler/jni/quick/jni_compiler.cc \
-	src/compiler/llvm/compiler_llvm.cc \
-	src/compiler/llvm/gbc_expander.cc \
-	src/compiler/llvm/generated/art_module.cc \
-	src/compiler/llvm/intrinsic_helper.cc \
-	src/compiler/llvm/ir_builder.cc \
-	src/compiler/llvm/llvm_compilation_unit.cc \
-	src/compiler/llvm/md_builder.cc \
-	src/compiler/llvm/runtime_support_builder.cc \
-	src/compiler/llvm/runtime_support_builder_arm.cc \
-	src/compiler/llvm/runtime_support_builder_thumb2.cc \
-	src/compiler/llvm/runtime_support_builder_x86.cc \
-        src/compiler/stubs/portable/stubs.cc \
-        src/compiler/stubs/quick/stubs.cc \
-	src/compiler/elf_fixup.cc \
-	src/compiler/elf_stripper.cc \
-	src/compiler/elf_writer.cc \
-	src/compiler/elf_writer_quick.cc \
-	src/compiler/image_writer.cc \
-	src/compiler/oat_writer.cc
+	dex/local_value_numbering.cc \
+	dex/arena_allocator.cc \
+	dex/arena_bit_vector.cc \
+	dex/quick/arm/assemble_arm.cc \
+	dex/quick/arm/call_arm.cc \
+	dex/quick/arm/fp_arm.cc \
+	dex/quick/arm/int_arm.cc \
+	dex/quick/arm/target_arm.cc \
+	dex/quick/arm/utility_arm.cc \
+	dex/quick/codegen_util.cc \
+	dex/quick/gen_common.cc \
+	dex/quick/gen_invoke.cc \
+	dex/quick/gen_loadstore.cc \
+	dex/quick/local_optimizations.cc \
+	dex/quick/mips/assemble_mips.cc \
+	dex/quick/mips/call_mips.cc \
+	dex/quick/mips/fp_mips.cc \
+	dex/quick/mips/int_mips.cc \
+	dex/quick/mips/target_mips.cc \
+	dex/quick/mips/utility_mips.cc \
+	dex/quick/mir_to_lir.cc \
+	dex/quick/ralloc_util.cc \
+	dex/quick/x86/assemble_x86.cc \
+	dex/quick/x86/call_x86.cc \
+	dex/quick/x86/fp_x86.cc \
+	dex/quick/x86/int_x86.cc \
+	dex/quick/x86/target_x86.cc \
+	dex/quick/x86/utility_x86.cc \
+	dex/portable/mir_to_gbc.cc \
+	dex/dex_to_dex_compiler.cc \
+	dex/mir_dataflow.cc \
+	dex/mir_optimization.cc \
+	dex/frontend.cc \
+	dex/mir_graph.cc \
+	dex/vreg_analysis.cc \
+	dex/ssa_transformation.cc \
+	driver/compiler_driver.cc \
+	driver/dex_compilation_unit.cc \
+	jni/portable/jni_compiler.cc \
+	jni/quick/arm/calling_convention_arm.cc \
+	jni/quick/mips/calling_convention_mips.cc \
+	jni/quick/x86/calling_convention_x86.cc \
+	jni/quick/calling_convention.cc \
+	jni/quick/jni_compiler.cc \
+	llvm/compiler_llvm.cc \
+	llvm/gbc_expander.cc \
+	llvm/generated/art_module.cc \
+	llvm/intrinsic_helper.cc \
+	llvm/ir_builder.cc \
+	llvm/llvm_compilation_unit.cc \
+	llvm/md_builder.cc \
+	llvm/runtime_support_builder.cc \
+	llvm/runtime_support_builder_arm.cc \
+	llvm/runtime_support_builder_thumb2.cc \
+	llvm/runtime_support_builder_x86.cc \
+        stubs/portable/stubs.cc \
+        stubs/quick/stubs.cc \
+	elf_fixup.cc \
+	elf_stripper.cc \
+	elf_writer.cc \
+	elf_writer_quick.cc \
+	image_writer.cc \
+	oat_writer.cc
 
 ifeq ($(ART_SEA_IR_MODE),true)
 LIBART_COMPILER_SRC_FILES += \
-	src/compiler/sea_ir/frontend.cc \
-	src/compiler/sea_ir/instruction_tools.cc
+	sea_ir/frontend.cc \
+	sea_ir/instruction_tools.cc
 endif
 
 LIBART_COMPILER_CFLAGS :=
 ifeq ($(ART_USE_PORTABLE_COMPILER),true)
-  LIBART_COMPILER_SRC_FILES += src/compiler/elf_writer_mclinker.cc
+  LIBART_COMPILER_SRC_FILES += elf_writer_mclinker.cc
   LIBART_COMPILER_CFLAGS += -DART_USE_PORTABLE_COMPILER=1
 endif
 
+LIBART_COMPILER_ENUM_OPERATOR_OUT_HEADER_FILES := \
+	dex/compiler_enums.h
+
 # $(1): target or host
 # $(2): ndebug or debug
 define build-libart-compiler
@@ -111,6 +118,8 @@
   include $(CLEAR_VARS)
   ifeq ($$(art_target_or_host),target)
     include external/stlport/libstlport.mk
+  else
+    LOCAL_IS_HOST_MODULE := true
   endif
   LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION)
   ifeq ($$(art_ndebug_or_debug),ndebug)
@@ -124,6 +133,17 @@
 
   LOCAL_SRC_FILES := $$(LIBART_COMPILER_SRC_FILES)
 
+  GENERATED_SRC_DIR := $$(call intermediates-dir-for,$$(LOCAL_MODULE_CLASS),$$(LOCAL_MODULE),$$(LOCAL_IS_HOST_MODULE),)
+  ENUM_OPERATOR_OUT_CC_FILES := $$(patsubst %.h,%_operator_out.cc,$$(LIBART_COMPILER_ENUM_OPERATOR_OUT_HEADER_FILES))
+  ENUM_OPERATOR_OUT_GEN := $$(addprefix $$(GENERATED_SRC_DIR)/,$$(ENUM_OPERATOR_OUT_CC_FILES))
+
+$$(ENUM_OPERATOR_OUT_GEN): art/tools/generate-operator-out.py
+$$(ENUM_OPERATOR_OUT_GEN): PRIVATE_CUSTOM_TOOL = art/tools/generate-operator-out.py $(LOCAL_PATH) $$< > $$@
+$$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PATH)/%.h
+	$$(transform-generated-source)
+
+  LOCAL_GENERATED_SOURCES += $$(ENUM_OPERATOR_OUT_GEN)
+
   LOCAL_CFLAGS := $$(LIBART_COMPILER_CFLAGS)
   ifeq ($$(art_target_or_host),target)
     LOCAL_CLANG := $(ART_TARGET_CLANG)
@@ -158,22 +178,21 @@
     LOCAL_CFLAGS += -DART_USE_PORTABLE_COMPILER=1
   endif
 
-  LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
+  LOCAL_C_INCLUDES += $(ART_C_INCLUDES) art/runtime
 
   ifeq ($$(art_target_or_host),target)
     LOCAL_SHARED_LIBRARIES += libstlport
   else # host
     LOCAL_LDLIBS := -ldl -lpthread
   endif
-  LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/build/Android.common.mk
-  LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/build/Android.libart-compiler.mk
+  LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common.mk
+  LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
   ifeq ($$(art_target_or_host),target)
     LOCAL_SHARED_LIBRARIES += libcutils
     include $(LLVM_GEN_INTRINSICS_MK)
     include $(LLVM_DEVICE_BUILD_MK)
     include $(BUILD_SHARED_LIBRARY)
   else # host
-    LOCAL_IS_HOST_MODULE := true
     LOCAL_STATIC_LIBRARIES += libcutils
     include $(LLVM_GEN_INTRINSICS_MK)
     include $(LLVM_HOST_BUILD_MK)
diff --git a/src/compiler/dex/arena_allocator.cc b/compiler/dex/arena_allocator.cc
similarity index 100%
rename from src/compiler/dex/arena_allocator.cc
rename to compiler/dex/arena_allocator.cc
diff --git a/src/compiler/dex/arena_allocator.h b/compiler/dex/arena_allocator.h
similarity index 100%
rename from src/compiler/dex/arena_allocator.h
rename to compiler/dex/arena_allocator.h
diff --git a/src/compiler/dex/arena_bit_vector.cc b/compiler/dex/arena_bit_vector.cc
similarity index 100%
rename from src/compiler/dex/arena_bit_vector.cc
rename to compiler/dex/arena_bit_vector.cc
diff --git a/src/compiler/dex/arena_bit_vector.h b/compiler/dex/arena_bit_vector.h
similarity index 100%
rename from src/compiler/dex/arena_bit_vector.h
rename to compiler/dex/arena_bit_vector.h
diff --git a/src/compiler/dex/backend.h b/compiler/dex/backend.h
similarity index 100%
rename from src/compiler/dex/backend.h
rename to compiler/dex/backend.h
diff --git a/src/compiler/dex/compiler_enums.h b/compiler/dex/compiler_enums.h
similarity index 100%
rename from src/compiler/dex/compiler_enums.h
rename to compiler/dex/compiler_enums.h
diff --git a/src/compiler/dex/compiler_internals.h b/compiler/dex/compiler_internals.h
similarity index 95%
rename from src/compiler/dex/compiler_internals.h
rename to compiler/dex/compiler_internals.h
index c680f1b..a3fa25e 100644
--- a/src/compiler/dex/compiler_internals.h
+++ b/compiler/dex/compiler_internals.h
@@ -24,8 +24,8 @@
 
 #include "base/logging.h"
 #include "class_linker.h"
+#include "driver/compiler_driver.h"
 #include "quick/mir_to_lir.h"
-#include "compiler/driver/compiler_driver.h"
 #include "mir_graph.h"
 #include "compiler_ir.h"
 #include "frontend.h"
diff --git a/src/compiler/dex/compiler_ir.h b/compiler/dex/compiler_ir.h
similarity index 94%
rename from src/compiler/dex/compiler_ir.h
rename to compiler/dex/compiler_ir.h
index eb1aec1..c6f99f3 100644
--- a/src/compiler/dex/compiler_ir.h
+++ b/compiler/dex/compiler_ir.h
@@ -19,16 +19,16 @@
 
 #include <vector>
 #include <llvm/IR/Module.h>
-#include "compiler/dex/quick/mir_to_lir.h"
-#include "backend.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/driver/dex_compilation_unit.h"
-#include "compiler/llvm/intrinsic_helper.h"
-#include "compiler/llvm/ir_builder.h"
-#include "compiler_enums.h"
-#include "dex_instruction.h"
-#include "safe_map.h"
 #include "arena_allocator.h"
+#include "backend.h"
+#include "compiler_enums.h"
+#include "dex/quick/mir_to_lir.h"
+#include "dex_instruction.h"
+#include "driver/compiler_driver.h"
+#include "driver/dex_compilation_unit.h"
+#include "llvm/intrinsic_helper.h"
+#include "llvm/ir_builder.h"
+#include "safe_map.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/dataflow_iterator-inl.h b/compiler/dex/dataflow_iterator-inl.h
similarity index 100%
rename from src/compiler/dex/dataflow_iterator-inl.h
rename to compiler/dex/dataflow_iterator-inl.h
diff --git a/src/compiler/dex/dataflow_iterator.h b/compiler/dex/dataflow_iterator.h
similarity index 100%
rename from src/compiler/dex/dataflow_iterator.h
rename to compiler/dex/dataflow_iterator.h
diff --git a/src/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc
similarity index 98%
rename from src/compiler/dex/dex_to_dex_compiler.cc
rename to compiler/dex/dex_to_dex_compiler.cc
index 734829a..ee68a5d 100644
--- a/src/compiler/dex/dex_to_dex_compiler.cc
+++ b/compiler/dex/dex_to_dex_compiler.cc
@@ -16,10 +16,10 @@
 
 #include "base/logging.h"
 #include "base/mutex.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/driver/dex_compilation_unit.h"
 #include "dex_file-inl.h"
 #include "dex_instruction-inl.h"
+#include "driver/compiler_driver.h"
+#include "driver/dex_compilation_unit.h"
 #include "mirror/abstract_method-inl.h"
 #include "mirror/class-inl.h"
 #include "mirror/dex_cache.h"
diff --git a/src/compiler/dex/frontend.cc b/compiler/dex/frontend.cc
similarity index 98%
rename from src/compiler/dex/frontend.cc
rename to compiler/dex/frontend.cc
index 033657b..746d475 100644
--- a/src/compiler/dex/frontend.cc
+++ b/compiler/dex/frontend.cc
@@ -16,19 +16,20 @@
 
 #include <llvm/Support/Threading.h>
 
-#include "compiler/driver/compiler_driver.h"
 #include "compiler_internals.h"
+#include "driver/compiler_driver.h"
 #include "dataflow_iterator-inl.h"
-#if defined(ART_USE_PORTABLE_COMPILER)
-#include "compiler/llvm/llvm_compilation_unit.h"
-#include "compiler/dex/portable/mir_to_gbc.h"
-#endif
 #include "leb128.h"
 #include "mirror/object.h"
 #include "runtime.h"
 #include "backend.h"
 #include "base/logging.h"
 
+#if defined(ART_USE_PORTABLE_COMPILER)
+#include "dex/portable/mir_to_gbc.h"
+#include "llvm/llvm_compilation_unit.h"
+#endif
+
 namespace {
 #if !defined(ART_USE_PORTABLE_COMPILER)
   pthread_once_t llvm_multi_init = PTHREAD_ONCE_INIT;
diff --git a/src/compiler/dex/frontend.h b/compiler/dex/frontend.h
similarity index 100%
rename from src/compiler/dex/frontend.h
rename to compiler/dex/frontend.h
diff --git a/src/compiler/dex/growable_array.h b/compiler/dex/growable_array.h
similarity index 100%
rename from src/compiler/dex/growable_array.h
rename to compiler/dex/growable_array.h
diff --git a/src/compiler/dex/local_value_numbering.cc b/compiler/dex/local_value_numbering.cc
similarity index 100%
rename from src/compiler/dex/local_value_numbering.cc
rename to compiler/dex/local_value_numbering.cc
diff --git a/src/compiler/dex/local_value_numbering.h b/compiler/dex/local_value_numbering.h
similarity index 100%
rename from src/compiler/dex/local_value_numbering.h
rename to compiler/dex/local_value_numbering.h
diff --git a/src/compiler/dex/mir_dataflow.cc b/compiler/dex/mir_dataflow.cc
similarity index 100%
rename from src/compiler/dex/mir_dataflow.cc
rename to compiler/dex/mir_dataflow.cc
diff --git a/src/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc
similarity index 100%
rename from src/compiler/dex/mir_graph.cc
rename to compiler/dex/mir_graph.cc
diff --git a/src/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h
similarity index 100%
rename from src/compiler/dex/mir_graph.h
rename to compiler/dex/mir_graph.h
diff --git a/src/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc
similarity index 100%
rename from src/compiler/dex/mir_optimization.cc
rename to compiler/dex/mir_optimization.cc
diff --git a/src/compiler/dex/portable/mir_to_gbc.cc b/compiler/dex/portable/mir_to_gbc.cc
similarity index 99%
rename from src/compiler/dex/portable/mir_to_gbc.cc
rename to compiler/dex/portable/mir_to_gbc.cc
index 1f9c92a..2be1ef4 100644
--- a/src/compiler/dex/portable/mir_to_gbc.cc
+++ b/compiler/dex/portable/mir_to_gbc.cc
@@ -27,13 +27,13 @@
 #include <llvm/Support/InstIterator.h>
 #include <llvm/Support/ToolOutputFile.h>
 
-#include "compiler/dex/compiler_internals.h"
-#include "compiler/dex/dataflow_iterator-inl.h"
-#include "compiler/dex/frontend.h"
+#include "dex/compiler_internals.h"
+#include "dex/dataflow_iterator-inl.h"
+#include "dex/frontend.h"
 #include "mir_to_gbc.h"
 
-#include "compiler/llvm/llvm_compilation_unit.h"
-#include "compiler/llvm/utils_llvm.h"
+#include "llvm/llvm_compilation_unit.h"
+#include "llvm/utils_llvm.h"
 
 const char* kLabelFormat = "%c0x%x_%d";
 const char kInvalidBlock = 0xff;
diff --git a/src/compiler/dex/portable/mir_to_gbc.h b/compiler/dex/portable/mir_to_gbc.h
similarity index 97%
rename from src/compiler/dex/portable/mir_to_gbc.h
rename to compiler/dex/portable/mir_to_gbc.h
index 233735b..8aa0271 100644
--- a/src/compiler/dex/portable/mir_to_gbc.h
+++ b/compiler/dex/portable/mir_to_gbc.h
@@ -19,10 +19,10 @@
 
 #include "invoke_type.h"
 #include "compiled_method.h"
-#include "compiler/dex/compiler_enums.h"
-#include "compiler/dex/compiler_ir.h"
-#include "compiler/dex/backend.h"
-#include "compiler/llvm/llvm_compilation_unit.h"
+#include "dex/compiler_enums.h"
+#include "dex/compiler_ir.h"
+#include "dex/backend.h"
+#include "llvm/llvm_compilation_unit.h"
 #include "safe_map.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/arm/arm_lir.h b/compiler/dex/quick/arm/arm_lir.h
similarity index 99%
rename from src/compiler/dex/quick/arm/arm_lir.h
rename to compiler/dex/quick/arm/arm_lir.h
index abcaacc..9dd7daf 100644
--- a/src/compiler/dex/quick/arm/arm_lir.h
+++ b/compiler/dex/quick/arm/arm_lir.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_COMPILER_DEX_QUICK_ARM_ARMLIR_H_
 #define ART_SRC_COMPILER_DEX_QUICK_ARM_ARMLIR_H_
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/arm/assemble_arm.cc b/compiler/dex/quick/arm/assemble_arm.cc
similarity index 99%
rename from src/compiler/dex/quick/arm/assemble_arm.cc
rename to compiler/dex/quick/arm/assemble_arm.cc
index 36038f7..e804215 100644
--- a/src/compiler/dex/quick/arm/assemble_arm.cc
+++ b/compiler/dex/quick/arm/assemble_arm.cc
@@ -16,7 +16,7 @@
 
 #include "arm_lir.h"
 #include "codegen_arm.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/arm/call_arm.cc b/compiler/dex/quick/arm/call_arm.cc
similarity index 99%
rename from src/compiler/dex/quick/arm/call_arm.cc
rename to compiler/dex/quick/arm/call_arm.cc
index 879065f..a6720ce 100644
--- a/src/compiler/dex/quick/arm/call_arm.cc
+++ b/compiler/dex/quick/arm/call_arm.cc
@@ -18,7 +18,7 @@
 
 #include "arm_lir.h"
 #include "codegen_arm.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "oat/runtime/oat_support_entrypoints.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/arm/codegen_arm.h b/compiler/dex/quick/arm/codegen_arm.h
similarity index 99%
rename from src/compiler/dex/quick/arm/codegen_arm.h
rename to compiler/dex/quick/arm/codegen_arm.h
index 60111d1..a9199df 100644
--- a/src/compiler/dex/quick/arm/codegen_arm.h
+++ b/compiler/dex/quick/arm/codegen_arm.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_COMPILER_DEX_QUICK_ARM_CODEGENARM_H_
 #define ART_SRC_COMPILER_DEX_QUICK_ARM_CODEGENARM_H_
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/arm/fp_arm.cc b/compiler/dex/quick/arm/fp_arm.cc
similarity index 99%
rename from src/compiler/dex/quick/arm/fp_arm.cc
rename to compiler/dex/quick/arm/fp_arm.cc
index cd71c07..53a5e1a 100644
--- a/src/compiler/dex/quick/arm/fp_arm.cc
+++ b/compiler/dex/quick/arm/fp_arm.cc
@@ -16,7 +16,7 @@
 
 #include "arm_lir.h"
 #include "codegen_arm.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/arm/int_arm.cc b/compiler/dex/quick/arm/int_arm.cc
similarity index 99%
rename from src/compiler/dex/quick/arm/int_arm.cc
rename to compiler/dex/quick/arm/int_arm.cc
index 110e9f4..feea896 100644
--- a/src/compiler/dex/quick/arm/int_arm.cc
+++ b/compiler/dex/quick/arm/int_arm.cc
@@ -18,7 +18,7 @@
 
 #include "arm_lir.h"
 #include "codegen_arm.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mirror/array.h"
 #include "oat/runtime/oat_support_entrypoints.h"
 
diff --git a/src/compiler/dex/quick/arm/target_arm.cc b/compiler/dex/quick/arm/target_arm.cc
similarity index 99%
rename from src/compiler/dex/quick/arm/target_arm.cc
rename to compiler/dex/quick/arm/target_arm.cc
index ee127a8..4bece13 100644
--- a/src/compiler/dex/quick/arm/target_arm.cc
+++ b/compiler/dex/quick/arm/target_arm.cc
@@ -18,8 +18,8 @@
 
 #include "arm_lir.h"
 #include "codegen_arm.h"
-#include "compiler/dex/compiler_internals.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/compiler_internals.h"
+#include "dex/quick/mir_to_lir-inl.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/arm/utility_arm.cc b/compiler/dex/quick/arm/utility_arm.cc
similarity index 99%
rename from src/compiler/dex/quick/arm/utility_arm.cc
rename to compiler/dex/quick/arm/utility_arm.cc
index ef0cc72..abf921f 100644
--- a/src/compiler/dex/quick/arm/utility_arm.cc
+++ b/compiler/dex/quick/arm/utility_arm.cc
@@ -16,7 +16,7 @@
 
 #include "arm_lir.h"
 #include "codegen_arm.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
similarity index 99%
rename from src/compiler/dex/quick/codegen_util.cc
rename to compiler/dex/quick/codegen_util.cc
index 766cdce..5c10c4c 100644
--- a/src/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 #include "dex_file-inl.h"
 #include "gc_map.h"
 #include "mir_to_lir-inl.h"
diff --git a/src/compiler/dex/quick/gen_common.cc b/compiler/dex/quick/gen_common.cc
similarity index 99%
rename from src/compiler/dex/quick/gen_common.cc
rename to compiler/dex/quick/gen_common.cc
index 2980acb..865b9c5 100644
--- a/src/compiler/dex/quick/gen_common.cc
+++ b/compiler/dex/quick/gen_common.cc
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-#include "compiler/dex/compiler_ir.h"
-#include "compiler/dex/compiler_internals.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/compiler_ir.h"
+#include "dex/compiler_internals.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mirror/array.h"
 #include "oat/runtime/oat_support_entrypoints.h"
 #include "verifier/method_verifier.h"
diff --git a/src/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc
similarity index 99%
rename from src/compiler/dex/quick/gen_invoke.cc
rename to compiler/dex/quick/gen_invoke.cc
index 3bc7340..e3993e0 100644
--- a/src/compiler/dex/quick/gen_invoke.cc
+++ b/compiler/dex/quick/gen_invoke.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "compiler/dex/compiler_ir.h"
+#include "dex/compiler_ir.h"
 #include "dex_file-inl.h"
 #include "invoke_type.h"
 #include "mirror/array.h"
diff --git a/src/compiler/dex/quick/gen_loadstore.cc b/compiler/dex/quick/gen_loadstore.cc
similarity index 98%
rename from src/compiler/dex/quick/gen_loadstore.cc
rename to compiler/dex/quick/gen_loadstore.cc
index 085f7f5..6a25c1d 100644
--- a/src/compiler/dex/quick/gen_loadstore.cc
+++ b/compiler/dex/quick/gen_loadstore.cc
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-#include "compiler/dex/compiler_ir.h"
-#include "compiler/dex/compiler_internals.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/compiler_ir.h"
+#include "dex/compiler_internals.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "invoke_type.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/local_optimizations.cc b/compiler/dex/quick/local_optimizations.cc
similarity index 99%
rename from src/compiler/dex/quick/local_optimizations.cc
rename to compiler/dex/quick/local_optimizations.cc
index 1cafce4..ac654d8 100644
--- a/src/compiler/dex/quick/local_optimizations.cc
+++ b/compiler/dex/quick/local_optimizations.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/mips/README.mips b/compiler/dex/quick/mips/README.mips
similarity index 100%
rename from src/compiler/dex/quick/mips/README.mips
rename to compiler/dex/quick/mips/README.mips
diff --git a/src/compiler/dex/quick/mips/assemble_mips.cc b/compiler/dex/quick/mips/assemble_mips.cc
similarity index 99%
rename from src/compiler/dex/quick/mips/assemble_mips.cc
rename to compiler/dex/quick/mips/assemble_mips.cc
index 002a23e..2482aa4 100644
--- a/src/compiler/dex/quick/mips/assemble_mips.cc
+++ b/compiler/dex/quick/mips/assemble_mips.cc
@@ -15,7 +15,7 @@
  */
 
 #include "codegen_mips.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mips_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/mips/call_mips.cc b/compiler/dex/quick/mips/call_mips.cc
similarity index 99%
rename from src/compiler/dex/quick/mips/call_mips.cc
rename to compiler/dex/quick/mips/call_mips.cc
index ddaf081..eb0302e 100644
--- a/src/compiler/dex/quick/mips/call_mips.cc
+++ b/compiler/dex/quick/mips/call_mips.cc
@@ -17,7 +17,7 @@
 /* This file contains codegen for the Mips ISA */
 
 #include "codegen_mips.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mips_lir.h"
 #include "oat/runtime/oat_support_entrypoints.h"
 
diff --git a/src/compiler/dex/quick/mips/codegen_mips.h b/compiler/dex/quick/mips/codegen_mips.h
similarity index 99%
rename from src/compiler/dex/quick/mips/codegen_mips.h
rename to compiler/dex/quick/mips/codegen_mips.h
index 9fa8f77..9723b899 100644
--- a/src/compiler/dex/quick/mips/codegen_mips.h
+++ b/compiler/dex/quick/mips/codegen_mips.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_DEX_QUICK_CODEGEN_MIPS_CODEGENMIPS_H_
 #define ART_SRC_DEX_QUICK_CODEGEN_MIPS_CODEGENMIPS_H_
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 #include "mips_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/mips/fp_mips.cc b/compiler/dex/quick/mips/fp_mips.cc
similarity index 99%
rename from src/compiler/dex/quick/mips/fp_mips.cc
rename to compiler/dex/quick/mips/fp_mips.cc
index f384da1..8581d5b 100644
--- a/src/compiler/dex/quick/mips/fp_mips.cc
+++ b/compiler/dex/quick/mips/fp_mips.cc
@@ -15,8 +15,8 @@
  */
 
 #include "codegen_mips.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mips_lir.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
 #include "oat/runtime/oat_support_entrypoints.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/mips/int_mips.cc b/compiler/dex/quick/mips/int_mips.cc
similarity index 99%
rename from src/compiler/dex/quick/mips/int_mips.cc
rename to compiler/dex/quick/mips/int_mips.cc
index fe9e83f..8bfc4e1 100644
--- a/src/compiler/dex/quick/mips/int_mips.cc
+++ b/compiler/dex/quick/mips/int_mips.cc
@@ -17,7 +17,7 @@
 /* This file contains codegen for the Mips ISA */
 
 #include "codegen_mips.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mips_lir.h"
 #include "mirror/array.h"
 #include "oat/runtime/oat_support_entrypoints.h"
diff --git a/src/compiler/dex/quick/mips/mips_lir.h b/compiler/dex/quick/mips/mips_lir.h
similarity index 99%
rename from src/compiler/dex/quick/mips/mips_lir.h
rename to compiler/dex/quick/mips/mips_lir.h
index 9771ea9..ceab9ab 100644
--- a/src/compiler/dex/quick/mips/mips_lir.h
+++ b/compiler/dex/quick/mips/mips_lir.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_COMPILER_DEX_QUICK_MIPS_MIPSLIR_H_
 #define ART_SRC_COMPILER_DEX_QUICK_MIPS_MIPSLIR_H_
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/mips/target_mips.cc b/compiler/dex/quick/mips/target_mips.cc
similarity index 99%
rename from src/compiler/dex/quick/mips/target_mips.cc
rename to compiler/dex/quick/mips/target_mips.cc
index 356104c..cab2c1b 100644
--- a/src/compiler/dex/quick/mips/target_mips.cc
+++ b/compiler/dex/quick/mips/target_mips.cc
@@ -15,8 +15,8 @@
  */
 
 #include "codegen_mips.h"
-#include "compiler/dex/compiler_internals.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/compiler_internals.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mips_lir.h"
 
 #include <string>
diff --git a/src/compiler/dex/quick/mips/utility_mips.cc b/compiler/dex/quick/mips/utility_mips.cc
similarity index 99%
rename from src/compiler/dex/quick/mips/utility_mips.cc
rename to compiler/dex/quick/mips/utility_mips.cc
index 257b0f6..8daafc8 100644
--- a/src/compiler/dex/quick/mips/utility_mips.cc
+++ b/compiler/dex/quick/mips/utility_mips.cc
@@ -15,7 +15,7 @@
  */
 
 #include "codegen_mips.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mips_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/mir_to_lir-inl.h b/compiler/dex/quick/mir_to_lir-inl.h
similarity index 98%
rename from src/compiler/dex/quick/mir_to_lir-inl.h
rename to compiler/dex/quick/mir_to_lir-inl.h
index f754692..4eef264 100644
--- a/src/compiler/dex/quick/mir_to_lir-inl.h
+++ b/compiler/dex/quick/mir_to_lir-inl.h
@@ -19,7 +19,7 @@
 
 #include "mir_to_lir.h"
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/quick/mir_to_lir.cc b/compiler/dex/quick/mir_to_lir.cc
similarity index 99%
rename from src/compiler/dex/quick/mir_to_lir.cc
rename to compiler/dex/quick/mir_to_lir.cc
index 754aae4..4562482 100644
--- a/src/compiler/dex/quick/mir_to_lir.cc
+++ b/compiler/dex/quick/mir_to_lir.cc
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#include "compiler/dex/compiler_internals.h"
-#include "compiler/dex/dataflow_iterator-inl.h"
+#include "dex/compiler_internals.h"
+#include "dex/dataflow_iterator-inl.h"
 #include "mir_to_lir-inl.h"
 #include "object_utils.h"
 
diff --git a/src/compiler/dex/quick/mir_to_lir.h b/compiler/dex/quick/mir_to_lir.h
similarity index 99%
rename from src/compiler/dex/quick/mir_to_lir.h
rename to compiler/dex/quick/mir_to_lir.h
index 93098db..47514f7 100644
--- a/src/compiler/dex/quick/mir_to_lir.h
+++ b/compiler/dex/quick/mir_to_lir.h
@@ -19,12 +19,12 @@
 
 #include "invoke_type.h"
 #include "compiled_method.h"
-#include "compiler/dex/compiler_enums.h"
-#include "compiler/dex/compiler_ir.h"
-#include "compiler/dex/backend.h"
-#include "compiler/dex/growable_array.h"
-#include "compiler/dex/arena_allocator.h"
-#include "compiler/driver/compiler_driver.h"
+#include "dex/compiler_enums.h"
+#include "dex/compiler_ir.h"
+#include "dex/backend.h"
+#include "dex/growable_array.h"
+#include "dex/arena_allocator.h"
+#include "driver/compiler_driver.h"
 #include "safe_map.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/ralloc_util.cc b/compiler/dex/quick/ralloc_util.cc
similarity index 99%
rename from src/compiler/dex/quick/ralloc_util.cc
rename to compiler/dex/quick/ralloc_util.cc
index 8e0dba3..8f43542 100644
--- a/src/compiler/dex/quick/ralloc_util.cc
+++ b/compiler/dex/quick/ralloc_util.cc
@@ -16,8 +16,8 @@
 
 /* This file contains register alloction support. */
 
-#include "compiler/dex/compiler_ir.h"
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_ir.h"
+#include "dex/compiler_internals.h"
 #include "mir_to_lir-inl.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/x86/assemble_x86.cc b/compiler/dex/quick/x86/assemble_x86.cc
similarity index 99%
rename from src/compiler/dex/quick/x86/assemble_x86.cc
rename to compiler/dex/quick/x86/assemble_x86.cc
index 83dabe6..4aeda41 100644
--- a/src/compiler/dex/quick/x86/assemble_x86.cc
+++ b/compiler/dex/quick/x86/assemble_x86.cc
@@ -15,7 +15,7 @@
  */
 
 #include "codegen_x86.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "x86_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/x86/call_x86.cc b/compiler/dex/quick/x86/call_x86.cc
similarity index 99%
rename from src/compiler/dex/quick/x86/call_x86.cc
rename to compiler/dex/quick/x86/call_x86.cc
index dba0e24..d60be72 100644
--- a/src/compiler/dex/quick/x86/call_x86.cc
+++ b/compiler/dex/quick/x86/call_x86.cc
@@ -17,7 +17,7 @@
 /* This file contains codegen for the X86 ISA */
 
 #include "codegen_x86.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "x86_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/x86/codegen_x86.h b/compiler/dex/quick/x86/codegen_x86.h
similarity index 99%
rename from src/compiler/dex/quick/x86/codegen_x86.h
rename to compiler/dex/quick/x86/codegen_x86.h
index 9050656..3e30141 100644
--- a/src/compiler/dex/quick/x86/codegen_x86.h
+++ b/compiler/dex/quick/x86/codegen_x86.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_COMPILER_DEX_QUICK_X86_CODEGENX86_H_
 #define ART_SRC_COMPILER_DEX_QUICK_X86_CODEGENX86_H_
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 #include "x86_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/x86/fp_x86.cc b/compiler/dex/quick/x86/fp_x86.cc
similarity index 99%
rename from src/compiler/dex/quick/x86/fp_x86.cc
rename to compiler/dex/quick/x86/fp_x86.cc
index 3341e28..906b4cc 100644
--- a/src/compiler/dex/quick/x86/fp_x86.cc
+++ b/compiler/dex/quick/x86/fp_x86.cc
@@ -15,7 +15,7 @@
  */
 
 #include "codegen_x86.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "x86_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/x86/int_x86.cc b/compiler/dex/quick/x86/int_x86.cc
similarity index 99%
rename from src/compiler/dex/quick/x86/int_x86.cc
rename to compiler/dex/quick/x86/int_x86.cc
index fffb900..97d9d2d 100644
--- a/src/compiler/dex/quick/x86/int_x86.cc
+++ b/compiler/dex/quick/x86/int_x86.cc
@@ -17,8 +17,8 @@
 /* This file contains codegen for the X86 ISA */
 
 #include "codegen_x86.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "mirror/array.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
 #include "x86_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc
similarity index 99%
rename from src/compiler/dex/quick/x86/target_x86.cc
rename to compiler/dex/quick/x86/target_x86.cc
index 9110b70..c421ef3 100644
--- a/src/compiler/dex/quick/x86/target_x86.cc
+++ b/compiler/dex/quick/x86/target_x86.cc
@@ -15,8 +15,8 @@
  */
 
 #include "codegen_x86.h"
-#include "compiler/dex/compiler_internals.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/compiler_internals.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "x86_lir.h"
 
 #include <string>
diff --git a/src/compiler/dex/quick/x86/utility_x86.cc b/compiler/dex/quick/x86/utility_x86.cc
similarity index 99%
rename from src/compiler/dex/quick/x86/utility_x86.cc
rename to compiler/dex/quick/x86/utility_x86.cc
index 82466d4..fb07ff1 100644
--- a/src/compiler/dex/quick/x86/utility_x86.cc
+++ b/compiler/dex/quick/x86/utility_x86.cc
@@ -15,7 +15,7 @@
  */
 
 #include "codegen_x86.h"
-#include "compiler/dex/quick/mir_to_lir-inl.h"
+#include "dex/quick/mir_to_lir-inl.h"
 #include "x86_lir.h"
 
 namespace art {
diff --git a/src/compiler/dex/quick/x86/x86_lir.h b/compiler/dex/quick/x86/x86_lir.h
similarity index 99%
rename from src/compiler/dex/quick/x86/x86_lir.h
rename to compiler/dex/quick/x86/x86_lir.h
index 7e9e56e..600bd03 100644
--- a/src/compiler/dex/quick/x86/x86_lir.h
+++ b/compiler/dex/quick/x86/x86_lir.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_COMPILER_DEX_QUICK_X86_X86LIR_H_
 #define ART_SRC_COMPILER_DEX_QUICK_X86_X86LIR_H_
 
-#include "compiler/dex/compiler_internals.h"
+#include "dex/compiler_internals.h"
 
 namespace art {
 
diff --git a/src/compiler/dex/ssa_transformation.cc b/compiler/dex/ssa_transformation.cc
similarity index 100%
rename from src/compiler/dex/ssa_transformation.cc
rename to compiler/dex/ssa_transformation.cc
diff --git a/src/compiler/dex/vreg_analysis.cc b/compiler/dex/vreg_analysis.cc
similarity index 99%
rename from src/compiler/dex/vreg_analysis.cc
rename to compiler/dex/vreg_analysis.cc
index b941140..adbda5c 100644
--- a/src/compiler/dex/vreg_analysis.cc
+++ b/compiler/dex/vreg_analysis.cc
@@ -15,7 +15,7 @@
  */
 
 #include "compiler_internals.h"
-#include "compiler/dex/dataflow_iterator-inl.h"
+#include "dex/dataflow_iterator-inl.h"
 
 namespace art {
 
diff --git a/src/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
similarity index 99%
rename from src/compiler/driver/compiler_driver.cc
rename to compiler/driver/compiler_driver.cc
index 8759958..8388cfb 100644
--- a/src/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -23,7 +23,6 @@
 #include "base/stl_util.h"
 #include "base/timing_logger.h"
 #include "class_linker.h"
-#include "compiler/stubs/stubs.h"
 #include "dex_compilation_unit.h"
 #include "dex_file-inl.h"
 #include "jni_internal.h"
@@ -43,14 +42,15 @@
 #include "mirror/throwable.h"
 #include "scoped_thread_state_change.h"
 #include "ScopedLocalRef.h"
+#include "stubs/stubs.h"
 #include "thread.h"
 #include "thread_pool.h"
 #include "verifier/method_verifier.h"
 
 #if defined(ART_USE_PORTABLE_COMPILER)
-#include "compiler/elf_writer_mclinker.h"
+#include "elf_writer_mclinker.h"
 #else
-#include "compiler/elf_writer_quick.h"
+#include "elf_writer_quick.h"
 #endif
 
 namespace art {
diff --git a/src/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h
similarity index 100%
rename from src/compiler/driver/compiler_driver.h
rename to compiler/driver/compiler_driver.h
diff --git a/src/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc
similarity index 99%
rename from src/compiler/driver/compiler_driver_test.cc
rename to compiler/driver/compiler_driver_test.cc
index abf8a9a..6a160f7 100644
--- a/src/compiler/driver/compiler_driver_test.cc
+++ b/compiler/driver/compiler_driver_test.cc
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include "compiler/driver/compiler_driver.h"
+#include "driver/compiler_driver.h"
 
 #include <stdint.h>
 #include <stdio.h>
diff --git a/src/compiler/driver/dex_compilation_unit.cc b/compiler/driver/dex_compilation_unit.cc
similarity index 96%
rename from src/compiler/driver/dex_compilation_unit.cc
rename to compiler/driver/dex_compilation_unit.cc
index c7a4df6..6ba338a 100644
--- a/src/compiler/driver/dex_compilation_unit.cc
+++ b/compiler/driver/dex_compilation_unit.cc
@@ -17,8 +17,8 @@
 #include "dex_compilation_unit.h"
 
 #include "base/stringprintf.h"
-#include "compiler/dex/compiler_ir.h"
-#include "compiler/dex/mir_graph.h"
+#include "dex/compiler_ir.h"
+#include "dex/mir_graph.h"
 #include "utils.h"
 
 namespace art {
diff --git a/src/compiler/driver/dex_compilation_unit.h b/compiler/driver/dex_compilation_unit.h
similarity index 100%
rename from src/compiler/driver/dex_compilation_unit.h
rename to compiler/driver/dex_compilation_unit.h
diff --git a/src/compiler/elf_fixup.cc b/compiler/elf_fixup.cc
similarity index 100%
rename from src/compiler/elf_fixup.cc
rename to compiler/elf_fixup.cc
diff --git a/src/compiler/elf_fixup.h b/compiler/elf_fixup.h
similarity index 100%
rename from src/compiler/elf_fixup.h
rename to compiler/elf_fixup.h
diff --git a/src/compiler/elf_stripper.cc b/compiler/elf_stripper.cc
similarity index 100%
rename from src/compiler/elf_stripper.cc
rename to compiler/elf_stripper.cc
diff --git a/src/compiler/elf_stripper.h b/compiler/elf_stripper.h
similarity index 100%
rename from src/compiler/elf_stripper.h
rename to compiler/elf_stripper.h
diff --git a/src/compiler/elf_writer.cc b/compiler/elf_writer.cc
similarity index 95%
rename from src/compiler/elf_writer.cc
rename to compiler/elf_writer.cc
index 7592eb5..0823a53 100644
--- a/src/compiler/elf_writer.cc
+++ b/compiler/elf_writer.cc
@@ -18,12 +18,12 @@
 
 #include "base/unix_file/fd_file.h"
 #include "class_linker.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/llvm/utils_llvm.h"
 #include "dex_file-inl.h"
 #include "dex_method_iterator.h"
+#include "driver/compiler_driver.h"
 #include "elf_file.h"
 #include "invoke_type.h"
+#include "llvm/utils_llvm.h"
 #include "mirror/abstract_method-inl.h"
 #include "mirror/object-inl.h"
 #include "oat.h"
diff --git a/src/compiler/elf_writer.h b/compiler/elf_writer.h
similarity index 100%
rename from src/compiler/elf_writer.h
rename to compiler/elf_writer.h
diff --git a/src/compiler/elf_writer_mclinker.cc b/compiler/elf_writer_mclinker.cc
similarity index 99%
rename from src/compiler/elf_writer_mclinker.cc
rename to compiler/elf_writer_mclinker.cc
index 47887a5..472a606 100644
--- a/src/compiler/elf_writer_mclinker.cc
+++ b/compiler/elf_writer_mclinker.cc
@@ -29,8 +29,8 @@
 
 #include "base/unix_file/fd_file.h"
 #include "class_linker.h"
-#include "compiler/driver/compiler_driver.h"
 #include "dex_method_iterator.h"
+#include "driver/compiler_driver.h"
 #include "elf_file.h"
 #include "globals.h"
 #include "mirror/abstract_method.h"
diff --git a/src/compiler/elf_writer_mclinker.h b/compiler/elf_writer_mclinker.h
similarity index 100%
rename from src/compiler/elf_writer_mclinker.h
rename to compiler/elf_writer_mclinker.h
diff --git a/src/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc
similarity index 99%
rename from src/compiler/elf_writer_quick.cc
rename to compiler/elf_writer_quick.cc
index c3c5415..9de96d2 100644
--- a/src/compiler/elf_writer_quick.cc
+++ b/compiler/elf_writer_quick.cc
@@ -18,7 +18,7 @@
 
 #include "base/logging.h"
 #include "base/unix_file/fd_file.h"
-#include "compiler/driver/compiler_driver.h"
+#include "driver/compiler_driver.h"
 #include "globals.h"
 #include "oat.h"
 #include "utils.h"
diff --git a/src/compiler/elf_writer_quick.h b/compiler/elf_writer_quick.h
similarity index 100%
rename from src/compiler/elf_writer_quick.h
rename to compiler/elf_writer_quick.h
diff --git a/src/compiler/elf_writer_test.cc b/compiler/elf_writer_test.cc
similarity index 100%
rename from src/compiler/elf_writer_test.cc
rename to compiler/elf_writer_test.cc
diff --git a/src/compiler/image_writer.cc b/compiler/image_writer.cc
similarity index 99%
rename from src/compiler/image_writer.cc
rename to compiler/image_writer.cc
index 8b84e12..8d32a91 100644
--- a/src/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -24,9 +24,9 @@
 #include "base/unix_file/fd_file.h"
 #include "class_linker.h"
 #include "compiled_method.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/elf_writer.h"
 #include "dex_file-inl.h"
+#include "driver/compiler_driver.h"
+#include "elf_writer.h"
 #include "gc/accounting/card_table-inl.h"
 #include "gc/accounting/heap_bitmap.h"
 #include "gc/heap.h"
diff --git a/src/compiler/image_writer.h b/compiler/image_writer.h
similarity index 99%
rename from src/compiler/image_writer.h
rename to compiler/image_writer.h
index b79cb2f..9b0d671 100644
--- a/src/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -23,7 +23,7 @@
 #include <set>
 #include <string>
 
-#include "compiler/driver/compiler_driver.h"
+#include "driver/compiler_driver.h"
 #include "mem_map.h"
 #include "oat_file.h"
 #include "mirror/dex_cache.h"
diff --git a/src/compiler/jni/jni_compiler_test.cc b/compiler/jni/jni_compiler_test.cc
similarity index 100%
rename from src/compiler/jni/jni_compiler_test.cc
rename to compiler/jni/jni_compiler_test.cc
diff --git a/src/compiler/jni/portable/jni_compiler.cc b/compiler/jni/portable/jni_compiler.cc
similarity index 96%
rename from src/compiler/jni/portable/jni_compiler.cc
rename to compiler/jni/portable/jni_compiler.cc
index cd8158d..44d0c2d 100644
--- a/src/compiler/jni/portable/jni_compiler.cc
+++ b/compiler/jni/portable/jni_compiler.cc
@@ -19,14 +19,14 @@
 #include "base/logging.h"
 #include "class_linker.h"
 #include "compiled_method.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/driver/dex_compilation_unit.h"
-#include "compiler/llvm/compiler_llvm.h"
-#include "compiler/llvm/ir_builder.h"
-#include "compiler/llvm/llvm_compilation_unit.h"
-#include "compiler/llvm/runtime_support_llvm_func.h"
-#include "compiler/llvm/utils_llvm.h"
 #include "dex_file-inl.h"
+#include "driver/compiler_driver.h"
+#include "driver/dex_compilation_unit.h"
+#include "llvm/compiler_llvm.h"
+#include "llvm/ir_builder.h"
+#include "llvm/llvm_compilation_unit.h"
+#include "llvm/runtime_support_llvm_func.h"
+#include "llvm/utils_llvm.h"
 #include "mirror/abstract_method.h"
 #include "runtime.h"
 #include "stack.h"
diff --git a/src/compiler/jni/portable/jni_compiler.h b/compiler/jni/portable/jni_compiler.h
similarity index 100%
rename from src/compiler/jni/portable/jni_compiler.h
rename to compiler/jni/portable/jni_compiler.h
diff --git a/src/compiler/jni/quick/arm/calling_convention_arm.cc b/compiler/jni/quick/arm/calling_convention_arm.cc
similarity index 100%
rename from src/compiler/jni/quick/arm/calling_convention_arm.cc
rename to compiler/jni/quick/arm/calling_convention_arm.cc
diff --git a/src/compiler/jni/quick/arm/calling_convention_arm.h b/compiler/jni/quick/arm/calling_convention_arm.h
similarity index 98%
rename from src/compiler/jni/quick/arm/calling_convention_arm.h
rename to compiler/jni/quick/arm/calling_convention_arm.h
index 7a3e738..3787d45 100644
--- a/src/compiler/jni/quick/arm/calling_convention_arm.h
+++ b/compiler/jni/quick/arm/calling_convention_arm.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_OAT_JNI_ARM_CALLING_CONVENTION_ARM_H_
 #define ART_SRC_OAT_JNI_ARM_CALLING_CONVENTION_ARM_H_
 
-#include "compiler/jni/quick/calling_convention.h"
+#include "jni/quick/calling_convention.h"
 
 namespace art {
 namespace arm {
diff --git a/src/compiler/jni/quick/calling_convention.cc b/compiler/jni/quick/calling_convention.cc
similarity index 96%
rename from src/compiler/jni/quick/calling_convention.cc
rename to compiler/jni/quick/calling_convention.cc
index 512483e..5d5eaf2 100644
--- a/src/compiler/jni/quick/calling_convention.cc
+++ b/compiler/jni/quick/calling_convention.cc
@@ -17,9 +17,9 @@
 #include "calling_convention.h"
 
 #include "base/logging.h"
-#include "compiler/jni/quick/arm/calling_convention_arm.h"
-#include "compiler/jni/quick/mips/calling_convention_mips.h"
-#include "compiler/jni/quick/x86/calling_convention_x86.h"
+#include "jni/quick/arm/calling_convention_arm.h"
+#include "jni/quick/mips/calling_convention_mips.h"
+#include "jni/quick/x86/calling_convention_x86.h"
 #include "utils.h"
 
 namespace art {
diff --git a/src/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h
similarity index 100%
rename from src/compiler/jni/quick/calling_convention.h
rename to compiler/jni/quick/calling_convention.h
diff --git a/src/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc
similarity index 99%
rename from src/compiler/jni/quick/jni_compiler.cc
rename to compiler/jni/quick/jni_compiler.cc
index 3b85384..fa227f7 100644
--- a/src/compiler/jni/quick/jni_compiler.cc
+++ b/compiler/jni/quick/jni_compiler.cc
@@ -22,8 +22,8 @@
 #include "calling_convention.h"
 #include "class_linker.h"
 #include "compiled_method.h"
-#include "compiler/driver/compiler_driver.h"
 #include "dex_file-inl.h"
+#include "driver/compiler_driver.h"
 #include "disassembler.h"
 #include "jni_internal.h"
 #include "oat/runtime/oat_support_entrypoints.h"
diff --git a/src/compiler/jni/quick/mips/calling_convention_mips.cc b/compiler/jni/quick/mips/calling_convention_mips.cc
similarity index 100%
rename from src/compiler/jni/quick/mips/calling_convention_mips.cc
rename to compiler/jni/quick/mips/calling_convention_mips.cc
diff --git a/src/compiler/jni/quick/mips/calling_convention_mips.h b/compiler/jni/quick/mips/calling_convention_mips.h
similarity index 98%
rename from src/compiler/jni/quick/mips/calling_convention_mips.h
rename to compiler/jni/quick/mips/calling_convention_mips.h
index b9b2b72..9068136 100644
--- a/src/compiler/jni/quick/mips/calling_convention_mips.h
+++ b/compiler/jni/quick/mips/calling_convention_mips.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_OAT_JNI_MIPS_CALLING_CONVENTION_MIPS_H_
 #define ART_SRC_OAT_JNI_MIPS_CALLING_CONVENTION_MIPS_H_
 
-#include "compiler/jni/quick/calling_convention.h"
+#include "jni/quick/calling_convention.h"
 
 namespace art {
 namespace mips {
diff --git a/src/compiler/jni/quick/x86/calling_convention_x86.cc b/compiler/jni/quick/x86/calling_convention_x86.cc
similarity index 100%
rename from src/compiler/jni/quick/x86/calling_convention_x86.cc
rename to compiler/jni/quick/x86/calling_convention_x86.cc
diff --git a/src/compiler/jni/quick/x86/calling_convention_x86.h b/compiler/jni/quick/x86/calling_convention_x86.h
similarity index 98%
rename from src/compiler/jni/quick/x86/calling_convention_x86.h
rename to compiler/jni/quick/x86/calling_convention_x86.h
index e80e432..ea8a26e 100644
--- a/src/compiler/jni/quick/x86/calling_convention_x86.h
+++ b/compiler/jni/quick/x86/calling_convention_x86.h
@@ -17,7 +17,7 @@
 #ifndef ART_SRC_OAT_JNI_X86_CALLING_CONVENTION_X86_H_
 #define ART_SRC_OAT_JNI_X86_CALLING_CONVENTION_X86_H_
 
-#include "compiler/jni/quick/calling_convention.h"
+#include "jni/quick/calling_convention.h"
 
 namespace art {
 namespace x86 {
diff --git a/src/compiler/llvm/art_module.ll b/compiler/llvm/art_module.ll
similarity index 100%
rename from src/compiler/llvm/art_module.ll
rename to compiler/llvm/art_module.ll
diff --git a/src/compiler/llvm/backend_options.h b/compiler/llvm/backend_options.h
similarity index 100%
rename from src/compiler/llvm/backend_options.h
rename to compiler/llvm/backend_options.h
diff --git a/src/compiler/llvm/backend_types.h b/compiler/llvm/backend_types.h
similarity index 100%
rename from src/compiler/llvm/backend_types.h
rename to compiler/llvm/backend_types.h
diff --git a/src/compiler/llvm/compiler_llvm.cc b/compiler/llvm/compiler_llvm.cc
similarity index 98%
rename from src/compiler/llvm/compiler_llvm.cc
rename to compiler/llvm/compiler_llvm.cc
index 3af6687..afca223 100644
--- a/src/compiler/llvm/compiler_llvm.cc
+++ b/compiler/llvm/compiler_llvm.cc
@@ -20,11 +20,11 @@
 #include "base/stl_util.h"
 #include "class_linker.h"
 #include "compiled_method.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/driver/dex_compilation_unit.h"
-#include "compiler/jni/portable/jni_compiler.h"
+#include "driver/compiler_driver.h"
+#include "driver/dex_compilation_unit.h"
 #include "globals.h"
 #include "ir_builder.h"
+#include "jni/portable/jni_compiler.h"
 #include "llvm_compilation_unit.h"
 #include "oat_file.h"
 #include "utils_llvm.h"
diff --git a/src/compiler/llvm/compiler_llvm.h b/compiler/llvm/compiler_llvm.h
similarity index 97%
rename from src/compiler/llvm/compiler_llvm.h
rename to compiler/llvm/compiler_llvm.h
index e7717a3..b70ddc5 100644
--- a/src/compiler/llvm/compiler_llvm.h
+++ b/compiler/llvm/compiler_llvm.h
@@ -18,8 +18,8 @@
 #define ART_SRC_COMPILER_LLVM_COMPILER_LLVM_H_
 
 #include "base/macros.h"
-#include "compiler/driver/compiler_driver.h"
 #include "dex_file.h"
+#include "driver/compiler_driver.h"
 #include "instruction_set.h"
 #include "mirror/object.h"
 
diff --git a/src/compiler/llvm/gbc_expander.cc b/compiler/llvm/gbc_expander.cc
similarity index 99%
rename from src/compiler/llvm/gbc_expander.cc
rename to compiler/llvm/gbc_expander.cc
index 4702b37..b139e32 100644
--- a/src/compiler/llvm/gbc_expander.cc
+++ b/compiler/llvm/gbc_expander.cc
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/driver/dex_compilation_unit.h"
 #include "dex_file-inl.h"
+#include "driver/compiler_driver.h"
+#include "driver/dex_compilation_unit.h"
 #include "intrinsic_helper.h"
 #include "ir_builder.h"
 #include "method_reference.h"
@@ -27,9 +27,9 @@
 #include "utils_llvm.h"
 #include "verifier/method_verifier.h"
 
-#include "compiler/dex/mir_graph.h"
-#include "compiler/dex/compiler_ir.h"
-#include "compiler/dex/quick/mir_to_lir.h"
+#include "dex/compiler_ir.h"
+#include "dex/mir_graph.h"
+#include "dex/quick/mir_to_lir.h"
 using art::kMIRIgnoreNullCheck;
 using art::kMIRIgnoreRangeCheck;
 
diff --git a/src/compiler/llvm/generated/art_module.cc b/compiler/llvm/generated/art_module.cc
similarity index 100%
rename from src/compiler/llvm/generated/art_module.cc
rename to compiler/llvm/generated/art_module.cc
diff --git a/src/compiler/llvm/intrinsic_func_list.def b/compiler/llvm/intrinsic_func_list.def
similarity index 100%
rename from src/compiler/llvm/intrinsic_func_list.def
rename to compiler/llvm/intrinsic_func_list.def
diff --git a/src/compiler/llvm/intrinsic_helper.cc b/compiler/llvm/intrinsic_helper.cc
similarity index 100%
rename from src/compiler/llvm/intrinsic_helper.cc
rename to compiler/llvm/intrinsic_helper.cc
diff --git a/src/compiler/llvm/intrinsic_helper.h b/compiler/llvm/intrinsic_helper.h
similarity index 100%
rename from src/compiler/llvm/intrinsic_helper.h
rename to compiler/llvm/intrinsic_helper.h
diff --git a/src/compiler/llvm/ir_builder.cc b/compiler/llvm/ir_builder.cc
similarity index 100%
rename from src/compiler/llvm/ir_builder.cc
rename to compiler/llvm/ir_builder.cc
diff --git a/src/compiler/llvm/ir_builder.h b/compiler/llvm/ir_builder.h
similarity index 99%
rename from src/compiler/llvm/ir_builder.h
rename to compiler/llvm/ir_builder.h
index eb88fca..734b22f 100644
--- a/src/compiler/llvm/ir_builder.h
+++ b/compiler/llvm/ir_builder.h
@@ -18,7 +18,7 @@
 #define ART_SRC_COMPILER_LLVM_IR_BUILDER_H_
 
 #include "backend_types.h"
-#include "compiler/dex/compiler_enums.h"
+#include "dex/compiler_enums.h"
 #include "intrinsic_helper.h"
 #include "md_builder.h"
 #include "runtime_support_builder.h"
diff --git a/src/compiler/llvm/llvm_compilation_unit.cc b/compiler/llvm/llvm_compilation_unit.cc
similarity index 100%
rename from src/compiler/llvm/llvm_compilation_unit.cc
rename to compiler/llvm/llvm_compilation_unit.cc
diff --git a/src/compiler/llvm/llvm_compilation_unit.h b/compiler/llvm/llvm_compilation_unit.h
similarity index 95%
rename from src/compiler/llvm/llvm_compilation_unit.h
rename to compiler/llvm/llvm_compilation_unit.h
index a5d4e11..a4f0adb 100644
--- a/src/compiler/llvm/llvm_compilation_unit.h
+++ b/compiler/llvm/llvm_compilation_unit.h
@@ -19,11 +19,11 @@
 
 #include "base/logging.h"
 #include "base/mutex.h"
-#include "compiler/dex/compiler_internals.h"
-#include "compiler/driver/compiler_driver.h"
+#include "dex/compiler_internals.h"
+#include "driver/compiler_driver.h"
+#include "driver/dex_compilation_unit.h"
 #include "globals.h"
 #include "instruction_set.h"
-#include "compiler/driver/dex_compilation_unit.h"
 #include "runtime_support_builder.h"
 #include "runtime_support_llvm_func.h"
 #include "safe_map.h"
diff --git a/src/compiler/llvm/md_builder.cc b/compiler/llvm/md_builder.cc
similarity index 100%
rename from src/compiler/llvm/md_builder.cc
rename to compiler/llvm/md_builder.cc
diff --git a/src/compiler/llvm/md_builder.h b/compiler/llvm/md_builder.h
similarity index 100%
rename from src/compiler/llvm/md_builder.h
rename to compiler/llvm/md_builder.h
diff --git a/src/compiler/llvm/runtime_support_builder.cc b/compiler/llvm/runtime_support_builder.cc
similarity index 100%
rename from src/compiler/llvm/runtime_support_builder.cc
rename to compiler/llvm/runtime_support_builder.cc
diff --git a/src/compiler/llvm/runtime_support_builder.h b/compiler/llvm/runtime_support_builder.h
similarity index 100%
rename from src/compiler/llvm/runtime_support_builder.h
rename to compiler/llvm/runtime_support_builder.h
diff --git a/src/compiler/llvm/runtime_support_builder_arm.cc b/compiler/llvm/runtime_support_builder_arm.cc
similarity index 100%
rename from src/compiler/llvm/runtime_support_builder_arm.cc
rename to compiler/llvm/runtime_support_builder_arm.cc
diff --git a/src/compiler/llvm/runtime_support_builder_arm.h b/compiler/llvm/runtime_support_builder_arm.h
similarity index 100%
rename from src/compiler/llvm/runtime_support_builder_arm.h
rename to compiler/llvm/runtime_support_builder_arm.h
diff --git a/src/compiler/llvm/runtime_support_builder_thumb2.cc b/compiler/llvm/runtime_support_builder_thumb2.cc
similarity index 100%
rename from src/compiler/llvm/runtime_support_builder_thumb2.cc
rename to compiler/llvm/runtime_support_builder_thumb2.cc
diff --git a/src/compiler/llvm/runtime_support_builder_thumb2.h b/compiler/llvm/runtime_support_builder_thumb2.h
similarity index 100%
rename from src/compiler/llvm/runtime_support_builder_thumb2.h
rename to compiler/llvm/runtime_support_builder_thumb2.h
diff --git a/src/compiler/llvm/runtime_support_builder_x86.cc b/compiler/llvm/runtime_support_builder_x86.cc
similarity index 100%
rename from src/compiler/llvm/runtime_support_builder_x86.cc
rename to compiler/llvm/runtime_support_builder_x86.cc
diff --git a/src/compiler/llvm/runtime_support_builder_x86.h b/compiler/llvm/runtime_support_builder_x86.h
similarity index 100%
rename from src/compiler/llvm/runtime_support_builder_x86.h
rename to compiler/llvm/runtime_support_builder_x86.h
diff --git a/src/compiler/llvm/runtime_support_llvm_func.h b/compiler/llvm/runtime_support_llvm_func.h
similarity index 100%
rename from src/compiler/llvm/runtime_support_llvm_func.h
rename to compiler/llvm/runtime_support_llvm_func.h
diff --git a/src/compiler/llvm/tools/gen_art_module_cc.sh b/compiler/llvm/tools/gen_art_module_cc.sh
similarity index 100%
rename from src/compiler/llvm/tools/gen_art_module_cc.sh
rename to compiler/llvm/tools/gen_art_module_cc.sh
diff --git a/src/compiler/llvm/utils_llvm.h b/compiler/llvm/utils_llvm.h
similarity index 100%
rename from src/compiler/llvm/utils_llvm.h
rename to compiler/llvm/utils_llvm.h
diff --git a/src/compiler/oat_writer.cc b/compiler/oat_writer.cc
similarity index 100%
rename from src/compiler/oat_writer.cc
rename to compiler/oat_writer.cc
diff --git a/src/compiler/oat_writer.h b/compiler/oat_writer.h
similarity index 99%
rename from src/compiler/oat_writer.h
rename to compiler/oat_writer.h
index b201d6b..1f97bf8 100644
--- a/src/compiler/oat_writer.h
+++ b/compiler/oat_writer.h
@@ -21,7 +21,7 @@
 
 #include <cstddef>
 
-#include "compiler/driver/compiler_driver.h"
+#include "driver/compiler_driver.h"
 #include "mem_map.h"
 #include "oat.h"
 #include "mirror/class.h"
diff --git a/src/compiler/sea_ir/frontend.cc b/compiler/sea_ir/frontend.cc
similarity index 94%
rename from src/compiler/sea_ir/frontend.cc
rename to compiler/sea_ir/frontend.cc
index 6bfa459..9af7eff 100644
--- a/src/compiler/sea_ir/frontend.cc
+++ b/compiler/sea_ir/frontend.cc
@@ -1,13 +1,13 @@
 #ifdef ART_SEA_IR_MODE
 #include <llvm/Support/Threading.h>
-#include "compiler/sea_ir/sea.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/llvm/llvm_compilation_unit.h"
-#include "compiler/dex/portable/mir_to_gbc.h"
+#include "base/logging.h"
+#include "dex/portable/mir_to_gbc.h"
+#include "driver/compiler_driver.h"
 #include "leb128.h"
+#include "llvm/llvm_compilation_unit.h"
 #include "mirror/object.h"
 #include "runtime.h"
-#include "base/logging.h"
+#include "sea_ir/sea.h"
 
 namespace art {
 
diff --git a/src/compiler/sea_ir/instruction_tools.cc b/compiler/sea_ir/instruction_tools.cc
similarity index 100%
rename from src/compiler/sea_ir/instruction_tools.cc
rename to compiler/sea_ir/instruction_tools.cc
diff --git a/src/compiler/sea_ir/instruction_tools.h b/compiler/sea_ir/instruction_tools.h
similarity index 100%
rename from src/compiler/sea_ir/instruction_tools.h
rename to compiler/sea_ir/instruction_tools.h
diff --git a/src/compiler/sea_ir/sea.cc b/compiler/sea_ir/sea.cc
similarity index 99%
rename from src/compiler/sea_ir/sea.cc
rename to compiler/sea_ir/sea.cc
index 9c43538..c5ec2b9 100644
--- a/src/compiler/sea_ir/sea.cc
+++ b/compiler/sea_ir/sea.cc
@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 
-#include "compiler/sea_ir/sea.h"
+#include "sea.h"
+
 #include "file_output_stream.h"
 #include "instruction_tools.h"
 
diff --git a/src/compiler/sea_ir/sea.h b/compiler/sea_ir/sea.h
similarity index 98%
rename from src/compiler/sea_ir/sea.h
rename to compiler/sea_ir/sea.h
index efa9ce1..a133678 100644
--- a/src/compiler/sea_ir/sea.h
+++ b/compiler/sea_ir/sea.h
@@ -21,10 +21,10 @@
 #include <set>
 #include <map>
 
-#include "compiler/sea_ir/instruction_tools.h"
-#include "compiler/utils/scoped_hashtable.h"
 #include "dex_file.h"
 #include "dex_instruction.h"
+#include "sea_ir/instruction_tools.h"
+#include "utils/scoped_hashtable.h"
 
 
 namespace sea_ir {
diff --git a/src/compiler/stubs/portable/stubs.cc b/compiler/stubs/portable/stubs.cc
similarity index 99%
rename from src/compiler/stubs/portable/stubs.cc
rename to compiler/stubs/portable/stubs.cc
index db551bf..a7eea51 100644
--- a/src/compiler/stubs/portable/stubs.cc
+++ b/compiler/stubs/portable/stubs.cc
@@ -14,7 +14,8 @@
  * limitations under the License.
  */
 
-#include "compiler/stubs/stubs.h"
+#include "stubs/stubs.h"
+
 #include "jni_internal.h"
 #include "oat/utils/arm/assembler_arm.h"
 #include "oat/utils/mips/assembler_mips.h"
diff --git a/src/compiler/stubs/quick/stubs.cc b/compiler/stubs/quick/stubs.cc
similarity index 99%
rename from src/compiler/stubs/quick/stubs.cc
rename to compiler/stubs/quick/stubs.cc
index a8e691f..790b5d6 100644
--- a/src/compiler/stubs/quick/stubs.cc
+++ b/compiler/stubs/quick/stubs.cc
@@ -14,14 +14,15 @@
  * limitations under the License.
  */
 
-#include "compiler/stubs/stubs.h"
+#include "stubs/stubs.h"
+
 #include "jni_internal.h"
+#include "oat/runtime/oat_support_entrypoints.h"
 #include "oat/utils/arm/assembler_arm.h"
 #include "oat/utils/mips/assembler_mips.h"
 #include "oat/utils/x86/assembler_x86.h"
-#include "oat/runtime/oat_support_entrypoints.h"
-#include "stack_indirect_reference_table.h"
 #include "sirt_ref.h"
+#include "stack_indirect_reference_table.h"
 
 #define __ assembler->
 
diff --git a/src/compiler/stubs/stubs.h b/compiler/stubs/stubs.h
similarity index 100%
rename from src/compiler/stubs/stubs.h
rename to compiler/stubs/stubs.h
diff --git a/dex2oat/Android.mk b/dex2oat/Android.mk
new file mode 100644
index 0000000..7bcf762
--- /dev/null
+++ b/dex2oat/Android.mk
@@ -0,0 +1,37 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include art/build/Android.executable.mk
+
+DEX2OAT_SRC_FILES := \
+	dex2oat.cc
+
+ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
+  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libart-compiler,art/compiler,target,ndebug))
+endif
+ifeq ($(ART_BUILD_TARGET_DEBUG),true)
+  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libartd-compiler,art/compiler,target,debug))
+endif
+
+# We always build dex2oat and dependencies, even if the host build is otherwise disabled, since they are used to cross compile for the target.
+ifeq ($(ART_BUILD_NDEBUG),true)
+  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libart-compiler,art/compiler,host,ndebug))
+endif
+ifeq ($(ART_BUILD_NDEBUG),true)
+  $(eval $(call build-art-executable,dex2oat,$(DEX2OAT_SRC_FILES),libartd-compiler,art/compiler,host,debug))
+endif
diff --git a/src/dex2oat.cc b/dex2oat/dex2oat.cc
similarity index 99%
rename from src/dex2oat.cc
rename to dex2oat/dex2oat.cc
index 6c5ba52..c73c1bb 100644
--- a/src/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -29,20 +29,20 @@
 #include "base/timing_logger.h"
 #include "base/unix_file/fd_file.h"
 #include "class_linker.h"
-#include "compiler/driver/compiler_driver.h"
-#include "compiler/elf_fixup.h"
-#include "compiler/elf_stripper.h"
-#include "compiler/image_writer.h"
-#include "compiler/oat_writer.h"
 #include "dex_file-inl.h"
+#include "driver/compiler_driver.h"
+#include "elf_fixup.h"
+#include "elf_stripper.h"
 #include "gc/space/image_space.h"
 #include "gc/space/space-inl.h"
+#include "image_writer.h"
 #include "leb128.h"
 #include "mirror/abstract_method-inl.h"
 #include "mirror/class-inl.h"
 #include "mirror/class_loader.h"
 #include "mirror/object-inl.h"
 #include "mirror/object_array-inl.h"
+#include "oat_writer.h"
 #include "object_utils.h"
 #include "os.h"
 #include "runtime.h"
diff --git a/jdwpspy/Android.mk b/jdwpspy/Android.mk
index a6c2f64..5523bfd 100644
--- a/jdwpspy/Android.mk
+++ b/jdwpspy/Android.mk
@@ -8,7 +8,9 @@
 	Net.cpp
 
 LOCAL_C_INCLUDES += \
-	art/src
+	art/runtime
+
+LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
 
 LOCAL_MODULE := jdwpspy
 
diff --git a/oatdump/Android.mk b/oatdump/Android.mk
new file mode 100644
index 0000000..faa90ae
--- /dev/null
+++ b/oatdump/Android.mk
@@ -0,0 +1,36 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+OATDUMP_SRC_FILES := \
+	oatdump.cc
+
+include art/build/Android.executable.mk
+
+ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
+  $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,target,ndebug))
+endif
+ifeq ($(ART_BUILD_TARGET_DEBUG),true)
+  $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,target,debug))
+endif
+
+ifeq ($(ART_BUILD_HOST_NDEBUG),true)
+  $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,host,ndebug))
+endif
+ifeq ($(ART_BUILD_HOST_DEBUG),true)
+  $(eval $(call build-art-executable,oatdump,$(OATDUMP_SRC_FILES),,,host,debug))
+endif
diff --git a/src/oatdump.cc b/oatdump/oatdump.cc
similarity index 100%
rename from src/oatdump.cc
rename to oatdump/oatdump.cc
diff --git a/runtime/Android.mk b/runtime/Android.mk
new file mode 100644
index 0000000..5bcd3fb
--- /dev/null
+++ b/runtime/Android.mk
@@ -0,0 +1,374 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include art/build/Android.common.mk
+
+LIBART_COMMON_SRC_FILES := \
+	atomic.cc.arm \
+	barrier.cc \
+	base/logging.cc \
+	base/mutex.cc \
+	base/stringpiece.cc \
+	base/stringprintf.cc \
+	base/timing_logger.cc \
+	base/unix_file/fd_file.cc \
+	base/unix_file/mapped_file.cc \
+	base/unix_file/null_file.cc \
+	base/unix_file/random_access_file_utils.cc \
+	base/unix_file/string_file.cc \
+	check_jni.cc \
+	class_linker.cc \
+	common_throws.cc \
+	compiled_method.cc \
+	debugger.cc \
+	dex_file.cc \
+	dex_file_verifier.cc \
+	dex_instruction.cc \
+	disassembler.cc \
+	disassembler_arm.cc \
+	disassembler_mips.cc \
+	disassembler_x86.cc \
+	elf_file.cc \
+	file_output_stream.cc \
+	gc/allocator/dlmalloc.cc \
+	gc/accounting/card_table.cc \
+	gc/accounting/heap_bitmap.cc \
+	gc/accounting/mod_union_table.cc \
+	gc/accounting/space_bitmap.cc \
+	gc/collector/garbage_collector.cc \
+	gc/collector/mark_sweep.cc \
+	gc/collector/partial_mark_sweep.cc \
+	gc/collector/sticky_mark_sweep.cc \
+	gc/heap.cc \
+	gc/space/dlmalloc_space.cc \
+	gc/space/image_space.cc \
+	gc/space/large_object_space.cc \
+	gc/space/space.cc \
+	hprof/hprof.cc \
+	image.cc \
+	indirect_reference_table.cc \
+	instrumentation.cc \
+	intern_table.cc \
+	interpreter/interpreter.cc \
+	jdwp/jdwp_event.cc \
+	jdwp/jdwp_expand_buf.cc \
+	jdwp/jdwp_handler.cc \
+	jdwp/jdwp_main.cc \
+	jdwp/jdwp_request.cc \
+	jdwp/jdwp_socket.cc \
+	jdwp/object_registry.cc \
+	jni_internal.cc \
+	jobject_comparator.cc \
+	locks.cc \
+	mem_map.cc \
+	memory_region.cc \
+	mirror/abstract_method.cc \
+	mirror/array.cc \
+	mirror/class.cc \
+	mirror/dex_cache.cc \
+	mirror/field.cc \
+	mirror/object.cc \
+	mirror/stack_trace_element.cc \
+	mirror/string.cc \
+	mirror/throwable.cc \
+	monitor.cc \
+	native/dalvik_system_DexFile.cc \
+	native/dalvik_system_VMDebug.cc \
+	native/dalvik_system_VMRuntime.cc \
+	native/dalvik_system_VMStack.cc \
+	native/dalvik_system_Zygote.cc \
+	native/java_lang_Class.cc \
+	native/java_lang_Object.cc \
+	native/java_lang_Runtime.cc \
+	native/java_lang_String.cc \
+	native/java_lang_System.cc \
+	native/java_lang_Thread.cc \
+	native/java_lang_Throwable.cc \
+	native/java_lang_VMClassLoader.cc \
+	native/java_lang_reflect_Array.cc \
+	native/java_lang_reflect_Constructor.cc \
+	native/java_lang_reflect_Field.cc \
+	native/java_lang_reflect_Method.cc \
+	native/java_lang_reflect_Proxy.cc \
+	native/java_util_concurrent_atomic_AtomicLong.cc \
+	native/org_apache_harmony_dalvik_ddmc_DdmServer.cc \
+	native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \
+	native/sun_misc_Unsafe.cc \
+	oat.cc \
+	oat/utils/arm/assembler_arm.cc \
+	oat/utils/arm/managed_register_arm.cc \
+	oat/utils/assembler.cc \
+	oat/utils/mips/assembler_mips.cc \
+	oat/utils/mips/managed_register_mips.cc \
+	oat/utils/x86/assembler_x86.cc \
+	oat/utils/x86/managed_register_x86.cc \
+	oat_file.cc \
+	offsets.cc \
+	os_linux.cc \
+	primitive.cc \
+	reference_table.cc \
+	reflection.cc \
+	runtime.cc \
+	runtime_support.cc \
+	runtime_support_llvm.cc \
+	signal_catcher.cc \
+	stack.cc \
+	thread.cc \
+	thread_list.cc \
+	thread_pool.cc \
+	throw_location.cc \
+	trace.cc \
+	utf.cc \
+	utils.cc \
+	vector_output_stream.cc \
+	verifier/dex_gc_map.cc \
+	verifier/instruction_flags.cc \
+	verifier/method_verifier.cc \
+	verifier/reg_type.cc \
+	verifier/reg_type_cache.cc \
+	verifier/register_line.cc \
+	well_known_classes.cc \
+	zip_archive.cc
+
+LIBART_COMMON_SRC_FILES += \
+	oat/runtime/context.cc \
+	oat/runtime/support_alloc.cc \
+	oat/runtime/support_cast.cc \
+	oat/runtime/support_deoptimize.cc \
+	oat/runtime/support_dexcache.cc \
+	oat/runtime/support_field.cc \
+	oat/runtime/support_fillarray.cc \
+	oat/runtime/support_instrumentation.cc \
+	oat/runtime/support_invoke.cc \
+	oat/runtime/support_jni.cc \
+	oat/runtime/support_locks.cc \
+	oat/runtime/support_math.cc \
+	oat/runtime/support_proxy.cc \
+	oat/runtime/support_stubs.cc \
+	oat/runtime/support_thread.cc \
+	oat/runtime/support_throw.cc \
+	oat/runtime/support_interpreter.cc
+
+ifeq ($(ART_SEA_IR_MODE),true)
+LIBART_COMMON_SRC_FILES += \
+	compiler/sea_ir/sea.cc \
+	compiler/sea_ir/instruction_tools.cc
+endif
+
+LIBART_TARGET_SRC_FILES := \
+	$(LIBART_COMMON_SRC_FILES) \
+	base/logging_android.cc \
+	jdwp/jdwp_adb.cc \
+	monitor_android.cc \
+	runtime_android.cc \
+	thread_android.cc
+
+ifeq ($(TARGET_ARCH),arm)
+LIBART_TARGET_SRC_FILES += \
+	oat/runtime/arm/context_arm.cc.arm \
+	oat/runtime/arm/oat_support_entrypoints_arm.cc \
+	oat/runtime/arm/runtime_support_arm.S
+else # TARGET_ARCH != arm
+ifeq ($(TARGET_ARCH),x86)
+LIBART_TARGET_SRC_FILES += \
+	oat/runtime/x86/context_x86.cc \
+	oat/runtime/x86/oat_support_entrypoints_x86.cc \
+	oat/runtime/x86/runtime_support_x86.S
+else # TARGET_ARCH != x86
+ifeq ($(TARGET_ARCH),mips)
+LIBART_TARGET_SRC_FILES += \
+	oat/runtime/mips/context_mips.cc \
+	oat/runtime/mips/oat_support_entrypoints_mips.cc \
+	oat/runtime/mips/runtime_support_mips.S
+else # TARGET_ARCH != mips
+$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
+endif # TARGET_ARCH != mips
+endif # TARGET_ARCH != x86
+endif # TARGET_ARCH != arm
+
+ifeq ($(TARGET_ARCH),arm)
+LIBART_TARGET_SRC_FILES += thread_arm.cc
+else # TARGET_ARCH != arm
+ifeq ($(TARGET_ARCH),x86)
+LIBART_TARGET_SRC_FILES += thread_x86.cc
+else # TARGET_ARCH != x86
+ifeq ($(TARGET_ARCH),mips)
+LIBART_TARGET_SRC_FILES += thread_mips.cc
+else # TARGET_ARCH != mips
+$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
+endif # TARGET_ARCH != mips
+endif # TARGET_ARCH != x86
+endif # TARGET_ARCH != arm
+
+LIBART_HOST_SRC_FILES := \
+	$(LIBART_COMMON_SRC_FILES) \
+	base/logging_linux.cc \
+	monitor_linux.cc \
+	runtime_linux.cc \
+	thread_linux.cc
+
+ifeq ($(HOST_ARCH),x86)
+LIBART_HOST_SRC_FILES += \
+	oat/runtime/x86/context_x86.cc \
+	oat/runtime/x86/oat_support_entrypoints_x86.cc \
+	oat/runtime/x86/runtime_support_x86.S
+else # HOST_ARCH != x86
+$(error unsupported HOST_ARCH=$(HOST_ARCH))
+endif # HOST_ARCH != x86
+
+ifeq ($(HOST_ARCH),x86)
+LIBART_HOST_SRC_FILES += thread_x86.cc
+else # HOST_ARCH != x86
+$(error unsupported HOST_ARCH=$(HOST_ARCH))
+endif # HOST_ARCH != x86
+
+
+LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := \
+	base/mutex.h \
+	dex_file.h \
+	dex_instruction.h \
+	gc/collector/gc_type.h \
+	gc/space/space.h \
+	gc/heap.h \
+	indirect_reference_table.h \
+	instruction_set.h \
+	invoke_type.h \
+	jdwp/jdwp.h \
+	jdwp/jdwp_constants.h \
+	locks.h \
+	mirror/class.h \
+	thread.h \
+	thread_state.h \
+	verifier/method_verifier.h
+
+LIBART_CFLAGS :=
+ifeq ($(ART_USE_PORTABLE_COMPILER),true)
+  LIBART_CFLAGS += -DART_USE_PORTABLE_COMPILER=1
+endif
+
+# $(1): target or host
+# $(2): ndebug or debug
+define build-libart
+  ifneq ($(1),target)
+    ifneq ($(1),host)
+      $$(error expected target or host for argument 1, received $(1))
+    endif
+  endif
+  ifneq ($(2),ndebug)
+    ifneq ($(2),debug)
+      $$(error expected ndebug or debug for argument 2, received $(2))
+    endif
+  endif
+
+  art_target_or_host := $(1)
+  art_ndebug_or_debug := $(2)
+
+  include $(CLEAR_VARS)
+  ifeq ($$(art_target_or_host),target)
+    include external/stlport/libstlport.mk
+  endif
+  LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION)
+  ifeq ($$(art_ndebug_or_debug),ndebug)
+    LOCAL_MODULE := libart
+  else # debug
+    LOCAL_MODULE := libartd
+  endif
+
+  LOCAL_MODULE_TAGS := optional
+  LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+
+  ifeq ($$(art_target_or_host),target)
+    LOCAL_SRC_FILES := $(LIBART_TARGET_SRC_FILES)
+  else # host
+    LOCAL_SRC_FILES := $(LIBART_HOST_SRC_FILES)
+    LOCAL_IS_HOST_MODULE := true
+  endif
+
+  GENERATED_SRC_DIR := $$(call intermediates-dir-for,$$(LOCAL_MODULE_CLASS),$$(LOCAL_MODULE),$$(LOCAL_IS_HOST_MODULE),)
+  ENUM_OPERATOR_OUT_CC_FILES := $$(patsubst %.h,%_operator_out.cc,$$(LIBART_ENUM_OPERATOR_OUT_HEADER_FILES))
+  ENUM_OPERATOR_OUT_GEN := $$(addprefix $$(GENERATED_SRC_DIR)/,$$(ENUM_OPERATOR_OUT_CC_FILES))
+
+$$(ENUM_OPERATOR_OUT_GEN): art/tools/generate-operator-out.py
+$$(ENUM_OPERATOR_OUT_GEN): PRIVATE_CUSTOM_TOOL = art/tools/generate-operator-out.py $(LOCAL_PATH) $$< > $$@
+$$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PATH)/%.h
+	$$(transform-generated-source)
+
+  LOCAL_GENERATED_SOURCES += $$(ENUM_OPERATOR_OUT_GEN)
+
+  LOCAL_CFLAGS := $(LIBART_CFLAGS)
+  ifeq ($$(art_target_or_host),target)
+    LOCAL_CLANG := $(ART_TARGET_CLANG)
+    LOCAL_CFLAGS += $(ART_TARGET_CFLAGS)
+  else # host
+    LOCAL_CLANG := $(ART_HOST_CLANG)
+    LOCAL_CFLAGS += $(ART_HOST_CFLAGS)
+  endif
+  ifeq ($$(art_ndebug_or_debug),debug)
+    ifeq ($$(art_target_or_host),target)
+      LOCAL_CFLAGS += $(ART_TARGET_DEBUG_CFLAGS)
+    else # host
+      LOCAL_CFLAGS += $(ART_HOST_DEBUG_CFLAGS)
+      LOCAL_LDLIBS += $(ART_HOST_DEBUG_LDLIBS)
+      LOCAL_STATIC_LIBRARIES := libgtest_host
+    endif
+  else
+    ifeq ($$(art_target_or_host),target)
+      LOCAL_CFLAGS += $(ART_TARGET_NON_DEBUG_CFLAGS)
+    else # host
+      LOCAL_CFLAGS += $(ART_HOST_NON_DEBUG_CFLAGS)
+    endif
+  endif
+  LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
+  LOCAL_SHARED_LIBRARIES := liblog libnativehelper
+  LOCAL_SHARED_LIBRARIES += libcorkscrew # native stack trace support
+  ifeq ($$(art_target_or_host),target)
+    LOCAL_SHARED_LIBRARIES += libcutils libstlport libz libdl libselinux
+  else # host
+    LOCAL_STATIC_LIBRARIES += libcutils
+    LOCAL_SHARED_LIBRARIES += libz-host
+    LOCAL_LDLIBS += -ldl -lpthread
+    ifeq ($(HOST_OS),linux)
+      LOCAL_LDLIBS += -lrt
+    endif
+  endif
+  include $(LLVM_GEN_INTRINSICS_MK)
+  LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common.mk
+  LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
+  ifeq ($$(art_target_or_host),target)
+    include $(LLVM_DEVICE_BUILD_MK)
+    include $(BUILD_SHARED_LIBRARY)
+  else # host
+    include $(LLVM_HOST_BUILD_MK)
+    include $(BUILD_HOST_SHARED_LIBRARY)
+  endif
+endef
+
+ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
+  $(eval $(call build-libart,target,ndebug))
+endif
+ifeq ($(ART_BUILD_TARGET_DEBUG),true)
+  $(eval $(call build-libart,target,debug))
+endif
+
+# We always build dex2oat and dependencies, even if the host build is otherwise disabled, since they are used to cross compile for the target.
+ifeq ($(ART_BUILD_NDEBUG),true)
+  $(eval $(call build-libart,host,ndebug))
+endif
+ifeq ($(ART_BUILD_DEBUG),true)
+  $(eval $(call build-libart,host,debug))
+endif
diff --git a/src/asm_support.h b/runtime/asm_support.h
similarity index 100%
rename from src/asm_support.h
rename to runtime/asm_support.h
diff --git a/src/atomic.cc b/runtime/atomic.cc
similarity index 100%
rename from src/atomic.cc
rename to runtime/atomic.cc
diff --git a/src/atomic.h b/runtime/atomic.h
similarity index 100%
rename from src/atomic.h
rename to runtime/atomic.h
diff --git a/src/atomic_integer.h b/runtime/atomic_integer.h
similarity index 100%
rename from src/atomic_integer.h
rename to runtime/atomic_integer.h
diff --git a/src/barrier.cc b/runtime/barrier.cc
similarity index 100%
rename from src/barrier.cc
rename to runtime/barrier.cc
diff --git a/src/barrier.h b/runtime/barrier.h
similarity index 100%
rename from src/barrier.h
rename to runtime/barrier.h
diff --git a/src/barrier_test.cc b/runtime/barrier_test.cc
similarity index 100%
rename from src/barrier_test.cc
rename to runtime/barrier_test.cc
diff --git a/src/base/casts.h b/runtime/base/casts.h
similarity index 100%
rename from src/base/casts.h
rename to runtime/base/casts.h
diff --git a/src/base/histogram-inl.h b/runtime/base/histogram-inl.h
similarity index 100%
rename from src/base/histogram-inl.h
rename to runtime/base/histogram-inl.h
diff --git a/src/base/histogram.h b/runtime/base/histogram.h
similarity index 100%
rename from src/base/histogram.h
rename to runtime/base/histogram.h
diff --git a/src/base/histogram_test.cc b/runtime/base/histogram_test.cc
similarity index 100%
rename from src/base/histogram_test.cc
rename to runtime/base/histogram_test.cc
diff --git a/src/base/logging.cc b/runtime/base/logging.cc
similarity index 100%
rename from src/base/logging.cc
rename to runtime/base/logging.cc
diff --git a/src/base/logging.h b/runtime/base/logging.h
similarity index 100%
rename from src/base/logging.h
rename to runtime/base/logging.h
diff --git a/src/base/logging_android.cc b/runtime/base/logging_android.cc
similarity index 100%
rename from src/base/logging_android.cc
rename to runtime/base/logging_android.cc
diff --git a/src/base/logging_linux.cc b/runtime/base/logging_linux.cc
similarity index 100%
rename from src/base/logging_linux.cc
rename to runtime/base/logging_linux.cc
diff --git a/src/base/macros.h b/runtime/base/macros.h
similarity index 100%
rename from src/base/macros.h
rename to runtime/base/macros.h
diff --git a/src/base/mutex-inl.h b/runtime/base/mutex-inl.h
similarity index 100%
rename from src/base/mutex-inl.h
rename to runtime/base/mutex-inl.h
diff --git a/src/base/mutex.cc b/runtime/base/mutex.cc
similarity index 100%
rename from src/base/mutex.cc
rename to runtime/base/mutex.cc
diff --git a/src/base/mutex.h b/runtime/base/mutex.h
similarity index 100%
rename from src/base/mutex.h
rename to runtime/base/mutex.h
diff --git a/src/base/mutex_test.cc b/runtime/base/mutex_test.cc
similarity index 100%
rename from src/base/mutex_test.cc
rename to runtime/base/mutex_test.cc
diff --git a/src/base/stl_util.h b/runtime/base/stl_util.h
similarity index 100%
rename from src/base/stl_util.h
rename to runtime/base/stl_util.h
diff --git a/src/base/stringpiece.cc b/runtime/base/stringpiece.cc
similarity index 100%
rename from src/base/stringpiece.cc
rename to runtime/base/stringpiece.cc
diff --git a/src/base/stringpiece.h b/runtime/base/stringpiece.h
similarity index 100%
rename from src/base/stringpiece.h
rename to runtime/base/stringpiece.h
diff --git a/src/base/stringprintf.cc b/runtime/base/stringprintf.cc
similarity index 100%
rename from src/base/stringprintf.cc
rename to runtime/base/stringprintf.cc
diff --git a/src/base/stringprintf.h b/runtime/base/stringprintf.h
similarity index 100%
rename from src/base/stringprintf.h
rename to runtime/base/stringprintf.h
diff --git a/src/base/timing_logger.cc b/runtime/base/timing_logger.cc
similarity index 100%
rename from src/base/timing_logger.cc
rename to runtime/base/timing_logger.cc
diff --git a/src/base/timing_logger.h b/runtime/base/timing_logger.h
similarity index 100%
rename from src/base/timing_logger.h
rename to runtime/base/timing_logger.h
diff --git a/src/base/unix_file/README b/runtime/base/unix_file/README
similarity index 100%
rename from src/base/unix_file/README
rename to runtime/base/unix_file/README
diff --git a/src/base/unix_file/fd_file.cc b/runtime/base/unix_file/fd_file.cc
similarity index 100%
rename from src/base/unix_file/fd_file.cc
rename to runtime/base/unix_file/fd_file.cc
diff --git a/src/base/unix_file/fd_file.h b/runtime/base/unix_file/fd_file.h
similarity index 100%
rename from src/base/unix_file/fd_file.h
rename to runtime/base/unix_file/fd_file.h
diff --git a/src/base/unix_file/fd_file_test.cc b/runtime/base/unix_file/fd_file_test.cc
similarity index 100%
rename from src/base/unix_file/fd_file_test.cc
rename to runtime/base/unix_file/fd_file_test.cc
diff --git a/src/base/unix_file/mapped_file.cc b/runtime/base/unix_file/mapped_file.cc
similarity index 100%
rename from src/base/unix_file/mapped_file.cc
rename to runtime/base/unix_file/mapped_file.cc
diff --git a/src/base/unix_file/mapped_file.h b/runtime/base/unix_file/mapped_file.h
similarity index 100%
rename from src/base/unix_file/mapped_file.h
rename to runtime/base/unix_file/mapped_file.h
diff --git a/src/base/unix_file/mapped_file_test.cc b/runtime/base/unix_file/mapped_file_test.cc
similarity index 100%
rename from src/base/unix_file/mapped_file_test.cc
rename to runtime/base/unix_file/mapped_file_test.cc
diff --git a/src/base/unix_file/null_file.cc b/runtime/base/unix_file/null_file.cc
similarity index 100%
rename from src/base/unix_file/null_file.cc
rename to runtime/base/unix_file/null_file.cc
diff --git a/src/base/unix_file/null_file.h b/runtime/base/unix_file/null_file.h
similarity index 100%
rename from src/base/unix_file/null_file.h
rename to runtime/base/unix_file/null_file.h
diff --git a/src/base/unix_file/null_file_test.cc b/runtime/base/unix_file/null_file_test.cc
similarity index 100%
rename from src/base/unix_file/null_file_test.cc
rename to runtime/base/unix_file/null_file_test.cc
diff --git a/src/base/unix_file/random_access_file.h b/runtime/base/unix_file/random_access_file.h
similarity index 100%
rename from src/base/unix_file/random_access_file.h
rename to runtime/base/unix_file/random_access_file.h
diff --git a/src/base/unix_file/random_access_file_test.h b/runtime/base/unix_file/random_access_file_test.h
similarity index 100%
rename from src/base/unix_file/random_access_file_test.h
rename to runtime/base/unix_file/random_access_file_test.h
diff --git a/src/base/unix_file/random_access_file_utils.cc b/runtime/base/unix_file/random_access_file_utils.cc
similarity index 100%
rename from src/base/unix_file/random_access_file_utils.cc
rename to runtime/base/unix_file/random_access_file_utils.cc
diff --git a/src/base/unix_file/random_access_file_utils.h b/runtime/base/unix_file/random_access_file_utils.h
similarity index 100%
rename from src/base/unix_file/random_access_file_utils.h
rename to runtime/base/unix_file/random_access_file_utils.h
diff --git a/src/base/unix_file/random_access_file_utils_test.cc b/runtime/base/unix_file/random_access_file_utils_test.cc
similarity index 100%
rename from src/base/unix_file/random_access_file_utils_test.cc
rename to runtime/base/unix_file/random_access_file_utils_test.cc
diff --git a/src/base/unix_file/string_file.cc b/runtime/base/unix_file/string_file.cc
similarity index 100%
rename from src/base/unix_file/string_file.cc
rename to runtime/base/unix_file/string_file.cc
diff --git a/src/base/unix_file/string_file.h b/runtime/base/unix_file/string_file.h
similarity index 100%
rename from src/base/unix_file/string_file.h
rename to runtime/base/unix_file/string_file.h
diff --git a/src/base/unix_file/string_file_test.cc b/runtime/base/unix_file/string_file_test.cc
similarity index 100%
rename from src/base/unix_file/string_file_test.cc
rename to runtime/base/unix_file/string_file_test.cc
diff --git a/src/check_jni.cc b/runtime/check_jni.cc
similarity index 100%
rename from src/check_jni.cc
rename to runtime/check_jni.cc
diff --git a/src/class_linker-inl.h b/runtime/class_linker-inl.h
similarity index 100%
rename from src/class_linker-inl.h
rename to runtime/class_linker-inl.h
diff --git a/src/class_linker.cc b/runtime/class_linker.cc
similarity index 100%
rename from src/class_linker.cc
rename to runtime/class_linker.cc
diff --git a/src/class_linker.h b/runtime/class_linker.h
similarity index 100%
rename from src/class_linker.h
rename to runtime/class_linker.h
diff --git a/src/class_linker_test.cc b/runtime/class_linker_test.cc
similarity index 100%
rename from src/class_linker_test.cc
rename to runtime/class_linker_test.cc
diff --git a/src/class_reference.h b/runtime/class_reference.h
similarity index 100%
rename from src/class_reference.h
rename to runtime/class_reference.h
diff --git a/src/closure.h b/runtime/closure.h
similarity index 100%
rename from src/closure.h
rename to runtime/closure.h
diff --git a/src/common_test.cc b/runtime/common_test.cc
similarity index 100%
rename from src/common_test.cc
rename to runtime/common_test.cc
diff --git a/src/common_test.h b/runtime/common_test.h
similarity index 100%
rename from src/common_test.h
rename to runtime/common_test.h
diff --git a/src/common_throws.cc b/runtime/common_throws.cc
similarity index 100%
rename from src/common_throws.cc
rename to runtime/common_throws.cc
diff --git a/src/common_throws.h b/runtime/common_throws.h
similarity index 100%
rename from src/common_throws.h
rename to runtime/common_throws.h
diff --git a/src/compiled_class.h b/runtime/compiled_class.h
similarity index 100%
rename from src/compiled_class.h
rename to runtime/compiled_class.h
diff --git a/src/compiled_method.cc b/runtime/compiled_method.cc
similarity index 100%
rename from src/compiled_method.cc
rename to runtime/compiled_method.cc
diff --git a/src/compiled_method.h b/runtime/compiled_method.h
similarity index 100%
rename from src/compiled_method.h
rename to runtime/compiled_method.h
diff --git a/src/constants_arm.h b/runtime/constants_arm.h
similarity index 100%
rename from src/constants_arm.h
rename to runtime/constants_arm.h
diff --git a/src/constants_mips.h b/runtime/constants_mips.h
similarity index 100%
rename from src/constants_mips.h
rename to runtime/constants_mips.h
diff --git a/src/constants_x86.h b/runtime/constants_x86.h
similarity index 100%
rename from src/constants_x86.h
rename to runtime/constants_x86.h
diff --git a/src/debugger.cc b/runtime/debugger.cc
similarity index 100%
rename from src/debugger.cc
rename to runtime/debugger.cc
diff --git a/src/debugger.h b/runtime/debugger.h
similarity index 100%
rename from src/debugger.h
rename to runtime/debugger.h
diff --git a/src/dex_file-inl.h b/runtime/dex_file-inl.h
similarity index 100%
rename from src/dex_file-inl.h
rename to runtime/dex_file-inl.h
diff --git a/src/dex_file.cc b/runtime/dex_file.cc
similarity index 100%
rename from src/dex_file.cc
rename to runtime/dex_file.cc
diff --git a/src/dex_file.h b/runtime/dex_file.h
similarity index 100%
rename from src/dex_file.h
rename to runtime/dex_file.h
diff --git a/src/dex_file_test.cc b/runtime/dex_file_test.cc
similarity index 100%
rename from src/dex_file_test.cc
rename to runtime/dex_file_test.cc
diff --git a/src/dex_file_verifier.cc b/runtime/dex_file_verifier.cc
similarity index 100%
rename from src/dex_file_verifier.cc
rename to runtime/dex_file_verifier.cc
diff --git a/src/dex_file_verifier.h b/runtime/dex_file_verifier.h
similarity index 100%
rename from src/dex_file_verifier.h
rename to runtime/dex_file_verifier.h
diff --git a/src/dex_instruction-inl.h b/runtime/dex_instruction-inl.h
similarity index 100%
rename from src/dex_instruction-inl.h
rename to runtime/dex_instruction-inl.h
diff --git a/src/dex_instruction.cc b/runtime/dex_instruction.cc
similarity index 100%
rename from src/dex_instruction.cc
rename to runtime/dex_instruction.cc
diff --git a/src/dex_instruction.h b/runtime/dex_instruction.h
similarity index 100%
rename from src/dex_instruction.h
rename to runtime/dex_instruction.h
diff --git a/src/dex_instruction_list.h b/runtime/dex_instruction_list.h
similarity index 100%
rename from src/dex_instruction_list.h
rename to runtime/dex_instruction_list.h
diff --git a/src/dex_instruction_visitor.h b/runtime/dex_instruction_visitor.h
similarity index 100%
rename from src/dex_instruction_visitor.h
rename to runtime/dex_instruction_visitor.h
diff --git a/src/dex_instruction_visitor_test.cc b/runtime/dex_instruction_visitor_test.cc
similarity index 100%
rename from src/dex_instruction_visitor_test.cc
rename to runtime/dex_instruction_visitor_test.cc
diff --git a/src/dex_method_iterator.h b/runtime/dex_method_iterator.h
similarity index 100%
rename from src/dex_method_iterator.h
rename to runtime/dex_method_iterator.h
diff --git a/src/dex_method_iterator_test.cc b/runtime/dex_method_iterator_test.cc
similarity index 100%
rename from src/dex_method_iterator_test.cc
rename to runtime/dex_method_iterator_test.cc
diff --git a/src/disassembler.cc b/runtime/disassembler.cc
similarity index 100%
rename from src/disassembler.cc
rename to runtime/disassembler.cc
diff --git a/src/disassembler.h b/runtime/disassembler.h
similarity index 100%
rename from src/disassembler.h
rename to runtime/disassembler.h
diff --git a/src/disassembler_arm.cc b/runtime/disassembler_arm.cc
similarity index 100%
rename from src/disassembler_arm.cc
rename to runtime/disassembler_arm.cc
diff --git a/src/disassembler_arm.h b/runtime/disassembler_arm.h
similarity index 100%
rename from src/disassembler_arm.h
rename to runtime/disassembler_arm.h
diff --git a/src/disassembler_mips.cc b/runtime/disassembler_mips.cc
similarity index 100%
rename from src/disassembler_mips.cc
rename to runtime/disassembler_mips.cc
diff --git a/src/disassembler_mips.h b/runtime/disassembler_mips.h
similarity index 100%
rename from src/disassembler_mips.h
rename to runtime/disassembler_mips.h
diff --git a/src/disassembler_x86.cc b/runtime/disassembler_x86.cc
similarity index 100%
rename from src/disassembler_x86.cc
rename to runtime/disassembler_x86.cc
diff --git a/src/disassembler_x86.h b/runtime/disassembler_x86.h
similarity index 100%
rename from src/disassembler_x86.h
rename to runtime/disassembler_x86.h
diff --git a/src/elf_file.cc b/runtime/elf_file.cc
similarity index 100%
rename from src/elf_file.cc
rename to runtime/elf_file.cc
diff --git a/src/elf_file.h b/runtime/elf_file.h
similarity index 100%
rename from src/elf_file.h
rename to runtime/elf_file.h
diff --git a/src/exception_test.cc b/runtime/exception_test.cc
similarity index 100%
rename from src/exception_test.cc
rename to runtime/exception_test.cc
diff --git a/src/file_output_stream.cc b/runtime/file_output_stream.cc
similarity index 100%
rename from src/file_output_stream.cc
rename to runtime/file_output_stream.cc
diff --git a/src/file_output_stream.h b/runtime/file_output_stream.h
similarity index 100%
rename from src/file_output_stream.h
rename to runtime/file_output_stream.h
diff --git a/src/gc/accounting/atomic_stack.h b/runtime/gc/accounting/atomic_stack.h
similarity index 100%
rename from src/gc/accounting/atomic_stack.h
rename to runtime/gc/accounting/atomic_stack.h
diff --git a/src/gc/accounting/card_table-inl.h b/runtime/gc/accounting/card_table-inl.h
similarity index 100%
rename from src/gc/accounting/card_table-inl.h
rename to runtime/gc/accounting/card_table-inl.h
diff --git a/src/gc/accounting/card_table.cc b/runtime/gc/accounting/card_table.cc
similarity index 100%
rename from src/gc/accounting/card_table.cc
rename to runtime/gc/accounting/card_table.cc
diff --git a/src/gc/accounting/card_table.h b/runtime/gc/accounting/card_table.h
similarity index 100%
rename from src/gc/accounting/card_table.h
rename to runtime/gc/accounting/card_table.h
diff --git a/src/gc/accounting/heap_bitmap-inl.h b/runtime/gc/accounting/heap_bitmap-inl.h
similarity index 100%
rename from src/gc/accounting/heap_bitmap-inl.h
rename to runtime/gc/accounting/heap_bitmap-inl.h
diff --git a/src/gc/accounting/heap_bitmap.cc b/runtime/gc/accounting/heap_bitmap.cc
similarity index 100%
rename from src/gc/accounting/heap_bitmap.cc
rename to runtime/gc/accounting/heap_bitmap.cc
diff --git a/src/gc/accounting/heap_bitmap.h b/runtime/gc/accounting/heap_bitmap.h
similarity index 100%
rename from src/gc/accounting/heap_bitmap.h
rename to runtime/gc/accounting/heap_bitmap.h
diff --git a/src/gc/accounting/mod_union_table-inl.h b/runtime/gc/accounting/mod_union_table-inl.h
similarity index 100%
rename from src/gc/accounting/mod_union_table-inl.h
rename to runtime/gc/accounting/mod_union_table-inl.h
diff --git a/src/gc/accounting/mod_union_table.cc b/runtime/gc/accounting/mod_union_table.cc
similarity index 100%
rename from src/gc/accounting/mod_union_table.cc
rename to runtime/gc/accounting/mod_union_table.cc
diff --git a/src/gc/accounting/mod_union_table.h b/runtime/gc/accounting/mod_union_table.h
similarity index 100%
rename from src/gc/accounting/mod_union_table.h
rename to runtime/gc/accounting/mod_union_table.h
diff --git a/src/gc/accounting/space_bitmap-inl.h b/runtime/gc/accounting/space_bitmap-inl.h
similarity index 100%
rename from src/gc/accounting/space_bitmap-inl.h
rename to runtime/gc/accounting/space_bitmap-inl.h
diff --git a/src/gc/accounting/space_bitmap.cc b/runtime/gc/accounting/space_bitmap.cc
similarity index 100%
rename from src/gc/accounting/space_bitmap.cc
rename to runtime/gc/accounting/space_bitmap.cc
diff --git a/src/gc/accounting/space_bitmap.h b/runtime/gc/accounting/space_bitmap.h
similarity index 100%
rename from src/gc/accounting/space_bitmap.h
rename to runtime/gc/accounting/space_bitmap.h
diff --git a/src/gc/accounting/space_bitmap_test.cc b/runtime/gc/accounting/space_bitmap_test.cc
similarity index 100%
rename from src/gc/accounting/space_bitmap_test.cc
rename to runtime/gc/accounting/space_bitmap_test.cc
diff --git a/src/gc/allocator/dlmalloc.cc b/runtime/gc/allocator/dlmalloc.cc
similarity index 100%
rename from src/gc/allocator/dlmalloc.cc
rename to runtime/gc/allocator/dlmalloc.cc
diff --git a/src/gc/allocator/dlmalloc.h b/runtime/gc/allocator/dlmalloc.h
similarity index 100%
rename from src/gc/allocator/dlmalloc.h
rename to runtime/gc/allocator/dlmalloc.h
diff --git a/src/gc/collector/garbage_collector.cc b/runtime/gc/collector/garbage_collector.cc
similarity index 100%
rename from src/gc/collector/garbage_collector.cc
rename to runtime/gc/collector/garbage_collector.cc
diff --git a/src/gc/collector/garbage_collector.h b/runtime/gc/collector/garbage_collector.h
similarity index 100%
rename from src/gc/collector/garbage_collector.h
rename to runtime/gc/collector/garbage_collector.h
diff --git a/src/gc/collector/gc_type.cc b/runtime/gc/collector/gc_type.cc
similarity index 100%
rename from src/gc/collector/gc_type.cc
rename to runtime/gc/collector/gc_type.cc
diff --git a/src/gc/collector/gc_type.h b/runtime/gc/collector/gc_type.h
similarity index 100%
rename from src/gc/collector/gc_type.h
rename to runtime/gc/collector/gc_type.h
diff --git a/src/gc/collector/mark_sweep-inl.h b/runtime/gc/collector/mark_sweep-inl.h
similarity index 100%
rename from src/gc/collector/mark_sweep-inl.h
rename to runtime/gc/collector/mark_sweep-inl.h
diff --git a/src/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc
similarity index 100%
rename from src/gc/collector/mark_sweep.cc
rename to runtime/gc/collector/mark_sweep.cc
diff --git a/src/gc/collector/mark_sweep.h b/runtime/gc/collector/mark_sweep.h
similarity index 100%
rename from src/gc/collector/mark_sweep.h
rename to runtime/gc/collector/mark_sweep.h
diff --git a/src/gc/collector/partial_mark_sweep.cc b/runtime/gc/collector/partial_mark_sweep.cc
similarity index 100%
rename from src/gc/collector/partial_mark_sweep.cc
rename to runtime/gc/collector/partial_mark_sweep.cc
diff --git a/src/gc/collector/partial_mark_sweep.h b/runtime/gc/collector/partial_mark_sweep.h
similarity index 100%
rename from src/gc/collector/partial_mark_sweep.h
rename to runtime/gc/collector/partial_mark_sweep.h
diff --git a/src/gc/collector/sticky_mark_sweep.cc b/runtime/gc/collector/sticky_mark_sweep.cc
similarity index 100%
rename from src/gc/collector/sticky_mark_sweep.cc
rename to runtime/gc/collector/sticky_mark_sweep.cc
diff --git a/src/gc/collector/sticky_mark_sweep.h b/runtime/gc/collector/sticky_mark_sweep.h
similarity index 100%
rename from src/gc/collector/sticky_mark_sweep.h
rename to runtime/gc/collector/sticky_mark_sweep.h
diff --git a/src/gc/heap.cc b/runtime/gc/heap.cc
similarity index 100%
rename from src/gc/heap.cc
rename to runtime/gc/heap.cc
diff --git a/src/gc/heap.h b/runtime/gc/heap.h
similarity index 100%
rename from src/gc/heap.h
rename to runtime/gc/heap.h
diff --git a/src/gc/heap_test.cc b/runtime/gc/heap_test.cc
similarity index 100%
rename from src/gc/heap_test.cc
rename to runtime/gc/heap_test.cc
diff --git a/src/gc/space/dlmalloc_space.cc b/runtime/gc/space/dlmalloc_space.cc
similarity index 100%
rename from src/gc/space/dlmalloc_space.cc
rename to runtime/gc/space/dlmalloc_space.cc
diff --git a/src/gc/space/dlmalloc_space.h b/runtime/gc/space/dlmalloc_space.h
similarity index 100%
rename from src/gc/space/dlmalloc_space.h
rename to runtime/gc/space/dlmalloc_space.h
diff --git a/src/gc/space/image_space.cc b/runtime/gc/space/image_space.cc
similarity index 100%
rename from src/gc/space/image_space.cc
rename to runtime/gc/space/image_space.cc
diff --git a/src/gc/space/image_space.h b/runtime/gc/space/image_space.h
similarity index 100%
rename from src/gc/space/image_space.h
rename to runtime/gc/space/image_space.h
diff --git a/src/gc/space/large_object_space.cc b/runtime/gc/space/large_object_space.cc
similarity index 100%
rename from src/gc/space/large_object_space.cc
rename to runtime/gc/space/large_object_space.cc
diff --git a/src/gc/space/large_object_space.h b/runtime/gc/space/large_object_space.h
similarity index 100%
rename from src/gc/space/large_object_space.h
rename to runtime/gc/space/large_object_space.h
diff --git a/src/gc/space/space-inl.h b/runtime/gc/space/space-inl.h
similarity index 100%
rename from src/gc/space/space-inl.h
rename to runtime/gc/space/space-inl.h
diff --git a/src/gc/space/space.cc b/runtime/gc/space/space.cc
similarity index 100%
rename from src/gc/space/space.cc
rename to runtime/gc/space/space.cc
diff --git a/src/gc/space/space.h b/runtime/gc/space/space.h
similarity index 100%
rename from src/gc/space/space.h
rename to runtime/gc/space/space.h
diff --git a/src/gc/space/space_test.cc b/runtime/gc/space/space_test.cc
similarity index 100%
rename from src/gc/space/space_test.cc
rename to runtime/gc/space/space_test.cc
diff --git a/src/gc_map.h b/runtime/gc_map.h
similarity index 100%
rename from src/gc_map.h
rename to runtime/gc_map.h
diff --git a/src/globals.h b/runtime/globals.h
similarity index 100%
rename from src/globals.h
rename to runtime/globals.h
diff --git a/src/gtest_test.cc b/runtime/gtest_test.cc
similarity index 100%
rename from src/gtest_test.cc
rename to runtime/gtest_test.cc
diff --git a/src/hprof/hprof.cc b/runtime/hprof/hprof.cc
similarity index 100%
rename from src/hprof/hprof.cc
rename to runtime/hprof/hprof.cc
diff --git a/src/hprof/hprof.h b/runtime/hprof/hprof.h
similarity index 100%
rename from src/hprof/hprof.h
rename to runtime/hprof/hprof.h
diff --git a/src/image.cc b/runtime/image.cc
similarity index 100%
rename from src/image.cc
rename to runtime/image.cc
diff --git a/src/image.h b/runtime/image.h
similarity index 100%
rename from src/image.h
rename to runtime/image.h
diff --git a/src/image_test.cc b/runtime/image_test.cc
similarity index 100%
rename from src/image_test.cc
rename to runtime/image_test.cc
diff --git a/src/indenter.h b/runtime/indenter.h
similarity index 100%
rename from src/indenter.h
rename to runtime/indenter.h
diff --git a/src/indenter_test.cc b/runtime/indenter_test.cc
similarity index 100%
rename from src/indenter_test.cc
rename to runtime/indenter_test.cc
diff --git a/src/indirect_reference_table.cc b/runtime/indirect_reference_table.cc
similarity index 100%
rename from src/indirect_reference_table.cc
rename to runtime/indirect_reference_table.cc
diff --git a/src/indirect_reference_table.h b/runtime/indirect_reference_table.h
similarity index 100%
rename from src/indirect_reference_table.h
rename to runtime/indirect_reference_table.h
diff --git a/src/indirect_reference_table_test.cc b/runtime/indirect_reference_table_test.cc
similarity index 100%
rename from src/indirect_reference_table_test.cc
rename to runtime/indirect_reference_table_test.cc
diff --git a/src/instruction_set.h b/runtime/instruction_set.h
similarity index 100%
rename from src/instruction_set.h
rename to runtime/instruction_set.h
diff --git a/src/instrumentation.cc b/runtime/instrumentation.cc
similarity index 100%
rename from src/instrumentation.cc
rename to runtime/instrumentation.cc
diff --git a/src/instrumentation.h b/runtime/instrumentation.h
similarity index 100%
rename from src/instrumentation.h
rename to runtime/instrumentation.h
diff --git a/src/intern_table.cc b/runtime/intern_table.cc
similarity index 100%
rename from src/intern_table.cc
rename to runtime/intern_table.cc
diff --git a/src/intern_table.h b/runtime/intern_table.h
similarity index 100%
rename from src/intern_table.h
rename to runtime/intern_table.h
diff --git a/src/intern_table_test.cc b/runtime/intern_table_test.cc
similarity index 100%
rename from src/intern_table_test.cc
rename to runtime/intern_table_test.cc
diff --git a/src/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
similarity index 100%
rename from src/interpreter/interpreter.cc
rename to runtime/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.h b/runtime/interpreter/interpreter.h
similarity index 100%
rename from src/interpreter/interpreter.h
rename to runtime/interpreter/interpreter.h
diff --git a/src/invoke_arg_array_builder.h b/runtime/invoke_arg_array_builder.h
similarity index 100%
rename from src/invoke_arg_array_builder.h
rename to runtime/invoke_arg_array_builder.h
diff --git a/src/invoke_type.h b/runtime/invoke_type.h
similarity index 100%
rename from src/invoke_type.h
rename to runtime/invoke_type.h
diff --git a/src/jdwp/README.txt b/runtime/jdwp/README.txt
similarity index 100%
rename from src/jdwp/README.txt
rename to runtime/jdwp/README.txt
diff --git a/src/jdwp/jdwp.h b/runtime/jdwp/jdwp.h
similarity index 100%
rename from src/jdwp/jdwp.h
rename to runtime/jdwp/jdwp.h
diff --git a/src/jdwp/jdwp_adb.cc b/runtime/jdwp/jdwp_adb.cc
similarity index 100%
rename from src/jdwp/jdwp_adb.cc
rename to runtime/jdwp/jdwp_adb.cc
diff --git a/src/jdwp/jdwp_bits.h b/runtime/jdwp/jdwp_bits.h
similarity index 100%
rename from src/jdwp/jdwp_bits.h
rename to runtime/jdwp/jdwp_bits.h
diff --git a/src/jdwp/jdwp_constants.h b/runtime/jdwp/jdwp_constants.h
similarity index 100%
rename from src/jdwp/jdwp_constants.h
rename to runtime/jdwp/jdwp_constants.h
diff --git a/src/jdwp/jdwp_event.cc b/runtime/jdwp/jdwp_event.cc
similarity index 100%
rename from src/jdwp/jdwp_event.cc
rename to runtime/jdwp/jdwp_event.cc
diff --git a/src/jdwp/jdwp_event.h b/runtime/jdwp/jdwp_event.h
similarity index 100%
rename from src/jdwp/jdwp_event.h
rename to runtime/jdwp/jdwp_event.h
diff --git a/src/jdwp/jdwp_expand_buf.cc b/runtime/jdwp/jdwp_expand_buf.cc
similarity index 100%
rename from src/jdwp/jdwp_expand_buf.cc
rename to runtime/jdwp/jdwp_expand_buf.cc
diff --git a/src/jdwp/jdwp_expand_buf.h b/runtime/jdwp/jdwp_expand_buf.h
similarity index 100%
rename from src/jdwp/jdwp_expand_buf.h
rename to runtime/jdwp/jdwp_expand_buf.h
diff --git a/src/jdwp/jdwp_handler.cc b/runtime/jdwp/jdwp_handler.cc
similarity index 100%
rename from src/jdwp/jdwp_handler.cc
rename to runtime/jdwp/jdwp_handler.cc
diff --git a/src/jdwp/jdwp_main.cc b/runtime/jdwp/jdwp_main.cc
similarity index 100%
rename from src/jdwp/jdwp_main.cc
rename to runtime/jdwp/jdwp_main.cc
diff --git a/src/jdwp/jdwp_priv.h b/runtime/jdwp/jdwp_priv.h
similarity index 100%
rename from src/jdwp/jdwp_priv.h
rename to runtime/jdwp/jdwp_priv.h
diff --git a/src/jdwp/jdwp_request.cc b/runtime/jdwp/jdwp_request.cc
similarity index 100%
rename from src/jdwp/jdwp_request.cc
rename to runtime/jdwp/jdwp_request.cc
diff --git a/src/jdwp/jdwp_socket.cc b/runtime/jdwp/jdwp_socket.cc
similarity index 100%
rename from src/jdwp/jdwp_socket.cc
rename to runtime/jdwp/jdwp_socket.cc
diff --git a/src/jdwp/object_registry.cc b/runtime/jdwp/object_registry.cc
similarity index 100%
rename from src/jdwp/object_registry.cc
rename to runtime/jdwp/object_registry.cc
diff --git a/src/jdwp/object_registry.h b/runtime/jdwp/object_registry.h
similarity index 100%
rename from src/jdwp/object_registry.h
rename to runtime/jdwp/object_registry.h
diff --git a/src/jni_internal.cc b/runtime/jni_internal.cc
similarity index 100%
rename from src/jni_internal.cc
rename to runtime/jni_internal.cc
diff --git a/src/jni_internal.h b/runtime/jni_internal.h
similarity index 100%
rename from src/jni_internal.h
rename to runtime/jni_internal.h
diff --git a/src/jni_internal_test.cc b/runtime/jni_internal_test.cc
similarity index 100%
rename from src/jni_internal_test.cc
rename to runtime/jni_internal_test.cc
diff --git a/src/jobject_comparator.cc b/runtime/jobject_comparator.cc
similarity index 100%
rename from src/jobject_comparator.cc
rename to runtime/jobject_comparator.cc
diff --git a/src/jobject_comparator.h b/runtime/jobject_comparator.h
similarity index 100%
rename from src/jobject_comparator.h
rename to runtime/jobject_comparator.h
diff --git a/src/jvalue.h b/runtime/jvalue.h
similarity index 100%
rename from src/jvalue.h
rename to runtime/jvalue.h
diff --git a/src/leb128.h b/runtime/leb128.h
similarity index 100%
rename from src/leb128.h
rename to runtime/leb128.h
diff --git a/src/locks.cc b/runtime/locks.cc
similarity index 100%
rename from src/locks.cc
rename to runtime/locks.cc
diff --git a/src/locks.h b/runtime/locks.h
similarity index 100%
rename from src/locks.h
rename to runtime/locks.h
diff --git a/src/log_severity.h b/runtime/log_severity.h
similarity index 100%
rename from src/log_severity.h
rename to runtime/log_severity.h
diff --git a/src/mem_map.cc b/runtime/mem_map.cc
similarity index 100%
rename from src/mem_map.cc
rename to runtime/mem_map.cc
diff --git a/src/mem_map.h b/runtime/mem_map.h
similarity index 100%
rename from src/mem_map.h
rename to runtime/mem_map.h
diff --git a/src/memory_region.cc b/runtime/memory_region.cc
similarity index 100%
rename from src/memory_region.cc
rename to runtime/memory_region.cc
diff --git a/src/memory_region.h b/runtime/memory_region.h
similarity index 100%
rename from src/memory_region.h
rename to runtime/memory_region.h
diff --git a/src/method_reference.h b/runtime/method_reference.h
similarity index 100%
rename from src/method_reference.h
rename to runtime/method_reference.h
diff --git a/src/mirror/abstract_method-inl.h b/runtime/mirror/abstract_method-inl.h
similarity index 100%
rename from src/mirror/abstract_method-inl.h
rename to runtime/mirror/abstract_method-inl.h
diff --git a/src/mirror/abstract_method.cc b/runtime/mirror/abstract_method.cc
similarity index 100%
rename from src/mirror/abstract_method.cc
rename to runtime/mirror/abstract_method.cc
diff --git a/src/mirror/abstract_method.h b/runtime/mirror/abstract_method.h
similarity index 100%
rename from src/mirror/abstract_method.h
rename to runtime/mirror/abstract_method.h
diff --git a/src/mirror/array-inl.h b/runtime/mirror/array-inl.h
similarity index 100%
rename from src/mirror/array-inl.h
rename to runtime/mirror/array-inl.h
diff --git a/src/mirror/array.cc b/runtime/mirror/array.cc
similarity index 100%
rename from src/mirror/array.cc
rename to runtime/mirror/array.cc
diff --git a/src/mirror/array.h b/runtime/mirror/array.h
similarity index 100%
rename from src/mirror/array.h
rename to runtime/mirror/array.h
diff --git a/src/mirror/class-inl.h b/runtime/mirror/class-inl.h
similarity index 100%
rename from src/mirror/class-inl.h
rename to runtime/mirror/class-inl.h
diff --git a/src/mirror/class.cc b/runtime/mirror/class.cc
similarity index 100%
rename from src/mirror/class.cc
rename to runtime/mirror/class.cc
diff --git a/src/mirror/class.h b/runtime/mirror/class.h
similarity index 100%
rename from src/mirror/class.h
rename to runtime/mirror/class.h
diff --git a/src/mirror/class_loader.h b/runtime/mirror/class_loader.h
similarity index 100%
rename from src/mirror/class_loader.h
rename to runtime/mirror/class_loader.h
diff --git a/src/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h
similarity index 100%
rename from src/mirror/dex_cache-inl.h
rename to runtime/mirror/dex_cache-inl.h
diff --git a/src/mirror/dex_cache.cc b/runtime/mirror/dex_cache.cc
similarity index 100%
rename from src/mirror/dex_cache.cc
rename to runtime/mirror/dex_cache.cc
diff --git a/src/mirror/dex_cache.h b/runtime/mirror/dex_cache.h
similarity index 100%
rename from src/mirror/dex_cache.h
rename to runtime/mirror/dex_cache.h
diff --git a/src/mirror/dex_cache_test.cc b/runtime/mirror/dex_cache_test.cc
similarity index 100%
rename from src/mirror/dex_cache_test.cc
rename to runtime/mirror/dex_cache_test.cc
diff --git a/src/mirror/field-inl.h b/runtime/mirror/field-inl.h
similarity index 100%
rename from src/mirror/field-inl.h
rename to runtime/mirror/field-inl.h
diff --git a/src/mirror/field.cc b/runtime/mirror/field.cc
similarity index 100%
rename from src/mirror/field.cc
rename to runtime/mirror/field.cc
diff --git a/src/mirror/field.h b/runtime/mirror/field.h
similarity index 100%
rename from src/mirror/field.h
rename to runtime/mirror/field.h
diff --git a/src/mirror/iftable-inl.h b/runtime/mirror/iftable-inl.h
similarity index 100%
rename from src/mirror/iftable-inl.h
rename to runtime/mirror/iftable-inl.h
diff --git a/src/mirror/iftable.h b/runtime/mirror/iftable.h
similarity index 100%
rename from src/mirror/iftable.h
rename to runtime/mirror/iftable.h
diff --git a/src/mirror/object-inl.h b/runtime/mirror/object-inl.h
similarity index 100%
rename from src/mirror/object-inl.h
rename to runtime/mirror/object-inl.h
diff --git a/src/mirror/object.cc b/runtime/mirror/object.cc
similarity index 100%
rename from src/mirror/object.cc
rename to runtime/mirror/object.cc
diff --git a/src/mirror/object.h b/runtime/mirror/object.h
similarity index 100%
rename from src/mirror/object.h
rename to runtime/mirror/object.h
diff --git a/src/mirror/object_array-inl.h b/runtime/mirror/object_array-inl.h
similarity index 100%
rename from src/mirror/object_array-inl.h
rename to runtime/mirror/object_array-inl.h
diff --git a/src/mirror/object_array.h b/runtime/mirror/object_array.h
similarity index 100%
rename from src/mirror/object_array.h
rename to runtime/mirror/object_array.h
diff --git a/src/mirror/object_test.cc b/runtime/mirror/object_test.cc
similarity index 100%
rename from src/mirror/object_test.cc
rename to runtime/mirror/object_test.cc
diff --git a/src/mirror/proxy.h b/runtime/mirror/proxy.h
similarity index 100%
rename from src/mirror/proxy.h
rename to runtime/mirror/proxy.h
diff --git a/src/mirror/stack_trace_element.cc b/runtime/mirror/stack_trace_element.cc
similarity index 100%
rename from src/mirror/stack_trace_element.cc
rename to runtime/mirror/stack_trace_element.cc
diff --git a/src/mirror/stack_trace_element.h b/runtime/mirror/stack_trace_element.h
similarity index 100%
rename from src/mirror/stack_trace_element.h
rename to runtime/mirror/stack_trace_element.h
diff --git a/src/mirror/string.cc b/runtime/mirror/string.cc
similarity index 100%
rename from src/mirror/string.cc
rename to runtime/mirror/string.cc
diff --git a/src/mirror/string.h b/runtime/mirror/string.h
similarity index 100%
rename from src/mirror/string.h
rename to runtime/mirror/string.h
diff --git a/src/mirror/throwable.cc b/runtime/mirror/throwable.cc
similarity index 100%
rename from src/mirror/throwable.cc
rename to runtime/mirror/throwable.cc
diff --git a/src/mirror/throwable.h b/runtime/mirror/throwable.h
similarity index 100%
rename from src/mirror/throwable.h
rename to runtime/mirror/throwable.h
diff --git a/src/modifiers.h b/runtime/modifiers.h
similarity index 100%
rename from src/modifiers.h
rename to runtime/modifiers.h
diff --git a/src/monitor.cc b/runtime/monitor.cc
similarity index 100%
rename from src/monitor.cc
rename to runtime/monitor.cc
diff --git a/src/monitor.h b/runtime/monitor.h
similarity index 100%
rename from src/monitor.h
rename to runtime/monitor.h
diff --git a/src/monitor_android.cc b/runtime/monitor_android.cc
similarity index 100%
rename from src/monitor_android.cc
rename to runtime/monitor_android.cc
diff --git a/src/monitor_linux.cc b/runtime/monitor_linux.cc
similarity index 100%
rename from src/monitor_linux.cc
rename to runtime/monitor_linux.cc
diff --git a/src/native/dalvik_system_DexFile.cc b/runtime/native/dalvik_system_DexFile.cc
similarity index 100%
rename from src/native/dalvik_system_DexFile.cc
rename to runtime/native/dalvik_system_DexFile.cc
diff --git a/src/native/dalvik_system_VMDebug.cc b/runtime/native/dalvik_system_VMDebug.cc
similarity index 100%
rename from src/native/dalvik_system_VMDebug.cc
rename to runtime/native/dalvik_system_VMDebug.cc
diff --git a/src/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc
similarity index 100%
rename from src/native/dalvik_system_VMRuntime.cc
rename to runtime/native/dalvik_system_VMRuntime.cc
diff --git a/src/native/dalvik_system_VMStack.cc b/runtime/native/dalvik_system_VMStack.cc
similarity index 100%
rename from src/native/dalvik_system_VMStack.cc
rename to runtime/native/dalvik_system_VMStack.cc
diff --git a/src/native/dalvik_system_Zygote.cc b/runtime/native/dalvik_system_Zygote.cc
similarity index 100%
rename from src/native/dalvik_system_Zygote.cc
rename to runtime/native/dalvik_system_Zygote.cc
diff --git a/src/native/java_lang_Class.cc b/runtime/native/java_lang_Class.cc
similarity index 100%
rename from src/native/java_lang_Class.cc
rename to runtime/native/java_lang_Class.cc
diff --git a/src/native/java_lang_Object.cc b/runtime/native/java_lang_Object.cc
similarity index 100%
rename from src/native/java_lang_Object.cc
rename to runtime/native/java_lang_Object.cc
diff --git a/src/native/java_lang_Runtime.cc b/runtime/native/java_lang_Runtime.cc
similarity index 100%
rename from src/native/java_lang_Runtime.cc
rename to runtime/native/java_lang_Runtime.cc
diff --git a/src/native/java_lang_String.cc b/runtime/native/java_lang_String.cc
similarity index 100%
rename from src/native/java_lang_String.cc
rename to runtime/native/java_lang_String.cc
diff --git a/src/native/java_lang_System.cc b/runtime/native/java_lang_System.cc
similarity index 100%
rename from src/native/java_lang_System.cc
rename to runtime/native/java_lang_System.cc
diff --git a/src/native/java_lang_Thread.cc b/runtime/native/java_lang_Thread.cc
similarity index 100%
rename from src/native/java_lang_Thread.cc
rename to runtime/native/java_lang_Thread.cc
diff --git a/src/native/java_lang_Throwable.cc b/runtime/native/java_lang_Throwable.cc
similarity index 100%
rename from src/native/java_lang_Throwable.cc
rename to runtime/native/java_lang_Throwable.cc
diff --git a/src/native/java_lang_VMClassLoader.cc b/runtime/native/java_lang_VMClassLoader.cc
similarity index 100%
rename from src/native/java_lang_VMClassLoader.cc
rename to runtime/native/java_lang_VMClassLoader.cc
diff --git a/src/native/java_lang_reflect_Array.cc b/runtime/native/java_lang_reflect_Array.cc
similarity index 100%
rename from src/native/java_lang_reflect_Array.cc
rename to runtime/native/java_lang_reflect_Array.cc
diff --git a/src/native/java_lang_reflect_Constructor.cc b/runtime/native/java_lang_reflect_Constructor.cc
similarity index 100%
rename from src/native/java_lang_reflect_Constructor.cc
rename to runtime/native/java_lang_reflect_Constructor.cc
diff --git a/src/native/java_lang_reflect_Field.cc b/runtime/native/java_lang_reflect_Field.cc
similarity index 100%
rename from src/native/java_lang_reflect_Field.cc
rename to runtime/native/java_lang_reflect_Field.cc
diff --git a/src/native/java_lang_reflect_Method.cc b/runtime/native/java_lang_reflect_Method.cc
similarity index 100%
rename from src/native/java_lang_reflect_Method.cc
rename to runtime/native/java_lang_reflect_Method.cc
diff --git a/src/native/java_lang_reflect_Proxy.cc b/runtime/native/java_lang_reflect_Proxy.cc
similarity index 100%
rename from src/native/java_lang_reflect_Proxy.cc
rename to runtime/native/java_lang_reflect_Proxy.cc
diff --git a/src/native/java_util_concurrent_atomic_AtomicLong.cc b/runtime/native/java_util_concurrent_atomic_AtomicLong.cc
similarity index 100%
rename from src/native/java_util_concurrent_atomic_AtomicLong.cc
rename to runtime/native/java_util_concurrent_atomic_AtomicLong.cc
diff --git a/src/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
similarity index 100%
rename from src/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
rename to runtime/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc
diff --git a/src/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc b/runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
similarity index 100%
rename from src/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
rename to runtime/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc
diff --git a/src/native/sun_misc_Unsafe.cc b/runtime/native/sun_misc_Unsafe.cc
similarity index 100%
rename from src/native/sun_misc_Unsafe.cc
rename to runtime/native/sun_misc_Unsafe.cc
diff --git a/src/nth_caller_visitor.h b/runtime/nth_caller_visitor.h
similarity index 100%
rename from src/nth_caller_visitor.h
rename to runtime/nth_caller_visitor.h
diff --git a/src/oat.cc b/runtime/oat.cc
similarity index 100%
rename from src/oat.cc
rename to runtime/oat.cc
diff --git a/src/oat.h b/runtime/oat.h
similarity index 100%
rename from src/oat.h
rename to runtime/oat.h
diff --git a/src/oat/runtime/argument_visitor.h b/runtime/oat/runtime/argument_visitor.h
similarity index 100%
rename from src/oat/runtime/argument_visitor.h
rename to runtime/oat/runtime/argument_visitor.h
diff --git a/src/oat/runtime/arm/context_arm.cc b/runtime/oat/runtime/arm/context_arm.cc
similarity index 100%
rename from src/oat/runtime/arm/context_arm.cc
rename to runtime/oat/runtime/arm/context_arm.cc
diff --git a/src/oat/runtime/arm/context_arm.h b/runtime/oat/runtime/arm/context_arm.h
similarity index 100%
rename from src/oat/runtime/arm/context_arm.h
rename to runtime/oat/runtime/arm/context_arm.h
diff --git a/src/oat/runtime/arm/oat_support_entrypoints_arm.cc b/runtime/oat/runtime/arm/oat_support_entrypoints_arm.cc
similarity index 100%
rename from src/oat/runtime/arm/oat_support_entrypoints_arm.cc
rename to runtime/oat/runtime/arm/oat_support_entrypoints_arm.cc
diff --git a/src/oat/runtime/arm/runtime_support_arm.S b/runtime/oat/runtime/arm/runtime_support_arm.S
similarity index 100%
rename from src/oat/runtime/arm/runtime_support_arm.S
rename to runtime/oat/runtime/arm/runtime_support_arm.S
diff --git a/src/oat/runtime/callee_save_frame.h b/runtime/oat/runtime/callee_save_frame.h
similarity index 100%
rename from src/oat/runtime/callee_save_frame.h
rename to runtime/oat/runtime/callee_save_frame.h
diff --git a/src/oat/runtime/context.cc b/runtime/oat/runtime/context.cc
similarity index 100%
rename from src/oat/runtime/context.cc
rename to runtime/oat/runtime/context.cc
diff --git a/src/oat/runtime/context.h b/runtime/oat/runtime/context.h
similarity index 100%
rename from src/oat/runtime/context.h
rename to runtime/oat/runtime/context.h
diff --git a/src/oat/runtime/mips/context_mips.cc b/runtime/oat/runtime/mips/context_mips.cc
similarity index 100%
rename from src/oat/runtime/mips/context_mips.cc
rename to runtime/oat/runtime/mips/context_mips.cc
diff --git a/src/oat/runtime/mips/context_mips.h b/runtime/oat/runtime/mips/context_mips.h
similarity index 100%
rename from src/oat/runtime/mips/context_mips.h
rename to runtime/oat/runtime/mips/context_mips.h
diff --git a/src/oat/runtime/mips/oat_support_entrypoints_mips.cc b/runtime/oat/runtime/mips/oat_support_entrypoints_mips.cc
similarity index 100%
rename from src/oat/runtime/mips/oat_support_entrypoints_mips.cc
rename to runtime/oat/runtime/mips/oat_support_entrypoints_mips.cc
diff --git a/src/oat/runtime/mips/runtime_support_mips.S b/runtime/oat/runtime/mips/runtime_support_mips.S
similarity index 100%
rename from src/oat/runtime/mips/runtime_support_mips.S
rename to runtime/oat/runtime/mips/runtime_support_mips.S
diff --git a/src/oat/runtime/oat_support_entrypoints.h b/runtime/oat/runtime/oat_support_entrypoints.h
similarity index 100%
rename from src/oat/runtime/oat_support_entrypoints.h
rename to runtime/oat/runtime/oat_support_entrypoints.h
diff --git a/src/oat/runtime/support_alloc.cc b/runtime/oat/runtime/support_alloc.cc
similarity index 100%
rename from src/oat/runtime/support_alloc.cc
rename to runtime/oat/runtime/support_alloc.cc
diff --git a/src/oat/runtime/support_cast.cc b/runtime/oat/runtime/support_cast.cc
similarity index 100%
rename from src/oat/runtime/support_cast.cc
rename to runtime/oat/runtime/support_cast.cc
diff --git a/src/oat/runtime/support_deoptimize.cc b/runtime/oat/runtime/support_deoptimize.cc
similarity index 100%
rename from src/oat/runtime/support_deoptimize.cc
rename to runtime/oat/runtime/support_deoptimize.cc
diff --git a/src/oat/runtime/support_dexcache.cc b/runtime/oat/runtime/support_dexcache.cc
similarity index 100%
rename from src/oat/runtime/support_dexcache.cc
rename to runtime/oat/runtime/support_dexcache.cc
diff --git a/src/oat/runtime/support_field.cc b/runtime/oat/runtime/support_field.cc
similarity index 100%
rename from src/oat/runtime/support_field.cc
rename to runtime/oat/runtime/support_field.cc
diff --git a/src/oat/runtime/support_fillarray.cc b/runtime/oat/runtime/support_fillarray.cc
similarity index 100%
rename from src/oat/runtime/support_fillarray.cc
rename to runtime/oat/runtime/support_fillarray.cc
diff --git a/src/oat/runtime/support_instrumentation.cc b/runtime/oat/runtime/support_instrumentation.cc
similarity index 100%
rename from src/oat/runtime/support_instrumentation.cc
rename to runtime/oat/runtime/support_instrumentation.cc
diff --git a/src/oat/runtime/support_interpreter.cc b/runtime/oat/runtime/support_interpreter.cc
similarity index 100%
rename from src/oat/runtime/support_interpreter.cc
rename to runtime/oat/runtime/support_interpreter.cc
diff --git a/src/oat/runtime/support_invoke.cc b/runtime/oat/runtime/support_invoke.cc
similarity index 100%
rename from src/oat/runtime/support_invoke.cc
rename to runtime/oat/runtime/support_invoke.cc
diff --git a/src/oat/runtime/support_jni.cc b/runtime/oat/runtime/support_jni.cc
similarity index 100%
rename from src/oat/runtime/support_jni.cc
rename to runtime/oat/runtime/support_jni.cc
diff --git a/src/oat/runtime/support_locks.cc b/runtime/oat/runtime/support_locks.cc
similarity index 100%
rename from src/oat/runtime/support_locks.cc
rename to runtime/oat/runtime/support_locks.cc
diff --git a/src/oat/runtime/support_math.cc b/runtime/oat/runtime/support_math.cc
similarity index 100%
rename from src/oat/runtime/support_math.cc
rename to runtime/oat/runtime/support_math.cc
diff --git a/src/oat/runtime/support_proxy.cc b/runtime/oat/runtime/support_proxy.cc
similarity index 100%
rename from src/oat/runtime/support_proxy.cc
rename to runtime/oat/runtime/support_proxy.cc
diff --git a/src/oat/runtime/support_stubs.cc b/runtime/oat/runtime/support_stubs.cc
similarity index 100%
rename from src/oat/runtime/support_stubs.cc
rename to runtime/oat/runtime/support_stubs.cc
diff --git a/src/oat/runtime/support_thread.cc b/runtime/oat/runtime/support_thread.cc
similarity index 100%
rename from src/oat/runtime/support_thread.cc
rename to runtime/oat/runtime/support_thread.cc
diff --git a/src/oat/runtime/support_throw.cc b/runtime/oat/runtime/support_throw.cc
similarity index 100%
rename from src/oat/runtime/support_throw.cc
rename to runtime/oat/runtime/support_throw.cc
diff --git a/src/oat/runtime/x86/context_x86.cc b/runtime/oat/runtime/x86/context_x86.cc
similarity index 100%
rename from src/oat/runtime/x86/context_x86.cc
rename to runtime/oat/runtime/x86/context_x86.cc
diff --git a/src/oat/runtime/x86/context_x86.h b/runtime/oat/runtime/x86/context_x86.h
similarity index 100%
rename from src/oat/runtime/x86/context_x86.h
rename to runtime/oat/runtime/x86/context_x86.h
diff --git a/src/oat/runtime/x86/oat_support_entrypoints_x86.cc b/runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc
similarity index 100%
rename from src/oat/runtime/x86/oat_support_entrypoints_x86.cc
rename to runtime/oat/runtime/x86/oat_support_entrypoints_x86.cc
diff --git a/src/oat/runtime/x86/runtime_support_x86.S b/runtime/oat/runtime/x86/runtime_support_x86.S
similarity index 100%
rename from src/oat/runtime/x86/runtime_support_x86.S
rename to runtime/oat/runtime/x86/runtime_support_x86.S
diff --git a/src/oat/utils/arm/assembler_arm.cc b/runtime/oat/utils/arm/assembler_arm.cc
similarity index 100%
rename from src/oat/utils/arm/assembler_arm.cc
rename to runtime/oat/utils/arm/assembler_arm.cc
diff --git a/src/oat/utils/arm/assembler_arm.h b/runtime/oat/utils/arm/assembler_arm.h
similarity index 100%
rename from src/oat/utils/arm/assembler_arm.h
rename to runtime/oat/utils/arm/assembler_arm.h
diff --git a/src/oat/utils/arm/managed_register_arm.cc b/runtime/oat/utils/arm/managed_register_arm.cc
similarity index 100%
rename from src/oat/utils/arm/managed_register_arm.cc
rename to runtime/oat/utils/arm/managed_register_arm.cc
diff --git a/src/oat/utils/arm/managed_register_arm.h b/runtime/oat/utils/arm/managed_register_arm.h
similarity index 100%
rename from src/oat/utils/arm/managed_register_arm.h
rename to runtime/oat/utils/arm/managed_register_arm.h
diff --git a/src/oat/utils/arm/managed_register_arm_test.cc b/runtime/oat/utils/arm/managed_register_arm_test.cc
similarity index 100%
rename from src/oat/utils/arm/managed_register_arm_test.cc
rename to runtime/oat/utils/arm/managed_register_arm_test.cc
diff --git a/src/oat/utils/assembler.cc b/runtime/oat/utils/assembler.cc
similarity index 100%
rename from src/oat/utils/assembler.cc
rename to runtime/oat/utils/assembler.cc
diff --git a/src/oat/utils/assembler.h b/runtime/oat/utils/assembler.h
similarity index 100%
rename from src/oat/utils/assembler.h
rename to runtime/oat/utils/assembler.h
diff --git a/src/oat/utils/managed_register.h b/runtime/oat/utils/managed_register.h
similarity index 100%
rename from src/oat/utils/managed_register.h
rename to runtime/oat/utils/managed_register.h
diff --git a/src/oat/utils/mips/assembler_mips.cc b/runtime/oat/utils/mips/assembler_mips.cc
similarity index 100%
rename from src/oat/utils/mips/assembler_mips.cc
rename to runtime/oat/utils/mips/assembler_mips.cc
diff --git a/src/oat/utils/mips/assembler_mips.h b/runtime/oat/utils/mips/assembler_mips.h
similarity index 100%
rename from src/oat/utils/mips/assembler_mips.h
rename to runtime/oat/utils/mips/assembler_mips.h
diff --git a/src/oat/utils/mips/managed_register_mips.cc b/runtime/oat/utils/mips/managed_register_mips.cc
similarity index 100%
rename from src/oat/utils/mips/managed_register_mips.cc
rename to runtime/oat/utils/mips/managed_register_mips.cc
diff --git a/src/oat/utils/mips/managed_register_mips.h b/runtime/oat/utils/mips/managed_register_mips.h
similarity index 100%
rename from src/oat/utils/mips/managed_register_mips.h
rename to runtime/oat/utils/mips/managed_register_mips.h
diff --git a/src/oat/utils/x86/assembler_x86.cc b/runtime/oat/utils/x86/assembler_x86.cc
similarity index 100%
rename from src/oat/utils/x86/assembler_x86.cc
rename to runtime/oat/utils/x86/assembler_x86.cc
diff --git a/src/oat/utils/x86/assembler_x86.h b/runtime/oat/utils/x86/assembler_x86.h
similarity index 100%
rename from src/oat/utils/x86/assembler_x86.h
rename to runtime/oat/utils/x86/assembler_x86.h
diff --git a/src/oat/utils/x86/assembler_x86_test.cc b/runtime/oat/utils/x86/assembler_x86_test.cc
similarity index 100%
rename from src/oat/utils/x86/assembler_x86_test.cc
rename to runtime/oat/utils/x86/assembler_x86_test.cc
diff --git a/src/oat/utils/x86/managed_register_x86.cc b/runtime/oat/utils/x86/managed_register_x86.cc
similarity index 100%
rename from src/oat/utils/x86/managed_register_x86.cc
rename to runtime/oat/utils/x86/managed_register_x86.cc
diff --git a/src/oat/utils/x86/managed_register_x86.h b/runtime/oat/utils/x86/managed_register_x86.h
similarity index 100%
rename from src/oat/utils/x86/managed_register_x86.h
rename to runtime/oat/utils/x86/managed_register_x86.h
diff --git a/src/oat/utils/x86/managed_register_x86_test.cc b/runtime/oat/utils/x86/managed_register_x86_test.cc
similarity index 100%
rename from src/oat/utils/x86/managed_register_x86_test.cc
rename to runtime/oat/utils/x86/managed_register_x86_test.cc
diff --git a/src/oat_file.cc b/runtime/oat_file.cc
similarity index 100%
rename from src/oat_file.cc
rename to runtime/oat_file.cc
diff --git a/src/oat_file.h b/runtime/oat_file.h
similarity index 100%
rename from src/oat_file.h
rename to runtime/oat_file.h
diff --git a/src/oat_test.cc b/runtime/oat_test.cc
similarity index 100%
rename from src/oat_test.cc
rename to runtime/oat_test.cc
diff --git a/src/object_utils.h b/runtime/object_utils.h
similarity index 100%
rename from src/object_utils.h
rename to runtime/object_utils.h
diff --git a/src/offsets.cc b/runtime/offsets.cc
similarity index 100%
rename from src/offsets.cc
rename to runtime/offsets.cc
diff --git a/src/offsets.h b/runtime/offsets.h
similarity index 100%
rename from src/offsets.h
rename to runtime/offsets.h
diff --git a/src/os.h b/runtime/os.h
similarity index 100%
rename from src/os.h
rename to runtime/os.h
diff --git a/src/os_linux.cc b/runtime/os_linux.cc
similarity index 100%
rename from src/os_linux.cc
rename to runtime/os_linux.cc
diff --git a/src/output_stream.h b/runtime/output_stream.h
similarity index 100%
rename from src/output_stream.h
rename to runtime/output_stream.h
diff --git a/src/output_stream_test.cc b/runtime/output_stream_test.cc
similarity index 100%
rename from src/output_stream_test.cc
rename to runtime/output_stream_test.cc
diff --git a/src/primitive.cc b/runtime/primitive.cc
similarity index 100%
rename from src/primitive.cc
rename to runtime/primitive.cc
diff --git a/src/primitive.h b/runtime/primitive.h
similarity index 100%
rename from src/primitive.h
rename to runtime/primitive.h
diff --git a/src/reference_table.cc b/runtime/reference_table.cc
similarity index 100%
rename from src/reference_table.cc
rename to runtime/reference_table.cc
diff --git a/src/reference_table.h b/runtime/reference_table.h
similarity index 100%
rename from src/reference_table.h
rename to runtime/reference_table.h
diff --git a/src/reference_table_test.cc b/runtime/reference_table_test.cc
similarity index 100%
rename from src/reference_table_test.cc
rename to runtime/reference_table_test.cc
diff --git a/src/reflection.cc b/runtime/reflection.cc
similarity index 100%
rename from src/reflection.cc
rename to runtime/reflection.cc
diff --git a/src/reflection.h b/runtime/reflection.h
similarity index 100%
rename from src/reflection.h
rename to runtime/reflection.h
diff --git a/src/root_visitor.h b/runtime/root_visitor.h
similarity index 100%
rename from src/root_visitor.h
rename to runtime/root_visitor.h
diff --git a/src/runtime.cc b/runtime/runtime.cc
similarity index 100%
rename from src/runtime.cc
rename to runtime/runtime.cc
diff --git a/src/runtime.h b/runtime/runtime.h
similarity index 100%
rename from src/runtime.h
rename to runtime/runtime.h
diff --git a/src/runtime_android.cc b/runtime/runtime_android.cc
similarity index 100%
rename from src/runtime_android.cc
rename to runtime/runtime_android.cc
diff --git a/src/runtime_linux.cc b/runtime/runtime_linux.cc
similarity index 100%
rename from src/runtime_linux.cc
rename to runtime/runtime_linux.cc
diff --git a/src/runtime_stats.h b/runtime/runtime_stats.h
similarity index 100%
rename from src/runtime_stats.h
rename to runtime/runtime_stats.h
diff --git a/src/runtime_support.cc b/runtime/runtime_support.cc
similarity index 100%
rename from src/runtime_support.cc
rename to runtime/runtime_support.cc
diff --git a/src/runtime_support.h b/runtime/runtime_support.h
similarity index 100%
rename from src/runtime_support.h
rename to runtime/runtime_support.h
diff --git a/src/runtime_support_llvm.cc b/runtime/runtime_support_llvm.cc
similarity index 100%
rename from src/runtime_support_llvm.cc
rename to runtime/runtime_support_llvm.cc
diff --git a/src/runtime_support_llvm.h b/runtime/runtime_support_llvm.h
similarity index 100%
rename from src/runtime_support_llvm.h
rename to runtime/runtime_support_llvm.h
diff --git a/src/runtime_support_llvm_func_list.h b/runtime/runtime_support_llvm_func_list.h
similarity index 100%
rename from src/runtime_support_llvm_func_list.h
rename to runtime/runtime_support_llvm_func_list.h
diff --git a/src/runtime_support_test.cc b/runtime/runtime_support_test.cc
similarity index 100%
rename from src/runtime_support_test.cc
rename to runtime/runtime_support_test.cc
diff --git a/src/runtime_test.cc b/runtime/runtime_test.cc
similarity index 100%
rename from src/runtime_test.cc
rename to runtime/runtime_test.cc
diff --git a/src/safe_map.h b/runtime/safe_map.h
similarity index 100%
rename from src/safe_map.h
rename to runtime/safe_map.h
diff --git a/src/scoped_thread_state_change.h b/runtime/scoped_thread_state_change.h
similarity index 100%
rename from src/scoped_thread_state_change.h
rename to runtime/scoped_thread_state_change.h
diff --git a/src/signal_catcher.cc b/runtime/signal_catcher.cc
similarity index 100%
rename from src/signal_catcher.cc
rename to runtime/signal_catcher.cc
diff --git a/src/signal_catcher.h b/runtime/signal_catcher.h
similarity index 100%
rename from src/signal_catcher.h
rename to runtime/signal_catcher.h
diff --git a/src/signal_set.h b/runtime/signal_set.h
similarity index 100%
rename from src/signal_set.h
rename to runtime/signal_set.h
diff --git a/src/sirt_ref.h b/runtime/sirt_ref.h
similarity index 100%
rename from src/sirt_ref.h
rename to runtime/sirt_ref.h
diff --git a/src/stack.cc b/runtime/stack.cc
similarity index 100%
rename from src/stack.cc
rename to runtime/stack.cc
diff --git a/src/stack.h b/runtime/stack.h
similarity index 100%
rename from src/stack.h
rename to runtime/stack.h
diff --git a/src/stack_indirect_reference_table.h b/runtime/stack_indirect_reference_table.h
similarity index 100%
rename from src/stack_indirect_reference_table.h
rename to runtime/stack_indirect_reference_table.h
diff --git a/src/strutil.h b/runtime/strutil.h
similarity index 100%
rename from src/strutil.h
rename to runtime/strutil.h
diff --git a/src/thread-inl.h b/runtime/thread-inl.h
similarity index 100%
rename from src/thread-inl.h
rename to runtime/thread-inl.h
diff --git a/src/thread.cc b/runtime/thread.cc
similarity index 100%
rename from src/thread.cc
rename to runtime/thread.cc
diff --git a/src/thread.h b/runtime/thread.h
similarity index 100%
rename from src/thread.h
rename to runtime/thread.h
diff --git a/src/thread_android.cc b/runtime/thread_android.cc
similarity index 100%
rename from src/thread_android.cc
rename to runtime/thread_android.cc
diff --git a/src/thread_arm.cc b/runtime/thread_arm.cc
similarity index 100%
rename from src/thread_arm.cc
rename to runtime/thread_arm.cc
diff --git a/src/thread_linux.cc b/runtime/thread_linux.cc
similarity index 100%
rename from src/thread_linux.cc
rename to runtime/thread_linux.cc
diff --git a/src/thread_list.cc b/runtime/thread_list.cc
similarity index 100%
rename from src/thread_list.cc
rename to runtime/thread_list.cc
diff --git a/src/thread_list.h b/runtime/thread_list.h
similarity index 100%
rename from src/thread_list.h
rename to runtime/thread_list.h
diff --git a/src/thread_mips.cc b/runtime/thread_mips.cc
similarity index 100%
rename from src/thread_mips.cc
rename to runtime/thread_mips.cc
diff --git a/src/thread_pool.cc b/runtime/thread_pool.cc
similarity index 100%
rename from src/thread_pool.cc
rename to runtime/thread_pool.cc
diff --git a/src/thread_pool.h b/runtime/thread_pool.h
similarity index 100%
rename from src/thread_pool.h
rename to runtime/thread_pool.h
diff --git a/src/thread_pool_test.cc b/runtime/thread_pool_test.cc
similarity index 100%
rename from src/thread_pool_test.cc
rename to runtime/thread_pool_test.cc
diff --git a/src/thread_state.h b/runtime/thread_state.h
similarity index 100%
rename from src/thread_state.h
rename to runtime/thread_state.h
diff --git a/src/thread_x86.cc b/runtime/thread_x86.cc
similarity index 100%
rename from src/thread_x86.cc
rename to runtime/thread_x86.cc
diff --git a/src/throw_location.cc b/runtime/throw_location.cc
similarity index 100%
rename from src/throw_location.cc
rename to runtime/throw_location.cc
diff --git a/src/throw_location.h b/runtime/throw_location.h
similarity index 100%
rename from src/throw_location.h
rename to runtime/throw_location.h
diff --git a/src/trace.cc b/runtime/trace.cc
similarity index 100%
rename from src/trace.cc
rename to runtime/trace.cc
diff --git a/src/trace.h b/runtime/trace.h
similarity index 100%
rename from src/trace.h
rename to runtime/trace.h
diff --git a/src/utf.cc b/runtime/utf.cc
similarity index 100%
rename from src/utf.cc
rename to runtime/utf.cc
diff --git a/src/utf.h b/runtime/utf.h
similarity index 100%
rename from src/utf.h
rename to runtime/utf.h
diff --git a/src/utils.cc b/runtime/utils.cc
similarity index 100%
rename from src/utils.cc
rename to runtime/utils.cc
diff --git a/src/utils.h b/runtime/utils.h
similarity index 100%
rename from src/utils.h
rename to runtime/utils.h
diff --git a/src/utils_test.cc b/runtime/utils_test.cc
similarity index 100%
rename from src/utils_test.cc
rename to runtime/utils_test.cc
diff --git a/src/vector_output_stream.cc b/runtime/vector_output_stream.cc
similarity index 100%
rename from src/vector_output_stream.cc
rename to runtime/vector_output_stream.cc
diff --git a/src/vector_output_stream.h b/runtime/vector_output_stream.h
similarity index 100%
rename from src/vector_output_stream.h
rename to runtime/vector_output_stream.h
diff --git a/src/verifier/dex_gc_map.cc b/runtime/verifier/dex_gc_map.cc
similarity index 100%
rename from src/verifier/dex_gc_map.cc
rename to runtime/verifier/dex_gc_map.cc
diff --git a/src/verifier/dex_gc_map.h b/runtime/verifier/dex_gc_map.h
similarity index 100%
rename from src/verifier/dex_gc_map.h
rename to runtime/verifier/dex_gc_map.h
diff --git a/src/verifier/instruction_flags.cc b/runtime/verifier/instruction_flags.cc
similarity index 100%
rename from src/verifier/instruction_flags.cc
rename to runtime/verifier/instruction_flags.cc
diff --git a/src/verifier/instruction_flags.h b/runtime/verifier/instruction_flags.h
similarity index 100%
rename from src/verifier/instruction_flags.h
rename to runtime/verifier/instruction_flags.h
diff --git a/src/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
similarity index 100%
rename from src/verifier/method_verifier.cc
rename to runtime/verifier/method_verifier.cc
diff --git a/src/verifier/method_verifier.h b/runtime/verifier/method_verifier.h
similarity index 100%
rename from src/verifier/method_verifier.h
rename to runtime/verifier/method_verifier.h
diff --git a/src/verifier/method_verifier_test.cc b/runtime/verifier/method_verifier_test.cc
similarity index 100%
rename from src/verifier/method_verifier_test.cc
rename to runtime/verifier/method_verifier_test.cc
diff --git a/src/verifier/reg_type.cc b/runtime/verifier/reg_type.cc
similarity index 100%
rename from src/verifier/reg_type.cc
rename to runtime/verifier/reg_type.cc
diff --git a/src/verifier/reg_type.h b/runtime/verifier/reg_type.h
similarity index 100%
rename from src/verifier/reg_type.h
rename to runtime/verifier/reg_type.h
diff --git a/src/verifier/reg_type_cache-inl.h b/runtime/verifier/reg_type_cache-inl.h
similarity index 100%
rename from src/verifier/reg_type_cache-inl.h
rename to runtime/verifier/reg_type_cache-inl.h
diff --git a/src/verifier/reg_type_cache.cc b/runtime/verifier/reg_type_cache.cc
similarity index 100%
rename from src/verifier/reg_type_cache.cc
rename to runtime/verifier/reg_type_cache.cc
diff --git a/src/verifier/reg_type_cache.h b/runtime/verifier/reg_type_cache.h
similarity index 100%
rename from src/verifier/reg_type_cache.h
rename to runtime/verifier/reg_type_cache.h
diff --git a/src/verifier/reg_type_test.cc b/runtime/verifier/reg_type_test.cc
similarity index 100%
rename from src/verifier/reg_type_test.cc
rename to runtime/verifier/reg_type_test.cc
diff --git a/src/verifier/register_line-inl.h b/runtime/verifier/register_line-inl.h
similarity index 100%
rename from src/verifier/register_line-inl.h
rename to runtime/verifier/register_line-inl.h
diff --git a/src/verifier/register_line.cc b/runtime/verifier/register_line.cc
similarity index 100%
rename from src/verifier/register_line.cc
rename to runtime/verifier/register_line.cc
diff --git a/src/verifier/register_line.h b/runtime/verifier/register_line.h
similarity index 100%
rename from src/verifier/register_line.h
rename to runtime/verifier/register_line.h
diff --git a/src/well_known_classes.cc b/runtime/well_known_classes.cc
similarity index 100%
rename from src/well_known_classes.cc
rename to runtime/well_known_classes.cc
diff --git a/src/well_known_classes.h b/runtime/well_known_classes.h
similarity index 100%
rename from src/well_known_classes.h
rename to runtime/well_known_classes.h
diff --git a/src/zip_archive.cc b/runtime/zip_archive.cc
similarity index 100%
rename from src/zip_archive.cc
rename to runtime/zip_archive.cc
diff --git a/src/zip_archive.h b/runtime/zip_archive.h
similarity index 100%
rename from src/zip_archive.h
rename to runtime/zip_archive.h
diff --git a/src/zip_archive_test.cc b/runtime/zip_archive_test.cc
similarity index 100%
rename from src/zip_archive_test.cc
rename to runtime/zip_archive_test.cc
diff --git a/test/Android.mk b/test/Android.mk
index 6c7b26e..a91ed3d 100644
--- a/test/Android.mk
+++ b/test/Android.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2012 The Android Open Source Project
+# 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.
@@ -15,6 +15,132 @@
 
 LOCAL_PATH := $(call my-dir)
 
+include art/build/Android.common.mk
+
+########################################################################
+
+# subdirectories which are used as inputs for gtests
+TEST_DEX_DIRECTORIES := \
+	AbstractMethod \
+	AllFields \
+	CreateMethodSignature \
+	ExceptionHandle \
+	Interfaces \
+	Main \
+	MyClass \
+	MyClassNatives \
+	Nested \
+	NonStaticLeafMethods \
+	ProtoCompare \
+	ProtoCompare2 \
+	StaticLeafMethods \
+	Statics \
+	StaticsFromCode \
+	XandY
+
+# subdirectories of which are used with test-art-target-oat
+# Declare the simplest tests (Main, HelloWorld) first, the rest are alphabetical
+TEST_OAT_DIRECTORIES := \
+	Main \
+	HelloWorld \
+	\
+	NativeAllocations \
+	ParallelGC \
+	ReferenceMap \
+	StackWalk \
+	ThreadStress
+
+# TODO: Enable when the StackWalk2 tests are passing
+#	StackWalk2 \
+
+ART_TEST_TARGET_DEX_FILES :=
+ART_TEST_HOST_DEX_FILES :=
+
+# $(1): module prefix
+# $(2): input test directory
+# $(3): target output module path (default module path is used on host)
+define build-art-test-dex
+  ifeq ($(ART_BUILD_TARGET),true)
+    include $(CLEAR_VARS)
+    LOCAL_MODULE := $(1)-$(2)
+    LOCAL_MODULE_TAGS := tests
+    LOCAL_SRC_FILES := $(call all-java-files-under, $(2))
+    LOCAL_JAVA_LIBRARIES := $(TARGET_CORE_JARS)
+    LOCAL_NO_STANDARD_LIBRARIES := true
+    LOCAL_MODULE_PATH := $(3)
+    LOCAL_DEX_PREOPT_IMAGE := $(TARGET_CORE_IMG_OUT)
+    LOCAL_DEX_PREOPT := false
+    LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common.mk
+    LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
+    include $(BUILD_JAVA_LIBRARY)
+    ART_TEST_TARGET_DEX_FILES += $(3)/$$(LOCAL_MODULE).jar
+  endif
+
+  ifeq ($(ART_BUILD_HOST),true)
+    include $(CLEAR_VARS)
+    LOCAL_MODULE := $(1)-$(2)
+    LOCAL_SRC_FILES := $(call all-java-files-under, $(2))
+    LOCAL_JAVA_LIBRARIES := $(HOST_CORE_JARS)
+    LOCAL_NO_STANDARD_LIBRARIES := true
+    LOCAL_DEX_PREOPT_IMAGE := $(HOST_CORE_IMG_OUT)
+    LOCAL_BUILD_HOST_DEX := true
+    LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common.mk
+    LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
+    include $(BUILD_HOST_JAVA_LIBRARY)
+    ART_TEST_HOST_DEX_FILES += $$(LOCAL_MODULE_PATH)/$$(LOCAL_MODULE).jar
+  endif
+endef
+$(foreach dir,$(TEST_DEX_DIRECTORIES), $(eval $(call build-art-test-dex,art-test-dex,$(dir),$(ART_NATIVETEST_OUT))))
+$(foreach dir,$(TEST_OAT_DIRECTORIES), $(eval $(call build-art-test-dex,oat-test-dex,$(dir),$(ART_TEST_OUT))))
+
+########################################################################
+
+ART_TEST_TARGET_OAT_TARGETS :=
+ART_TEST_HOST_OAT_TARGETS :=
+ART_TEST_HOST_INTERPRETER_OAT_TARGETS :=
+
+# $(1): directory
+# $(2): arguments
+define declare-test-art-oat-targets
+.PHONY: test-art-target-oat-$(1)
+test-art-target-oat-$(1): $(ART_TEST_OUT)/oat-test-dex-$(1).jar test-art-target-sync
+	adb shell touch $(ART_TEST_DIR)/test-art-target-oat-$(1)
+	adb shell rm $(ART_TEST_DIR)/test-art-target-oat-$(1)
+	adb shell sh -c "dalvikvm -XXlib:libartd.so -Ximage:$(ART_TEST_DIR)/core.art -classpath $(ART_TEST_DIR)/oat-test-dex-$(1).jar -Djava.library.path=$(ART_TEST_DIR) $(1) $(2) && touch $(ART_TEST_DIR)/test-art-target-oat-$(1)"
+	$(hide) (adb pull $(ART_TEST_DIR)/test-art-target-oat-$(1) /tmp/ && echo test-art-target-oat-$(1) PASSED) || (echo test-art-target-oat-$(1) FAILED && exit 1)
+	$(hide) rm /tmp/test-art-target-oat-$(1)
+
+$(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex: $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar $(HOST_CORE_IMG_OUT) | $(DEX2OAT)
+	$(DEX2OAT) --runtime-arg -Xms16m --runtime-arg -Xmx16m --boot-image=$(HOST_CORE_IMG_OUT) --dex-file=$$< --oat-file=$$@ --instruction-set=$(HOST_ARCH) --host --host-prefix="" --android-root=$(HOST_OUT)
+
+.PHONY: test-art-host-oat-$(1)
+test-art-host-oat-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex test-art-host-dependencies
+	mkdir -p /tmp/android-data/test-art-host-oat-$(1)
+	ANDROID_DATA=/tmp/android-data/test-art-host-oat-$(1) \
+	  ANDROID_ROOT=$(HOST_OUT) \
+	  LD_LIBRARY_PATH=$(HOST_OUT_SHARED_LIBRARIES) \
+	  dalvikvm -XXlib:libartd.so -Ximage:$(shell pwd)/$(HOST_CORE_IMG_OUT) -classpath $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar -Djava.library.path=$(HOST_OUT_SHARED_LIBRARIES) $(1) $(2) \
+          && echo test-art-host-oat-$(1) PASSED || (echo test-art-host-oat-$(1) FAILED && exit 1)
+	$(hide) rm -r /tmp/android-data/test-art-host-oat-$(1)
+
+.PHONY: test-art-host-interpreter-oat-$(1)
+test-art-host-interpreter-oat-$(1): $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).odex test-art-host-dependencies
+	mkdir -p /tmp/android-data/test-art-host-interpreter-oat-$(1)
+	ANDROID_DATA=/tmp/android-data/test-art-host-interpreter-oat-$(1) \
+	  ANDROID_ROOT=$(HOST_OUT) \
+	  LD_LIBRARY_PATH=$(HOST_OUT_SHARED_LIBRARIES) \
+	  dalvikvm -XXlib:libartd.so -Ximage:$(shell pwd)/$(HOST_CORE_IMG_OUT) -Xint -classpath $(HOST_OUT_JAVA_LIBRARIES)/oat-test-dex-$(1).jar -Djava.library.path=$(HOST_OUT_SHARED_LIBRARIES) $(1) $(2) \
+          && echo test-art-host-interpreter-oat-$(1) PASSED || (echo test-art-host-interpreter-oat-$(1) FAILED && exit 1)
+	$(hide) rm -r /tmp/android-data/test-art-host-interpreter-oat-$(1)
+
+ART_TEST_TARGET_OAT_TARGETS += test-art-target-oat-$(1)
+ART_TEST_HOST_OAT_TARGETS += test-art-host-oat-$(1)
+ART_TEST_HOST_INTERPRETER_OAT_TARGETS += test-art-host-interpreter-oat-$(1)
+endef
+$(foreach dir,$(TEST_OAT_DIRECTORIES), $(eval $(call declare-test-art-oat-targets,$(dir))))
+
+########################################################################
+
 TEST_ART_RUN_TEST_MAKE_TARGETS :=
 
 # Helper to create individual build targets for tests.
@@ -27,12 +153,13 @@
 	$(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1)
 	$(hide) touch $$@
 
+
 TEST_ART_RUN_TEST_MAKE_TARGETS += $$(dmart_target)
 dmart_target :=
 endef
 
 # Expand all tests.
-$(foreach test, $(wildcard art/test/[0-9]*), $(eval $(call declare-make-art-run-test,$(notdir $(test)))))
+$(foreach test, $(wildcard $(LOCAL_PATH)/[0-9]*), $(eval $(call declare-make-art-run-test,$(notdir $(test)))))
 
 include $(CLEAR_VARS)
 LOCAL_MODULE_TAGS := tests
@@ -43,3 +170,5 @@
 # clear temp vars
 TEST_ART_RUN_TEST_MAKE_TARGETS :=
 declare-make-art-run-test :=
+
+########################################################################
diff --git a/tools/generate-operator-out.py b/tools/generate-operator-out.py
index aa0c00e..678e664 100755
--- a/tools/generate-operator-out.py
+++ b/tools/generate-operator-out.py
@@ -158,8 +158,9 @@
     _ENUMS[enum_name].append((enum_value, enum_text))
 
 def main():
+  local_path = sys.argv[1]
   header_files = []
-  for header_file in sys.argv[1:]:
+  for header_file in sys.argv[2:]:
     header_files.append(header_file)
     ProcessFile(header_file)
 
@@ -167,9 +168,7 @@
   print
 
   for header_file in header_files:
-    # Make gives us paths relative to the top of the tree, but our -I is art/.
-    # We also have -I art/src/, but icu4c is higher on the include path and has a "mutex.h" too.
-    header_file = header_file.replace('art/', '')
+    header_file = header_file.replace(local_path + '/', '')
     print '#include "%s"' % header_file
 
   print