Fix Object::IsSoftReference

Also changed -Xzygote to default boot.art and log arguments

Finally Makefile work:
- separate out test dependencies
- changed zygote with art to work by replacing libdvm with libart[d]
- changed Makefile defines to name and error check their arguments
  This was to fix bug in generating ART_TARGET_EXECUTABLES
  where we used $(1) when we meant $(3)

Change-Id: I7ef6008eff1fe99b59d151b6793e8fd8ea5304d4
diff --git a/build/Android.executable.mk b/build/Android.executable.mk
index 3311b99..7619f74 100644
--- a/build/Android.executable.mk
+++ b/build/Android.executable.mk
@@ -22,50 +22,69 @@
 # $(3): target or host
 # $(4): ndebug or debug
 define build-art-executable
+  ifneq ($(3),target)
+    ifneq ($(3),host)
+      $$(error expected target or host for argument 3, received $(3))
+    endif
+  endif
+  ifneq ($(4),ndebug)
+    ifneq ($(4),debug)
+      $$(error expected ndebug or debug for argument 4, received $(4))
+    endif
+  endif
+
+  art_executable := $(1)
+  art_source := $(2)
+  art_target_or_host := $(3)
+  art_ndebug_or_debug := $(4)
+
   include $(CLEAR_VARS)
-  ifeq ($(3),target)
+  ifeq ($$(art_target_or_host),target)
     include external/stlport/libstlport.mk
   endif
+
   LOCAL_CPP_EXTENSION := $(ART_CPP_EXTENSION)
-  ifeq ($(4),ndebug)
-    LOCAL_MODULE := $(1)
-  else
-    LOCAL_MODULE := $(1)d
-  endif
   LOCAL_MODULE_TAGS := optional
-  LOCAL_SRC_FILES := $(2)
-  ifeq ($(3),target)
-    LOCAL_CFLAGS := $(ART_TARGET_CFLAGS)
-  else
-    LOCAL_CFLAGS := $(ART_HOST_CFLAGS)
+  LOCAL_SRC_FILES := $$(art_source)
+  LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
+  LOCAL_SHARED_LIBRARIES := libnativehelper
+
+  ifeq ($$(art_ndebug_or_debug),ndebug)
+    LOCAL_MODULE := $$(art_executable)
+  else #debug
+    LOCAL_MODULE := $$(art_executable)d
   endif
-  ifeq ($(4),debug)
-    ifeq ($(3),target)
+
+  ifeq ($(art_target_or_host),target)
+    LOCAL_CFLAGS := $(ART_TARGET_CFLAGS)
+    ifeq ($$(art_ndebug_or_debug),debug)
       LOCAL_CFLAGS += $(ART_TARGET_DEBUG_CFLAGS)
-    else
+    endif
+  else # host
+    LOCAL_CFLAGS := $(ART_HOST_CFLAGS)
+    ifeq ($$(art_ndebug_or_debug),debug)
       LOCAL_CFLAGS += $(ART_HOST_DEBUG_CFLAGS)
     endif
   endif
-  LOCAL_C_INCLUDES += $(ART_C_INCLUDES)
-  LOCAL_SHARED_LIBRARIES := libnativehelper
-  ifeq ($(4),ndebug)
+
+  ifeq ($$(art_ndebug_or_debug),ndebug)
     LOCAL_SHARED_LIBRARIES += libart
-  else
+  else # debug
     LOCAL_SHARED_LIBRARIES += libartd
   endif
-  ifeq ($(3),target)
+
+  ifeq ($$(art_target_or_host),target)
     LOCAL_SHARED_LIBRARIES += libstlport
   endif
-  ifeq ($(3),target)
+
+  ifeq ($$(art_target_or_host),target)
     include $(BUILD_EXECUTABLE)
-  else
+    ART_TARGET_EXECUTABLES := $(ART_TARGET_EXECUTABLES) $(TARGET_OUT_EXECUTABLES)/$$(LOCAL_MODULE)
+  else # host
     include $(BUILD_HOST_EXECUTABLE)
+    ART_HOST_EXECUTABLES := $(ART_HOST_EXECUTABLES) $(HOST_OUT_EXECUTABLES)/$$(LOCAL_MODULE)
   endif
-  ifeq ($(1),target)
-    ART_TARGET_EXECUTABLES += $(TARGET_OUT_EXECUTABLES)/$$(LOCAL_MODULE)
-  else
-    ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$$(LOCAL_MODULE)
-  endif
+
 endef
 
 ifeq ($(ART_BUILD_TARGET_NDEBUG),true)