> > > I've moved HB_FUNC_EXEC() to the top of the function, > > but MSVC is smart enough to optimize it out. > > I was afraid that it may happen. > > > There is '__declspec( noinline )' maybe we should have > > a HB_FUNC_ANNOUNCE() or similar way to declare such function, > > having this modifier. What do you think? > > It still may not be enough.
Yes, it wasn't. (or I'm doing some basic mistake) > It's possible that MSVC divides the module gtsys.o into peaces > and inline only pure HB_GTSYS function ignoring the HB_GT_REQUEST() > part. Just try and tell us if it helps but not commit it yet. > It's not portable solution and does not have to work in all cases. > In the worst case we will have to store explicitly function references > in some table and it's possible that we will have to use real functions > because some compilers may merge all functions with the same body > (empty in our case) into single one. > Maybe MSVC has a switch to control used module/bindings stripping. > It also may resolve the problem. http://msdn.microsoft.com/en-us/library/xsa71f43.aspx /Gy (Enable Function-Level Linking) is the closest thing I could find, but it's disabled by default, and even force disabling it didn't help. The problem is I cannot visually confirm the effect of these changes, since there is no .obj file. Maybe we need to make these modules registered on init like we do with some other things. Brgds, Viktor
_______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
