Re: Precompiled include files

new topic     » goto parent     » topic index » view thread      » older message » newer message

That's interesting, and it doesn't seem to match my recent experiment. I created these two files and ran "euc -nobuild" on them to examine the .c files.

-- convert1.ex 
include std/console.e 
include std/convert.e 
 
object cmd 
 
cmd = command_line() 
 
if length(cmd) < 3 then 
	display("[] requires at least 1 argument", {cmd[2]}) 
	abort(1) 
end if 
 
display(to_string(cmd[3])) 
-- convert2.ex 
include std/console.e 
include std/convert.e 
 
object cmd 
 
cmd = command_line() 
 
if length(cmd) < 3 then 
	display("[] requires at least 1 argument", {cmd[2]}) 
	abort(1) 
end if 
 
display(to_number(cmd[3])) 

convert.c was identical in both cases, and seemed to contain all of the exported functions of convert.e, as were all of the .c files created from other std/*.e files. I don't see any stripping or optimization being performed on these files.

I may be misunderstanding, but doesn't the translator treat files on its command line differently from files "included" within another file? I'm only guessing that from experiments not from actually studying the code.

Admittedly I'm testing with 4.05 on Windows right now. Maybe my example is too small or it's different on 4.1.0 -- I'll have to test it later.

Edit: Nevermind. I just did another experiment and I see that it creates a much different file.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu