euphoria

changeset 5636:ef7177a7071e alternative_literals

* 44 more unit test files now passing that were not passing before
* ticket 657
author Shawn Pringle <shawn.pringle@gmail.com>
date Thu Aug 30 23:12:56 2012 -0300 (8 months ago)
parents 67b7ab73fcfc
children 2dab070bc00a
files source/backend.e source/be_machine.c source/be_runtime.c
line diff
     1.1 --- a/source/backend.e	Wed Aug 29 00:05:37 2012 -0300
     1.2 +++ b/source/backend.e	Thu Aug 30 23:12:56 2012 -0300
     1.3 @@ -12,9 +12,8 @@
     1.4  
     1.5  include std/dll.e
     1.6  include std/machine.e
     1.7 --- test to see if we need either of these.
     1.8 ---include std/text.e
     1.9 ---include std/map.e
    1.10 +include std/text.e
    1.11 +include std/map.e
    1.12  include global.e
    1.13  include common.e
    1.14  include mode.e as mode
     2.1 --- a/source/be_machine.c	Wed Aug 29 00:05:37 2012 -0300
     2.2 +++ b/source/be_machine.c	Thu Aug 30 23:12:56 2012 -0300
     2.3 @@ -2827,11 +2827,15 @@
     2.4  	syncolor          = get_pos_int(w, *(x_ptr->base+11));
     2.5  	
     2.6  	set_debugger( (char*) get_pos_int(w, *(x_ptr->base+12)) );
     2.7 -	sprint_ptr        = get_pos_int(w, *(x_ptr->base+17));
     2.8 -
     2.9 -	map_new = get_pos_int(w, *(x_ptr->base+13));
    2.10 -	map_put = get_pos_int(w, *(x_ptr->base+14));
    2.11 -	map_get = get_pos_int(w, *(x_ptr->base+15));
    2.12 +	;
    2.13 +
    2.14 +	if (
    2.15 +		((sprint_ptr        = get_pos_int(w, *(x_ptr->base+17))) == 0) ||
    2.16 +		((map_new = get_pos_int(w, *(x_ptr->base+13))) == 0) ||
    2.17 +		((map_put = get_pos_int(w, *(x_ptr->base+14))) == 0) ||
    2.18 +		((map_get = get_pos_int(w, *(x_ptr->base+15))) == 0) ) {
    2.19 +		RTInternal("BACKEND requires the routine ids args passed arg 13,14,15 & 17 be non-zero.");
    2.20 +	}
    2.21  	
    2.22  	trace_lines = get_pos_int(w, *(x_ptr->base+16));
    2.23  	// This is checked when we try to write coverage to make sure
     3.1 --- a/source/be_runtime.c	Wed Aug 29 00:05:37 2012 -0300
     3.2 +++ b/source/be_runtime.c	Thu Aug 30 23:12:56 2012 -0300
     3.3 @@ -4904,27 +4904,35 @@
     3.4  /* Convert command line string to argc, argv.
     3.5     If *argc is 1, then get program name from GetModuleFileName().
     3.6     When double-clicked under Windows, cmdline will
     3.7 -   typically contain double-quoted strings. */
     3.8 +   typically contain double-quoted strings. 
     3.9 +   
    3.10 +   The returned pointer should be later freed with EFree but the strings in the array should 
    3.11 +   not be freed.
    3.12 +   */
    3.13  {
    3.14  	int i, w, j;
    3.15  	char **argv;
    3.16  #ifdef EWINDOWS
    3.17 +	static char * first_argument;
    3.18  	int ns;
    3.19  	int bs;
    3.20  #endif
    3.21  	InitEMalloc();
    3.22  #ifdef EWINDOWS
    3.23 +	if (first_argument == NULL) {
    3.24 +		first_argument = get_module_name();
    3.25 +	}
    3.26  	if( cmdline == NULL ){
    3.27  		// Windows already did the work for us
    3.28  		*argc = __argc;
    3.29 -		__argv[0] = get_module_name();
    3.30 +		__argv[0] = first_argument;
    3.31  		return __argv;
    3.32  	}
    3.33  #endif
    3.34  	argv = (char **)EMalloc((strlen(cmdline)/2+3) * sizeof(char *));
    3.35  #ifdef EWINDOWS
    3.36  	if (*argc == 1) {
    3.37 -		argv[0] = get_module_name();
    3.38 +		argv[0] = first_argument;
    3.39  		w = 1;
    3.40  	}
    3.41  	else
    3.42 @@ -5067,13 +5075,7 @@
    3.43  #else
    3.44  	argv = make_arg_cv(string_ptr, &exit_code);
    3.45  	exit_code = spawnvp(P_WAIT, argv[0], (char * const *)argv);
    3.46 -
    3.47 -	#if INTPTR_MAX == INT32_MAX
    3.48 -	// This causes a crash on Win64
    3.49 -	EFree(argv[0]);		// free the 'process' name
    3.50 -	#endif
    3.51  	EFree((char *)argv); // free the list of arg addresses, but not the args themself.
    3.52 -
    3.53  #endif
    3.54  	if (len > TEMP_SIZE)
    3.55  		EFree(string_ptr);

SCM Home | OpenEuphoria.org Home