For avmshell, use direct thunks by default in DEBUGGER builds (bug 534279 r=stejohns+)
authorEdwin Smith <edwsmith@adobe.com>
Thu, 14 Jan 2010 15:03:12 -0500
changeset 3525 2bd0fde420aa90a2287be278830e92d2d0e6938c
parent 3524 fb976dc5c812afe5be1599781d6004af2f339bbb
child 3526 aeda198486633803d7bd924dc7f8c4d3c102f493
child 3527 0038e7d8dbcbfc69878dfe9ec6c4818ccc5ed73d
push id1961
push useredwsmith@adobe.com
push dateThu, 14 Jan 2010 20:13:06 +0000
reviewersstejohns
bugs534279
For avmshell, use direct thunks by default in DEBUGGER builds (bug 534279 r=stejohns+) If an explicit AVMFEATURE_INDIRECT_NATIVE_THUNKS setting is not passed in via configure.py, then we use direct thunks in DEBUGGER builds and indirect in release builds. This way both configurations get tested. The code size increase for direct thunks is acceptable in debugger builds.
shell/avmshell-features.h
--- a/shell/avmshell-features.h
+++ b/shell/avmshell-features.h
@@ -146,17 +146,22 @@
   #define AVMFEATURE_HEAP_ALLOCA       0
 #endif
 
 #ifndef AVMFEATURE_STATIC_FUNCTION_PTRS
   #define AVMFEATURE_STATIC_FUNCTION_PTRS 1
 #endif
 
 #ifndef AVMFEATURE_INDIRECT_NATIVE_THUNKS
-  #define AVMFEATURE_INDIRECT_NATIVE_THUNKS 1
+  // if not specified, default to direct thunks in DEBUGGER builds
+  #if AVMFEATURE_DEBUGGER
+    #define AVMFEATURE_INDIRECT_NATIVE_THUNKS 0
+  #else
+    #define AVMFEATURE_INDIRECT_NATIVE_THUNKS 1
+  #endif
 #endif
 
 #if !defined(_DEBUG) && !defined(DEBUG)
 	// by default, nanojit enables NJ_VERBOSE mode when AVMPLUS_VERBOSE is on,
 	// which is enabled for Debug *and* Debugger builds. 
 	#define NJ_VERBOSE_DISABLED 1
 	#define NJ_PROFILE_DISABLED 1
 #endif