;
6 | close OUT;
7 | chmod 0755, "threaded.fpl";
8 | __END__
9 |
10 | use FCGI;
11 | use Thread;
12 | use IO::Handle;
13 |
14 | use constant THREAD_COUNT => 5;
15 |
16 | sub doit {
17 | my $k = shift;
18 | my %env;
19 | my $in = new IO::Handle;
20 | my $out = new IO::Handle;
21 | my $err = new IO::Handle;
22 |
23 | my $request = FCGI::Request($in, $out, $err, \%env);
24 |
25 | while ($request->Accept() >= 0) {
26 | print $out
27 | "Content-type: text/html\r\n",
28 | "\r\n",
29 | "FastCGI Hello! (multi-threaded perl, fcgiapp library) ",
30 | "FastCGI Hello! (multi-threaded perl, fcgiapp library) ",
31 | "Request counts for ", THREAD_COUNT ," threads ",
32 | "running on host $env{SERVER_NAME} ";
33 |
34 | {
35 | lock(@count);
36 |
37 | ++$count[$k];
38 |
39 | for(my $i = 0; $i < THREAD_COUNT; ++$i) {
40 | print $out $count[$i];
41 | print $out " ";
42 | }
43 | }
44 | $request->Flush();
45 | sleep(1);
46 | }
47 | }
48 |
49 | for ($t = 1; $t < THREAD_COUNT; ++$t) {
50 | new Thread \&doit, $t;
51 | }
52 | doit(0);
53 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/examples/Makefile.am:
--------------------------------------------------------------------------------
1 | # $Id: Makefile.am,v 1.8 2001/12/22 03:16:21 robs Exp $
2 |
3 | noinst_PROGRAMS = authorizer \
4 | echo \
5 | echo-x \
6 | log-dump \
7 | size \
8 | @THREADED@ \
9 | @ECHO_CPP@
10 |
11 | EXTRA_PROGRAMS = threaded echo-cpp
12 |
13 | INCLUDEDIR = ../include
14 | CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include
15 |
16 | INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \
17 | $(INCLUDEDIR)/fcgiapp.h \
18 | $(INCLUDEDIR)/fcgimisc.h \
19 | $(INCLUDEDIR)/fcgi_stdio.h
20 |
21 | LIBDIR = ../libfcgi
22 | LIBFCGI = $(LIBDIR)/libfcgi.la
23 |
24 | LDADD = $(LIBFCGI)
25 |
26 | echo_SOURCES = $(INCLUDE_FILES) echo.c
27 | echo_x_SOURCES = $(INCLUDE_FILES) echo-x.c
28 | log_dump_SOURCES = $(INCLUDE_FILES) log-dump.c
29 | authorizer_SOURCES = $(INCLUDE_FILES) authorizer.c
30 |
31 | threaded_SOURCES = $(INCLUDE_FILES) threaded.c
32 | threaded_CC = @PTHREAD_CC@
33 | threaded_CFLAGS = @PTHREAD_CFLAGS@
34 | threaded_LDFLAGS = @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
35 |
36 | echo_cpp_SOURCES = $(INCLUDE_FILES) $(INCLUDEDIR)/fcgio.h echo-cpp.cpp
37 | echo_cpp_LDADD = $(LIBDIR)/libfcgi++.la
38 |
39 |
--------------------------------------------------------------------------------
/source/os-binder-FunctionImpVoid.tpl:
--------------------------------------------------------------------------------
1 | template
2 | struct OS_BIND_FUNC_RUN_CLASS_NAME
3 | {
4 | typedef R(OS_BIND_FUNC_CC *F)() OS_BIND_FUNC_CC_GNUC;
5 |
6 | static int run(OS * os, int params, int, int, void * user_param)
7 | {
8 | OS_BIND_FUNC_GET_ARGS;
9 | typedef typename RemoveConst::type type;
10 | F& f = *(F*)user_param;
11 | CtypeValue::push(os, (*f)());
12 | return 1;
13 | }
14 | };
15 |
16 | template <>
17 | struct OS_BIND_FUNC_RUN_CLASS_NAME
18 | {
19 | typedef void(OS_BIND_FUNC_CC *F)() OS_BIND_FUNC_CC_GNUC;
20 |
21 | static int run(OS * os, int params, int, int, void * user_param)
22 | {
23 | OS_BIND_FUNC_GET_ARGS;
24 | F& f = *(F*)user_param;
25 | (*f)();
26 | return 0;
27 | }
28 | };
29 |
30 | template
31 | struct OS_BIND_FUNC_CLASS_NAME
32 | {
33 | typedef R(OS_BIND_FUNC_CC *F)() OS_BIND_FUNC_CC_GNUC;
34 |
35 | const char * name;
36 | F f;
37 |
38 | OS_BIND_FUNC_CLASS_NAME(const char * _name, F _f): name(_name), f(_f){}
39 |
40 | operator OS::FuncDef() const
41 | {
42 | OS::FuncDef def = {name,
43 | OS_BIND_FUNC_RUN_CLASS_NAME::run,
44 | &(new FunctionData(f))->f};
45 | return def;
46 | }
47 | };
48 |
49 | // namespace ObjectScript {
50 |
51 | template
52 | OS::FuncDef def(const char * name, R(OS_BIND_FUNC_CC *f)() OS_BIND_FUNC_CC_GNUC)
53 | {
54 | typedef OS_BIND_FUNC_CLASS_NAME Func;
55 | return Func(name, f);
56 | }
57 |
58 | // } // namespace ObjectScript
59 |
--------------------------------------------------------------------------------
/proj.win32/add_user_module/add_user_module.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "../../source/objectscript.h"
3 |
4 | using namespace ObjectScript;
5 |
6 | #include
7 |
8 | static int my_isdigit(OS * os, int params, int, int, void*)
9 | {
10 | OS::String str = os->toString(-params);
11 | int len = str.getLen();
12 | for(int i = 0; i < len; i++){
13 | if(!isdigit(str[i])){
14 | os->pushBool(false);
15 | return 1;
16 | }
17 | }
18 | os->pushBool(len > 0);
19 | return 1;
20 | }
21 |
22 | static int my_hash(OS * os, int params, int, int, void*)
23 | {
24 | OS::String str = os->toString(-params);
25 | int i, len = str.getLen(), hash = 5381;
26 | for(i = 0; i < len; i++){
27 | hash = ((hash << 5) + hash) + str[i];
28 | }
29 | hash &= 0x7fffffff;
30 | char buf[16];
31 | for(i = 0; hash > 0; hash >>= 4){
32 | buf[i++] = "0123456789abcdef"[hash & 0xf];
33 | }
34 | buf[i] = 0;
35 | os->pushString(buf);
36 | return 1;
37 | }
38 |
39 | void initMyModule(OS * os)
40 | {
41 | OS::FuncDef funcs[] = {
42 | {"isdigit", my_isdigit},
43 | {"hash", my_hash},
44 | {}
45 | };
46 | os->getModule("my");
47 | os->setFuncs(funcs);
48 | os->pop();
49 | }
50 |
51 | int _tmain(int argc, _TCHAR* argv[])
52 | {
53 | // craete ObjectScript instance
54 | OS * os = OS::create();
55 |
56 | // init ctype module
57 | initMyModule(os);
58 |
59 | // run program
60 | os->require("../../examples-os/add_user_module.os");
61 |
62 | // release the ObjectScript instance
63 | os->release();
64 | return 0;
65 | }
66 |
67 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/scripts/test_fannkuch.os:
--------------------------------------------------------------------------------
1 | print arg
2 | var fannkuch = function(n)
3 | {
4 | var p, q, s, sign, maxflips, sum = [], [], [], 1, 0, 0
5 | var i
6 | for(i=1; i<=n; i++) p[i], q[i], s[i] = i, i, i
7 | for(;;){
8 | // Copy and flip.
9 | var q1 = p[1] // Cache 1st element.
10 | if(q1 != 1){
11 | for(i=2; i<=n; i++) q[i] = p[i] // Work on a copy.
12 | var flips = 1
13 | for(;;){
14 | var qq = q[q1]
15 | if(qq == 1){ // ... until 1st element is 1.
16 | sum = sum + sign*flips
17 | if(flips > maxflips){
18 | maxflips = flips
19 | } // New maximum?
20 | break
21 | }
22 | q[q1] = q1
23 | if(q1 >= 4){
24 | var i, j = 2, q1 - 1
25 | for(;;){ q[i], q[j] = q[j], q[i]; if(++i >= --j) break }
26 | }
27 | q1 = qq; flips++
28 | }
29 | }
30 | // Permute.
31 | if(sign == 1){
32 | p[2], p[1] = p[1], p[2] sign = -1 // Rotate 1<-2.
33 | }else{
34 | p[2], p[3] = p[3], p[2] sign = 1 // Rotate 1<-2 and 1<-2<-3.
35 | for(i = 3;; i++){
36 | // print "mark 4"
37 | var sx = s[i]
38 | if(sx != 1){ s[i] = sx-1 break }
39 | if(i == n) return sum, maxflips; // Out of permutations.
40 | s[i] = i
41 | // Rotate 1<-...<-i+1.
42 | var t = p[1] for(var j = 1; j <= i; j++){ p[j] = p[j+1] } p[i+1] = t
43 | }
44 | }
45 | }
46 | }
47 | var n = numberOf(arg && arg[1]) || 5
48 | var start_time = getTimeSec()
49 | var sum, flips = fannkuch(n)
50 | echo(
51 | sum"\n"
52 | "Pfannkuchen("n") = "flips"\n"
53 | )
54 | printf("time: %.3f\n", getTimeSec() - start_time)
55 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/doc/FCGI_Finish.3:
--------------------------------------------------------------------------------
1 | NAME
2 | FCGI_Finish
3 | - fcgi_stdio compatibility library
4 |
5 | SYNOPSIS
6 | #include "fcgi_stdio.h"
7 |
8 | void
9 | FCGI_Finish(void);
10 |
11 |
12 | DESCRIPTION
13 | The FCGI_Finish function finishes the current request from the
14 | HTTP server. The current request was started by the most recent
15 | call to FCGI_Accept(3).
16 |
17 | FCGI_Finish allows an application to interleave other activities
18 | with the processing of requests. In an extreme case, an
19 | application would call FCGI_Finish to complete the current
20 | request before exiting, e.g. to reclaim leaked storage.
21 |
22 | In completing the current request, FCGI_Finish may detect
23 | errors, e.g. a broken pipe to a client who has disconnected
24 | early. FCGI_Finish ignores such errors. An application
25 | that wishes to handle such errors should explicitly call
26 | fclose(stderr), then fclose(stdout); an EOF return from
27 | either one indicates an error.
28 |
29 | FCGI_Finish frees any storage allocated by the most recent call
30 | to FCGI_Accept. See FCGI_Accept(3) for warnings against retaining
31 | pointers to this storage.
32 |
33 |
34 | SEE ALSO
35 | FCGI_Accept(3)
36 |
37 | HISTORY
38 | Copyright (c) 1996 Open Market, Inc.
39 | See the file "LICENSE.TERMS" for information on usage and redistribution
40 | of this file, and for a DISCLAIMER OF ALL WARRANTIES.
41 | $Id: FCGI_Finish.3,v 1.1.1.1 1997/09/16 15:36:25 stanleyg Exp $
42 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/scripts/test_fannkuch.lua:
--------------------------------------------------------------------------------
1 | local function fannkuch(n)
2 | local p, q, s, sign, maxflips, sum = {}, {}, {}, 1, 0, 0
3 | for i=1,n do p[i] = i; q[i] = i; s[i] = i end
4 | repeat
5 | -- Copy and flip.
6 | local q1 = p[1] -- Cache 1st element.
7 | if q1 ~= 1 then
8 | for i=2,n do q[i] = p[i] end -- Work on a copy.
9 | local flips = 1
10 | repeat
11 | local qq = q[q1]
12 | if qq == 1 then -- ... until 1st element is 1.
13 | sum = sum + sign*flips
14 | if flips > maxflips then
15 | maxflips = flips
16 | end -- New maximum?
17 | break
18 | end
19 | q[q1] = q1
20 | if q1 >= 4 then
21 | local i, j = 2, q1 - 1
22 | repeat q[i], q[j] = q[j], q[i]; i = i + 1; j = j - 1; until i >= j
23 | end
24 | q1 = qq; flips = flips + 1
25 | until false
26 | end
27 | -- Permute.
28 | if sign == 1 then
29 | p[2], p[1] = p[1], p[2]; sign = -1 -- Rotate 1<-2.
30 | else
31 | p[2], p[3] = p[3], p[2]; sign = 1 -- Rotate 1<-2 and 1<-2<-3.
32 | for i=3,n do
33 | local sx = s[i]
34 | if sx ~= 1 then s[i] = sx-1; break end
35 | if i == n then return sum, maxflips end -- Out of permutations.
36 | s[i] = i
37 | -- Rotate 1<-...<-i+1.
38 | local t = p[1]; for j=1,i do p[j] = p[j+1] end; p[i+1] = t
39 | end
40 | end
41 | until false
42 | end
43 | local start_time = os.clock()
44 | local n = tonumber(arg and arg[1]) or 5
45 | local sum, flips = fannkuch(n)
46 | io.write(sum, "\nPfannkuchen(", n, ") = ", flips, "\n")
47 | print(string.format("elapsed time: %.3f\n", os.clock() - start_time))
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/Makefile.nt:
--------------------------------------------------------------------------------
1 | #
2 | # Windows Makefile for FastCGI development kit
3 | #
4 | # $Id: Makefile.nt,v 1.4 2001/11/27 14:02:54 robs Exp $
5 | #
6 |
7 | !IF "$(CFG)" == ""
8 | CFG=release
9 | !ENDIF
10 |
11 | all: "include\fcgi_config.h"
12 | cd ".\libfcgi"
13 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F libfcgi.mak CFG=$(CFG) $@
14 |
15 | cd ".\..\cgi-fcgi"
16 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F cgi-fcgi.mak CFG=$(CFG) $@
17 |
18 | cd ".\..\examples"
19 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F authorizer.mak CFG=$(CFG) $@
20 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F echo.mak CFG=$(CFG) $@
21 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F echox.mak CFG=$(CFG) $@
22 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F size.mak CFG=$(CFG) $@
23 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F echo-cpp.mak CFG=$(CFG) $@
24 |
25 | cd ".\.."
26 |
27 | "include\fcgi_config.h": "include\fcgi_config_x86.h"
28 | copy "include\fcgi_config_x86.h" "include\fcgi_config.h"
29 |
30 | clean:
31 | cd ".\libfcgi"
32 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F libfcgi.mak CFG=$(CFG) $@
33 |
34 | cd ".\..\cgi-fcgi"
35 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F cgi-fcgi.mak CFG=$(CFG) $@
36 |
37 | cd ".\..\examples"
38 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F authorizer.mak CFG=$(CFG) $@
39 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F echo.mak CFG=$(CFG) $@
40 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F echox.mak CFG=$(CFG) $@
41 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F size.mak CFG=$(CFG) $@
42 | $(MAKE) $(MAKEFLAGS) /NOLOGO /F echo-cpp.mak CFG=$(CFG) $@
43 |
44 | cd ".\.."
45 |
46 | install:
47 | @echo "Sorry, the install target hasn't been written yet"
48 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-01.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","..\\os\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 11.4548
5 | OS script full time: 11.458504 secs
6 | gc time: 0.000158 secs (0.00%)
7 |
8 | === OP_PUSH_LOCAL_VAR, executed count: 62375073
9 | sum time: 2.239688 secs (19.55%), avg time of 100000 times: 0.003591
10 |
11 | === OP_GET_PROPERTY, executed count: 10447681
12 | sum time: 0.969562 secs (8.46%), avg time of 100000 times: 0.009280
13 |
14 | === OP_SET_PROPERTY, executed count: 9762268
15 | sum time: 0.751460 secs (6.56%), avg time of 100000 times: 0.007698
16 |
17 | === OP_PUSH_NUMBER, executed count: 19204429
18 | sum time: 0.751260 secs (6.56%), avg time of 100000 times: 0.003912
19 |
20 | === OP_SET_LOCAL_VAR, executed count: 18417396
21 | sum time: 0.728733 secs (6.36%), avg time of 100000 times: 0.003957
22 |
23 | === OP_IF_NOT_JUMP, executed count: 10264805
24 | sum time: 0.541405 secs (4.72%), avg time of 100000 times: 0.005274
25 |
26 | === OP_ADD, executed count: 7304969
27 | sum time: 0.443486 secs (3.87%), avg time of 100000 times: 0.006071
28 |
29 | === OP_PUSH_LOCAL_VAR_AUTO_CREATE, executed count: 9762263
30 | sum time: 0.392546 secs (3.43%), avg time of 100000 times: 0.004021
31 |
32 | === OP_JUMP, executed count: 8092648
33 | sum time: 0.338749 secs (2.96%), avg time of 100000 times: 0.004186
34 |
35 | === OP_LOGIC_GE, executed count: 3722222
36 | sum time: 0.299431 secs (2.61%), avg time of 100000 times: 0.008044
37 |
38 | === ALL OPCODES, executed count: 174676059
39 | sum time: 8.436125 secs (73.62%), avg time of 100000 times: 0.004830
40 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-01-#2.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","..\\os\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 10.8498
5 | OS script full time: 10.854386 secs
6 | gc time: 0.000163 secs (0.00%)
7 |
8 | === OP_PUSH_LOCAL_VAR, executed count: 62375073
9 | sum time: 2.125549 secs (19.58%), avg time of 100000 times: 0.003408
10 |
11 | === OP_GET_PROPERTY, executed count: 10447681
12 | sum time: 0.910001 secs (8.38%), avg time of 100000 times: 0.008710
13 |
14 | === OP_SET_PROPERTY, executed count: 9762268
15 | sum time: 0.741314 secs (6.83%), avg time of 100000 times: 0.007594
16 |
17 | === OP_PUSH_NUMBER, executed count: 19204429
18 | sum time: 0.732381 secs (6.75%), avg time of 100000 times: 0.003814
19 |
20 | === OP_SET_LOCAL_VAR, executed count: 18417396
21 | sum time: 0.694387 secs (6.40%), avg time of 100000 times: 0.003770
22 |
23 | === OP_IF_NOT_JUMP, executed count: 10264805
24 | sum time: 0.514346 secs (4.74%), avg time of 100000 times: 0.005011
25 |
26 | === OP_ADD, executed count: 7304969
27 | sum time: 0.426983 secs (3.93%), avg time of 100000 times: 0.005845
28 |
29 | === OP_PUSH_LOCAL_VAR_AUTO_CREATE, executed count: 9762263
30 | sum time: 0.369102 secs (3.40%), avg time of 100000 times: 0.003781
31 |
32 | === OP_JUMP, executed count: 8092648
33 | sum time: 0.343653 secs (3.17%), avg time of 100000 times: 0.004246
34 |
35 | === OP_LOGIC_GE, executed count: 3722222
36 | sum time: 0.239639 secs (2.21%), avg time of 100000 times: 0.006438
37 |
38 | === ALL OPCODES, executed count: 174676059
39 | sum time: 7.927303 secs (73.03%), avg time of 100000 times: 0.004538
40 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/Win32/Debug/config_h.Build.CppClean.log:
--------------------------------------------------------------------------------
1 | .\Debug\config_h.pdb
2 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\INCLUDE\FCGI_CONFIG.H
3 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\.\Debug\config_h.exe.intermediate.manifest
4 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\config_h.exe.embed.manifest
5 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\WIN32\DEBUG\CONFIG_H.EXE.EMBED.MANIFEST.RES
6 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\config_h.exe.intermediate.manifest
7 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\config_h.pdb
8 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\config_h.write.1.tlog
9 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\config_h_manifest.rc
10 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\custombuild.command.1.tlog
11 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\custombuild.read.1.tlog
12 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\custombuild.write.1.tlog
13 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\link.command.1.tlog
14 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\link.read.1.tlog
15 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\link.write.1.tlog
16 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\link-cvtres.read.1.tlog
17 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\link-cvtres.write.1.tlog
18 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\rc.command.1.tlog
19 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\rc.read.1.tlog
20 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\Debug\rc.write.1.tlog
21 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-02.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","..\\os\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 6.03181
5 | OS script full time: 6.039006 secs
6 | gc time: 0.000211 secs (0.00%)
7 |
8 | === SET_LOCAL_VAR_BY_BIN_OPERATOR_LOCAL_AND_NUMBER, executed count: 8775837
9 | sum time: 0.651009 secs (10.78%), avg time of 100000 times: 0.007418
10 |
11 | === GET_PROPERTY_BY_LOCALS, executed count: 6438708
12 | sum time: 0.504499 secs (8.35%), avg time of 100000 times: 0.007835
13 |
14 | === SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 6376814
15 | sum time: 0.485739 secs (8.04%), avg time of 100000 times: 0.007617
16 |
17 | === PUSH_LOCAL_VAR, executed count: 11364021
18 | sum time: 0.414165 secs (6.86%), avg time of 100000 times: 0.003645
19 |
20 | === BIN_OPERATOR_BY_LOCAL_AND_NUMBER, executed count: 6137238
21 | sum time: 0.393591 secs (6.52%), avg time of 100000 times: 0.006413
22 |
23 | === SET_LOCAL_VAR, executed count: 9641559
24 | sum time: 0.368994 secs (6.11%), avg time of 100000 times: 0.003827
25 |
26 | === GET_SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 2580480
27 | sum time: 0.322693 secs (5.34%), avg time of 100000 times: 0.012505
28 |
29 | === JUMP, executed count: 8092648
30 | sum time: 0.289518 secs (4.79%), avg time of 100000 times: 0.003578
31 |
32 | === IF_NOT_JUMP, executed count: 7021906
33 | sum time: 0.278744 secs (4.62%), avg time of 100000 times: 0.003970
34 |
35 | === BIN_OPERATOR_BY_LOCALS, executed count: 3967229
36 | sum time: 0.232164 secs (3.84%), avg time of 100000 times: 0.005852
37 |
38 | === ALL OPCODES, executed count: 84027573
39 | sum time: 4.642974 secs (76.88%), avg time of 100000 times: 0.005526
40 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-03.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","..\\os\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 5.37821
5 | OS script full time: 5.381767 secs
6 | gc time: 0.000145 secs (0.00%)
7 |
8 | === SET_LOCAL_VAR_BY_BIN_OPERATOR_LOCAL_AND_NUMBER, executed count: 8775837
9 | sum time: 0.554672 secs (10.31%), avg time of 100000 times: 0.006320
10 |
11 | === PUSH_LOCAL_VAR, executed count: 11364021
12 | sum time: 0.405737 secs (7.54%), avg time of 100000 times: 0.003570
13 |
14 | === SET_LOCAL_VAR, executed count: 9641559
15 | sum time: 0.354617 secs (6.59%), avg time of 100000 times: 0.003678
16 |
17 | === SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 6376814
18 | sum time: 0.354258 secs (6.58%), avg time of 100000 times: 0.005555
19 |
20 | === BIN_OPERATOR_BY_LOCAL_AND_NUMBER, executed count: 6137238
21 | sum time: 0.343731 secs (6.39%), avg time of 100000 times: 0.005601
22 |
23 | === GET_PROPERTY_BY_LOCALS, executed count: 6438708
24 | sum time: 0.308514 secs (5.73%), avg time of 100000 times: 0.004792
25 |
26 | === JUMP, executed count: 8092648
27 | sum time: 0.288039 secs (5.35%), avg time of 100000 times: 0.003559
28 |
29 | === IF_NOT_JUMP, executed count: 7021906
30 | sum time: 0.277993 secs (5.17%), avg time of 100000 times: 0.003959
31 |
32 | === GET_SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 2580480
33 | sum time: 0.228558 secs (4.25%), avg time of 100000 times: 0.008857
34 |
35 | === BIN_OPERATOR_BY_LOCALS, executed count: 3967229
36 | sum time: 0.187570 secs (3.49%), avg time of 100000 times: 0.004728
37 |
38 | === ALL OPCODES, executed count: 84027573
39 | sum time: 3.951299 secs (73.42%), avg time of 100000 times: 0.004702
40 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-02-#2.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","..\\os\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 5.78307
5 | OS script full time: 5.787197 secs
6 | gc time: 0.000168 secs (0.00%)
7 |
8 | === GET_PROPERTY_BY_LOCALS, executed count: 6438708
9 | sum time: 0.581977 secs (10.06%), avg time of 100000 times: 0.009039
10 |
11 | === SET_LOCAL_VAR_BY_BIN_OPERATOR_LOCAL_AND_NUMBER, executed count: 8775837
12 | sum time: 0.522102 secs (9.02%), avg time of 100000 times: 0.005949
13 |
14 | === SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 6376814
15 | sum time: 0.444316 secs (7.68%), avg time of 100000 times: 0.006968
16 |
17 | === PUSH_LOCAL_VAR, executed count: 11364021
18 | sum time: 0.407568 secs (7.04%), avg time of 100000 times: 0.003586
19 |
20 | === SET_LOCAL_VAR, executed count: 9641559
21 | sum time: 0.346924 secs (5.99%), avg time of 100000 times: 0.003598
22 |
23 | === BIN_OPERATOR_BY_LOCAL_AND_NUMBER, executed count: 6137238
24 | sum time: 0.334978 secs (5.79%), avg time of 100000 times: 0.005458
25 |
26 | === GET_SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 2580480
27 | sum time: 0.314002 secs (5.43%), avg time of 100000 times: 0.012168
28 |
29 | === JUMP, executed count: 8092648
30 | sum time: 0.289677 secs (5.01%), avg time of 100000 times: 0.003580
31 |
32 | === IF_NOT_JUMP, executed count: 7021906
33 | sum time: 0.271012 secs (4.68%), avg time of 100000 times: 0.003860
34 |
35 | === BIN_OPERATOR_BY_LOCALS, executed count: 3967229
36 | sum time: 0.180190 secs (3.11%), avg time of 100000 times: 0.004542
37 |
38 | === ALL OPCODES, executed count: 84027573
39 | sum time: 4.394119 secs (75.93%), avg time of 100000 times: 0.005229
40 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-03-#2.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","..\\os\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 5.23708
5 | OS script full time: 5.240714 secs
6 | gc time: 0.000146 secs (0.00%)
7 |
8 | === SET_LOCAL_VAR_BY_BIN_OPERATOR_LOCAL_AND_NUMBER, executed count: 8775837
9 | sum time: 0.492124 secs (9.39%), avg time of 100000 times: 0.005608
10 |
11 | === PUSH_LOCAL_VAR, executed count: 11364021
12 | sum time: 0.414626 secs (7.91%), avg time of 100000 times: 0.003649
13 |
14 | === SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 6376814
15 | sum time: 0.362978 secs (6.93%), avg time of 100000 times: 0.005692
16 |
17 | === SET_LOCAL_VAR, executed count: 9641559
18 | sum time: 0.355257 secs (6.78%), avg time of 100000 times: 0.003685
19 |
20 | === BIN_OPERATOR_BY_LOCAL_AND_NUMBER, executed count: 6137238
21 | sum time: 0.313828 secs (5.99%), avg time of 100000 times: 0.005114
22 |
23 | === GET_PROPERTY_BY_LOCALS, executed count: 6438708
24 | sum time: 0.297487 secs (5.68%), avg time of 100000 times: 0.004620
25 |
26 | === JUMP, executed count: 8092648
27 | sum time: 0.289448 secs (5.52%), avg time of 100000 times: 0.003577
28 |
29 | === IF_NOT_JUMP, executed count: 7021906
30 | sum time: 0.275139 secs (5.25%), avg time of 100000 times: 0.003918
31 |
32 | === GET_SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 2580480
33 | sum time: 0.229835 secs (4.39%), avg time of 100000 times: 0.008907
34 |
35 | === BIN_OPERATOR_BY_LOCALS, executed count: 3967229
36 | sum time: 0.188030 secs (3.59%), avg time of 100000 times: 0.004740
37 |
38 | === ALL OPCODES, executed count: 84027573
39 | sum time: 3.854397 secs (73.55%), avg time of 100000 times: 0.004587
40 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-03-#3.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","..\\os\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 5.05268
5 | OS script full time: 5.057212 secs
6 | gc time: 0.000193 secs (0.00%)
7 |
8 | === SET_LOCAL_VAR_BY_BIN_OPERATOR_LOCAL_AND_NUMBER, executed count: 8775837
9 | sum time: 0.529332 secs (10.47%), avg time of 100000 times: 0.006032
10 |
11 | === PUSH_LOCAL_VAR, executed count: 11364021
12 | sum time: 0.412040 secs (8.15%), avg time of 100000 times: 0.003626
13 |
14 | === SET_LOCAL_VAR, executed count: 9641559
15 | sum time: 0.347985 secs (6.88%), avg time of 100000 times: 0.003609
16 |
17 | === BIN_OPERATOR_BY_LOCAL_AND_NUMBER, executed count: 6137238
18 | sum time: 0.346516 secs (6.85%), avg time of 100000 times: 0.005646
19 |
20 | === SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 6376814
21 | sum time: 0.334967 secs (6.62%), avg time of 100000 times: 0.005253
22 |
23 | === GET_PROPERTY_BY_LOCALS, executed count: 6438708
24 | sum time: 0.293309 secs (5.80%), avg time of 100000 times: 0.004555
25 |
26 | === JUMP_1, executed count: 7548329
27 | sum time: 0.273805 secs (5.41%), avg time of 100000 times: 0.003627
28 |
29 | === IF_NOT_JUMP_1, executed count: 6659026
30 | sum time: 0.240035 secs (4.75%), avg time of 100000 times: 0.003605
31 |
32 | === GET_SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 2580480
33 | sum time: 0.228235 secs (4.51%), avg time of 100000 times: 0.008845
34 |
35 | === BIN_OPERATOR_BY_LOCALS, executed count: 3967229
36 | sum time: 0.187821 secs (3.71%), avg time of 100000 times: 0.004734
37 |
38 | === ALL OPCODES, executed count: 84027573
39 | sum time: 3.856992 secs (76.27%), avg time of 100000 times: 0.004590
40 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-03-#4.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","scripts\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 4.80323
5 | OS script full time: 4.806635 secs
6 | gc time: 0.000157 secs (0.00%)
7 |
8 | === SET_LOCAL_VAR_BY_BIN_OPERATOR_LOCAL_AND_NUMBER, executed count: 8775837
9 | sum time: 0.464807 secs (9.67%), avg time of 100000 times: 0.005296
10 |
11 | === PUSH_LOCAL_VAR, executed count: 11364021
12 | sum time: 0.391794 secs (8.15%), avg time of 100000 times: 0.003448
13 |
14 | === SET_LOCAL_VAR_1, executed count: 9641559
15 | sum time: 0.324172 secs (6.74%), avg time of 100000 times: 0.003362
16 |
17 | === SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 6376814
18 | sum time: 0.321689 secs (6.69%), avg time of 100000 times: 0.005045
19 |
20 | === BIN_OPERATOR_BY_LOCAL_AND_NUMBER, executed count: 6137238
21 | sum time: 0.311836 secs (6.49%), avg time of 100000 times: 0.005081
22 |
23 | === GET_PROPERTY_BY_LOCALS, executed count: 6438708
24 | sum time: 0.285652 secs (5.94%), avg time of 100000 times: 0.004436
25 |
26 | === JUMP_1, executed count: 7548329
27 | sum time: 0.261107 secs (5.43%), avg time of 100000 times: 0.003459
28 |
29 | === IF_NOT_JUMP_1, executed count: 6659026
30 | sum time: 0.223800 secs (4.66%), avg time of 100000 times: 0.003361
31 |
32 | === GET_SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 2580480
33 | sum time: 0.213698 secs (4.45%), avg time of 100000 times: 0.008281
34 |
35 | === BIN_OPERATOR_BY_LOCALS, executed count: 3967229
36 | sum time: 0.186113 secs (3.87%), avg time of 100000 times: 0.004691
37 |
38 | === ALL OPCODES, executed count: 84027573
39 | sum time: 3.615839 secs (75.23%), avg time of 100000 times: 0.004303
40 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/MPFDParser-1.0/Field.h:
--------------------------------------------------------------------------------
1 | // This file is distributed under GPLv3 licence
2 | // Author: Gorelov Grigory (gorelov@grigory.info)
3 | //
4 | // Contacts and other info are on the WEB page: grigory.info/MPFDParser
5 |
6 |
7 | #ifndef _FIELD_H
8 | #define _FIELD_H
9 |
10 | #include "Exception.h"
11 | // #include
12 | // #include
13 | #include
14 | #include
15 | #include
16 |
17 | namespace MPFD {
18 |
19 | class Field {
20 | public:
21 | static const int TextType = 1, FileType = 2;
22 |
23 | Field();
24 | virtual ~Field();
25 |
26 | void SetType(int type);
27 | int GetType();
28 |
29 | void AcceptSomeData(char *data, long length);
30 | void FinishData();
31 |
32 | // File functions
33 | void SetUploadedFilesStorage(int where);
34 | void SetTempDir(std::string dir);
35 |
36 | void SetFileName(std::string name);
37 | std::string GetFileName();
38 |
39 | void SetFileContentType(std::string type);
40 | std::string GetFileMimeType();
41 |
42 | char * GetFileContent();
43 | unsigned long GetFileContentSize();
44 |
45 | std::string GetTempFileNameEx();
46 |
47 | // Text field operations
48 | std::string GetTextTypeContent();
49 |
50 |
51 |
52 |
53 | private:
54 | unsigned long FieldContentLength;
55 |
56 | int WhereToStoreUploadedFiles;
57 |
58 | std::string TempDir, TempFile;
59 | std::string FileContentType, FileName;
60 |
61 | int type;
62 | char * FieldContent;
63 | // std::ofstream file;
64 | FILE * file;
65 | };
66 | }
67 | #endif /* _FIELD_H */
68 |
69 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/examples/authorizer.c:
--------------------------------------------------------------------------------
1 | /*
2 | * tiny-authorizer.c --
3 | *
4 | * FastCGI example Authorizer program using fcgi_stdio library
5 | *
6 | * Copyright (c) 1996 Open Market, Inc.
7 | * See the file "LICENSE.TERMS" for information on usage and redistribution
8 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9 | *
10 | * $Id: authorizer.c,v 1.1 2001/06/19 15:30:02 robs Exp $
11 | */
12 |
13 | #include "fcgi_stdio.h"
14 | #include
15 | #include
16 |
17 | int main(void)
18 | {
19 | char *user, *password;
20 |
21 | user = getenv("USER");
22 | if (user == NULL) {
23 | user = "doe";
24 | }
25 |
26 | password = getenv("PASSWORD");
27 | if (password == NULL) {
28 | password = "xxxx";
29 | }
30 |
31 | while (FCGI_Accept() >= 0) {
32 | char *remoteUser, *remotePassword;
33 |
34 | remoteUser = getenv("REMOTE_USER");
35 | remotePassword = getenv("REMOTE_PASSWD");
36 | if ((remoteUser == NULL) || (remotePassword == NULL)
37 | || strcmp(remoteUser, user) || strcmp(remotePassword, password))
38 | {
39 | printf("Status: 401 Unauthorized\r\n"
40 | "WWW-Authenticate: Basic realm=\"Test\"\r\n"
41 | "\r\n");
42 | }
43 | else {
44 | char *processId = getenv("QUERY_STRING");
45 | if (processId == NULL || strlen(processId) == 0) {
46 | processId = "0";
47 | }
48 | printf("Status: 200 OK\r\n"
49 | "Variable-AUTH_TYPE: Basic\r\n"
50 | "Variable-REMOTE_PASSWD:\r\n"
51 | "Variable-PROCESS_ID: %s\r\n"
52 | "\r\n", processId);
53 | }
54 | }
55 |
56 | return 0;
57 | }
58 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/scripts/test_fannkuch.js:
--------------------------------------------------------------------------------
1 | var fannkuch = function(n)
2 | {
3 | var p = [], q = [], s = [], sign = 1, maxflips = 0, sum = 0;
4 | var i;
5 | for(i=1; i<=n; i++) p[i] = q[i] = s[i] = i;
6 | for(;;){
7 | // Copy and flip.
8 | var q1 = p[1]; // Cache 1st element.
9 | if(q1 != 1){
10 | for(i=2; i<=n; i++) q[i] = p[i]; // Work on a copy.
11 | var flips = 1;
12 | for(;;){
13 | var qq = q[q1];
14 | if(qq == 1){ // ... until 1st element is 1.
15 | sum = sum + sign*flips;
16 | if(flips > maxflips){
17 | maxflips = flips;
18 | } // New maximum?
19 | break;
20 | }
21 | q[q1] = q1;
22 | if(q1 >= 4){
23 | var i = 2, j = q1 - 1
24 | for(;;){ var tmp = q[i]; q[i] = q[j]; q[j] = tmp; if(++i >= --j) break; }
25 | }
26 | q1 = qq; flips++;
27 | }
28 | }
29 | // Permute.
30 | if(sign == 1){
31 | var tmp = p[2]; p[2] = p[1]; p[1] = tmp; sign = -1; // Rotate 1<-2.
32 | }else{
33 | var tmp = p[2]; p[2] = p[3]; p[3] = tmp; sign = 1; // Rotate 1<-2 and 1<-2<-3.
34 | for(i = 3;; i++){
35 | // print "mark 4"
36 | var sx = s[i];
37 | if(sx != 1){ s[i] = sx-1; break; }
38 | if(i == n) return [sum, maxflips]; // Out of permutations.
39 | s[i] = i;
40 | // Rotate 1<-...<-i+1.
41 | var t = p[1]; for(var j = 1; j <= i; j++){ p[j] = p[j+1]; } p[i+1] = t;
42 | }
43 | }
44 | }
45 | }
46 |
47 | function getTimeSec(){
48 | var d = new Date();
49 | return (d.getTime() + d.getMilliseconds() / 1000.0) / 1000.0;
50 | }
51 |
52 | var n = 10;
53 | var start_time = getTimeSec();
54 | var r = fannkuch(n);
55 | var sum = r[0], flips = r[1];
56 | WScript.Echo(
57 | sum,"\n",
58 | "Pfannkuchen(",n,") = ",flips,"\n",
59 | "time = ",(getTimeSec() - start_time),"\n"
60 | )
61 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/java/FCGIRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * @(#)FCGIRequest.java
3 | *
4 | * FastCGi compatibility package Interface
5 | *
6 | * Copyright (c) 1996 Open Market, Inc.
7 | *
8 | * See the file "LICENSE.TERMS" for information on usage and redistribution
9 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10 | *
11 | * $Id: FCGIRequest.java,v 1.3 2000/03/21 12:12:26 robs Exp $
12 | */
13 | package com.fastcgi;
14 |
15 | import java.net.*;
16 | import java.io.FileDescriptor;
17 | import java.util.Properties;
18 |
19 | public class FCGIRequest
20 | {
21 | private static final String RCSID = "$Id: FCGIRequest.java,v 1.3 2000/03/21 12:12:26 robs Exp $";
22 |
23 | /* This class has no methods. Right now we are single threaded
24 | * so there is only one request object at any given time which
25 | * is refrenced by an FCGIInterface class variable . All of this
26 | * object's data could just as easily be declared directly there.
27 | * When we thread, this will change, so we might as well use a
28 | * seperate class. In line with this thinking, though somewhat
29 | * more perversely, we kept the socket here.
30 | */
31 | /*
32 | * class variables
33 | */
34 | /*public static Socket socket; */
35 | // same for all requests
36 |
37 | /*
38 | * instance variables
39 | */
40 | public Socket socket;
41 | public boolean isBeginProcessed;
42 | public int requestID;
43 | public boolean keepConnection;
44 | public int role;
45 | public int appStatus;
46 | public int numWriters;
47 | public FCGIInputStream inStream;
48 | public FCGIOutputStream outStream;
49 | public FCGIOutputStream errStream;
50 | public Properties params;
51 | }
52 |
53 |
54 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/LICENSE.TERMS:
--------------------------------------------------------------------------------
1 | This FastCGI application library source and object code (the
2 | "Software") and its documentation (the "Documentation") are
3 | copyrighted by Open Market, Inc ("Open Market"). The following terms
4 | apply to all files associated with the Software and Documentation
5 | unless explicitly disclaimed in individual files.
6 |
7 | Open Market permits you to use, copy, modify, distribute, and license
8 | this Software and the Documentation for any purpose, provided that
9 | existing copyright notices are retained in all copies and that this
10 | notice is included verbatim in any distributions. No written
11 | agreement, license, or royalty fee is required for any of the
12 | authorized uses. Modifications to this Software and Documentation may
13 | be copyrighted by their authors and need not follow the licensing
14 | terms described here. If modifications to this Software and
15 | Documentation have new licensing terms, the new terms must be clearly
16 | indicated on the first page of each file where they apply.
17 |
18 | OPEN MARKET MAKES NO EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE
19 | SOFTWARE OR THE DOCUMENTATION, INCLUDING WITHOUT LIMITATION ANY
20 | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN
21 | NO EVENT SHALL OPEN MARKET BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY
22 | DAMAGES ARISING FROM OR RELATING TO THIS SOFTWARE OR THE
23 | DOCUMENTATION, INCLUDING, WITHOUT LIMITATION, ANY INDIRECT, SPECIAL OR
24 | CONSEQUENTIAL DAMAGES OR SIMILAR DAMAGES, INCLUDING LOST PROFITS OR
25 | LOST DATA, EVEN IF OPEN MARKET HAS BEEN ADVISED OF THE POSSIBILITY OF
26 | SUCH DAMAGES. THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS".
27 | OPEN MARKET HAS NO LIABILITY IN CONTRACT, TORT, NEGLIGENCE OR
28 | OTHERWISE ARISING OUT OF THIS SOFTWARE OR THE DOCUMENTATION.
29 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/scripts/test_fannkuch.php:
--------------------------------------------------------------------------------
1 | $maxflips){
22 | $maxflips = $flips;
23 | } // New maximum?
24 | break;
25 | }
26 | $q[$q1] = $q1;
27 | if($q1 >= 4){
28 | $i = 2; $j = $q1 - 1;
29 | for(;;){ $tmp = $q[$i]; $q[$i] = $q[$j]; $q[$j] = $tmp; if(++$i >= --$j) break; }
30 | }
31 | $q1 = $qq; $flips++;
32 | }
33 | }
34 | // Permute.
35 | if($sign == 1){
36 | $tmp = $p[2]; $p[2] = $p[1]; $p[1] = $tmp; $sign = -1; // Rotate 1<-2.
37 | }else{
38 | $tmp = $p[2]; $p[2] = $p[3]; $p[3] = $tmp; $sign = 1; // Rotate 1<-2 and 1<-2<-3.
39 | for($i = 3;; $i++){
40 | $sx = $s[$i];
41 | if($sx != 1){ $s[$i] = $sx-1; break; }
42 | if($i == $n) return array($sum, $maxflips); // Out of permutations.
43 | $s[$i] = $i;
44 | // Rotate 1<-...<-i+1.
45 | $t = $p[1]; for($j = 1; $j <= $i; $j++){ $p[$j] = $p[$j+1]; } $p[$i+1] = $t;
46 | }
47 | }
48 | }
49 | }
50 |
51 | function getTimeSec(){
52 | list($usec, $sec) = explode(" ",microtime());
53 | return ($usec + $sec);
54 | }
55 |
56 | $n = isset($argv[1]) ? $argv[1] : 5;
57 | echo "n: $n\n";
58 | $start_time = getTimeSec();
59 | $r = fannkuch($n);
60 | $sum = $r[0]; $flips = $r[1];
61 | echo("$sum\nPfannkuchen($n) = $flips\n"
62 | . "time = ".(getTimeSec() - $start_time)."\n");
63 |
64 |
--------------------------------------------------------------------------------
/source/os-binder-FunctionImp.tpl:
--------------------------------------------------------------------------------
1 | template
2 | struct OS_BIND_FUNC_RUN_CLASS_NAME
3 | {
4 | typedef R(OS_BIND_FUNC_CC *F)(OS_BIND_FUNC_PARMS) OS_BIND_FUNC_CC_GNUC;
5 |
6 | static int run(OS * os, int params, int, int, void * user_param)
7 | {
8 | OS_BIND_FUNC_GET_ARGS;
9 | typedef typename RemoveConst::type type;
10 | F& f = *(F*)user_param;
11 | CtypeValue::push(os, (*f)(OS_BIND_FUNC_ARGS));
12 | return 1;
13 | }
14 | };
15 |
16 | template
17 | struct OS_BIND_FUNC_RUN_CLASS_NAME
18 | {
19 | typedef void(OS_BIND_FUNC_CC *F)(OS_BIND_FUNC_PARMS) OS_BIND_FUNC_CC_GNUC;
20 |
21 | static int run(OS * os, int params, int, int, void * user_param)
22 | {
23 | OS_BIND_FUNC_GET_ARGS;
24 | F& f = *(F*)user_param;
25 | (*f)(OS_BIND_FUNC_ARGS);
26 | return 0;
27 | }
28 | };
29 |
30 | template
31 | struct OS_BIND_FUNC_CLASS_NAME
32 | {
33 | typedef R(OS_BIND_FUNC_CC *F)(OS_BIND_FUNC_PARMS) OS_BIND_FUNC_CC_GNUC;
34 |
35 | const char * name;
36 | F f;
37 |
38 | OS_BIND_FUNC_CLASS_NAME(const char * _name, F _f): name(_name), f(_f){}
39 |
40 | operator OS::FuncDef() const
41 | {
42 | OS::FuncDef def = {name,
43 | OS_BIND_FUNC_RUN_CLASS_NAME::run,
44 | &(new FunctionData(f))->f};
45 | return def;
46 | }
47 | };
48 |
49 | // namespace ObjectScript {
50 |
51 | template
52 | OS::FuncDef def(const char * name, R(OS_BIND_FUNC_CC *f)(OS_BIND_FUNC_PARMS) OS_BIND_FUNC_CC_GNUC)
53 | {
54 | typedef OS_BIND_FUNC_CLASS_NAME Func;
55 | return Func(name, f);
56 | }
57 |
58 | // } // namespace ObjectScript
59 |
--------------------------------------------------------------------------------
/proj.win32/os/ReadMe.txt:
--------------------------------------------------------------------------------
1 | ========================================================================
2 | КОНСОЛЬНОЕ ПРИЛОЖЕНИЕ. Обзор проекта os
3 | ========================================================================
4 |
5 | Это приложение os создано автоматически с помощью мастера
6 | приложений.
7 |
8 | Здесь приведены краткие сведения о содержимом каждого из файлов, использованных
9 | при создании приложения os.
10 |
11 |
12 | os.vcxproj
13 | Основной файл проекта VC++, автоматически создаваемый с помощью мастера
14 | приложений.
15 | Он содержит данные о версии языка Visual C++, использованной для создания
16 | файла, а также сведения о платформах, настройках и свойствах проекта,
17 | выбранных с помощью мастера приложений.
18 |
19 | os.vcxproj.filters
20 | Это файл фильтров для проектов VC++, созданный с помощью мастера
21 | приложений.
22 | Он содержит сведения о сопоставлениях между файлами в вашем проекте и
23 | фильтрами. Эти сопоставления используются в среде IDE для группировки
24 | файлов с одинаковыми расширениями в одном узле (например файлы ".cpp"
25 | сопоставляются с фильтром "Исходные файлы").
26 |
27 | os.cpp
28 | Это основной исходный файл приложения.
29 |
30 | /////////////////////////////////////////////////////////////////////////////
31 | Другие стандартные файлы:
32 |
33 | StdAfx.h, StdAfx.cpp
34 | Эти файлы используются для построения файла предкомпилированного заголовка
35 | (PCH) с именем os.pch и файла предкомпилированных типов
36 | с именем StdAfx.obj.
37 |
38 | /////////////////////////////////////////////////////////////////////////////
39 | Общие замечания:
40 |
41 | С помощью комментариев «TODO:» в мастере приложений обозначаются фрагменты
42 | исходного кода, которые необходимо дополнить или изменить.
43 |
44 | /////////////////////////////////////////////////////////////////////////////
45 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/libfcgi/Debug/libfcgi.Build.CppClean.log:
--------------------------------------------------------------------------------
1 | .\..\libfcgi\Debug\libfcgi.bsc
2 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\BscMake.command.1.tlog
3 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\bscmake.read.1.tlog
4 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\bscmake.write.1.tlog
5 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\cl.command.1.tlog
6 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\CL.read.1.tlog
7 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\CL.write.1.tlog
8 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\FCGI_STDIO.OBJ
9 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\FCGI_STDIO.SBR
10 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\FCGIAPP.OBJ
11 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\FCGIAPP.SBR
12 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\FCGIO.OBJ
13 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\FCGIO.SBR
14 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\lib.command.1.tlog
15 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\LIBFCGI.BSC
16 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\LIBFCGI.LIB
17 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\libfcgi.write.1.tlog
18 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\Lib-link.read.1.tlog
19 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\Lib-link.write.1.tlog
20 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\OS_WIN32.OBJ
21 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\OS_WIN32.SBR
22 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\libfcgi\Debug\vc100.idb
23 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\LIBFCGI\DEBUG\VC100.PDB
24 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\.\..\libfcgi\Debug\libfcgi.lib
25 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/ReadMe.txt:
--------------------------------------------------------------------------------
1 | ========================================================================
2 | КОНСОЛЬНОЕ ПРИЛОЖЕНИЕ. Обзор проекта os-fcgi
3 | ========================================================================
4 |
5 | Это приложение os-fcgi создано автоматически с помощью мастера
6 | приложений.
7 |
8 | Здесь приведены краткие сведения о содержимом каждого из файлов, использованных
9 | при создании приложения os-fcgi.
10 |
11 |
12 | os-fcgi.vcxproj
13 | Основной файл проекта VC++, автоматически создаваемый с помощью мастера
14 | приложений.
15 | Он содержит данные о версии языка Visual C++, использованной для создания
16 | файла, а также сведения о платформах, настройках и свойствах проекта,
17 | выбранных с помощью мастера приложений.
18 |
19 | os-fcgi.vcxproj.filters
20 | Это файл фильтров для проектов VC++, созданный с помощью мастера
21 | приложений.
22 | Он содержит сведения о сопоставлениях между файлами в вашем проекте и
23 | фильтрами. Эти сопоставления используются в среде IDE для группировки
24 | файлов с одинаковыми расширениями в одном узле (например файлы ".cpp"
25 | сопоставляются с фильтром "Исходные файлы").
26 |
27 | os-fcgi.cpp
28 | Это основной исходный файл приложения.
29 |
30 | /////////////////////////////////////////////////////////////////////////////
31 | Другие стандартные файлы:
32 |
33 | StdAfx.h, StdAfx.cpp
34 | Эти файлы используются для построения файла предкомпилированного заголовка
35 | (PCH) с именем os-fcgi.pch и файла предкомпилированных типов
36 | с именем StdAfx.obj.
37 |
38 | /////////////////////////////////////////////////////////////////////////////
39 | Общие замечания:
40 |
41 | С помощью комментариев «TODO:» в мастере приложений обозначаются фрагменты
42 | исходного кода, которые необходимо дополнить или изменить.
43 |
44 | /////////////////////////////////////////////////////////////////////////////
45 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/perl/echo.PL:
--------------------------------------------------------------------------------
1 | use Config;
2 |
3 | open OUT, ">echo.fpl";
4 | print OUT "#!$Config{perlpath}\n";
5 | print OUT while ;
6 | close OUT;
7 | chmod 0755, "echo.fpl";
8 | __END__
9 | #
10 | # echo-perl --
11 | #
12 | # Produce a page containing all FastCGI inputs
13 | #
14 | # Copyright (c) 1996 Open Market, Inc.
15 | #
16 | # See the file "LICENSE.TERMS" for information on usage and redistribution
17 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
18 | #
19 | # $Id: echo.PL,v 1.2 2000/12/14 13:46:23 skimo Exp $
20 | #
21 | # Changed by skimo to demostrate autoflushing 1997/02/19
22 | #
23 |
24 | use FCGI;
25 | use strict;
26 |
27 | sub print_env {
28 | my($label, $envp) = @_;
29 | print("$label: \n\n");
30 | my @keys = sort keys(%$envp);
31 | foreach my $key (@keys) {
32 | print("$key=$$envp{$key}\n");
33 | }
34 | print(" \n");
35 | }
36 |
37 | my %env;
38 | my $req = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%env);
39 | my $count = 0;
40 | while($req->Accept() >= 0) {
41 | print("Content-type: text/html\r\n\r\n",
42 | "
FastCGI echo (Perl) \n",
43 | "FastCGI echo (Perl) \n",
44 | "Request number ", ++$count, "\n");
45 | my $len = 0 + $env{'CONTENT_LENGTH'};
46 | if($len == 0) {
47 | print("No data from standard input.
\n");
48 | } else {
49 | print("Standard input: \n
\n");
50 | for(my $i = 0; $i < $len; $i++) {
51 | my $ch = getc(STDIN);
52 | if($ch eq "") {
53 | print("Error: Not enough bytes received ",
54 | "on standard input\n");
55 | last;
56 | }
57 | print($ch);
58 | }
59 | print("\n
\n");
60 | }
61 | print_env("Request environment", \%env);
62 | print "More on its way ... wait a few seconds\n \n ";
63 | $req->Flush();
64 | sleep(3);
65 | print_env("Initial environment", \%ENV);
66 | $req->Finish();
67 | }
68 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/doc/fcgi-perl.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Integrating FastCGI with Perl-5
6 |
7 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | Integrating FastCGI with Perl-5
29 |
30 |
31 |
32 |
33 |
34 |
35 | Copyright © 1996 Open Market, Inc. 245 First Street, Cambridge, MA 02142 U.S.A.
36 | Tel: 617-949-7000 URL: http://www.openmarket.com/
37 | $Id: fcgi-perl.htm,v 1.5 2002/02/25 00:42:59 robs Exp $
38 |
39 |
40 |
41 | Perl (Practical Extraction and Report Language) is a scripting language that is often used for CGI
42 | programming. Perl is freely available.
43 |
44 |
45 | FastCGI support is available for Perl via the FCGI.pm Perl module. FCGI.pm no longer requires SFIO or a
46 | specially-built Perl. FCGI.pm is available via CPAN as well as in the perl directory of this kit.
47 |
48 |
49 | Please see the FCGI.pm documentation for examples and details.
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/doc/FCGI_StartFilterData.3:
--------------------------------------------------------------------------------
1 | NAME
2 | FCGI_StartFilterData - fcgi_stdio compatibility library
3 |
4 | SYNOPSIS
5 | #include "fcgi_stdio.h"
6 |
7 | int
8 | FCGI_StartFilterData(void);
9 |
10 |
11 | DESCRIPTION
12 | Enables a FastCGI Filter application to begin reading its filter
13 | input data from stdin.
14 |
15 | In order to call FCGI_StartFilterData, the FastCGI
16 | application should have been invoked in the Filter role
17 | (getenv("FCGI_ROLE") == "FILTER"), and should have read
18 | stdin to EOF, consuming the entire FCGI_STDIN data stream.
19 | The call to FCGI_StartFilterData positions stdin at the
20 | start of FCGI_DATA.
21 |
22 | If the preconditions are not met (e.g. the application has
23 | not read stdin to EOF), FCGI_StartFilterData returns
24 | a negative result, and the application will get EOF on attempts
25 | to read from stdin.
26 |
27 | The application can determine the number of bytes available
28 | on FCGI_DATA by performing atoi(getenv("FCGI_DATA_LENGTH")).
29 | If fewer than this many bytes are delievered on stdin after
30 | calling FCGI_StartFilterData, the application should perform
31 | an application-specific error response. If the application
32 | normally makes an update, most likely it should abort the update.
33 |
34 | The application can determine last modification time of the
35 | filter input data by performing getenv("FCGI_DATA_LAST_MOD").
36 | This allows applications to perform caching based on last
37 | modification time.
38 |
39 |
40 | RETURN VALUES
41 | 0 for successful call, < 0 for error.
42 |
43 | SEE ALSO
44 | FCGI_Accept(3)
45 | FCGI_SetExitStatus(3)
46 | cgi-fcgi(1)
47 |
48 | HISTORY
49 | Copyright (c) 1996 Open Market, Inc.
50 | See the file "LICENSE.TERMS" for information on usage and redistribution
51 | of this file, and for a DISCLAIMER OF ALL WARRANTIES.
52 | $Id: FCGI_StartFilterData.3,v 1.1.1.1 1997/09/16 15:36:26 stanleyg Exp $
53 |
--------------------------------------------------------------------------------
/examples-os/run_os_prog.txt:
--------------------------------------------------------------------------------
1 |
2 | [FILE] ../../examples-os/run_os_prog.os
3 | [1] print("10 * (3+2) = ", 10 * (3+2))
4 |
5 | begin function
6 | begin locals, total 2
7 | 0 _E
8 | 1 _G
9 | end locals
10 | begin call method
11 | get local var _E (0 0)
12 | begin params 3
13 | push const string "print"
14 | ,
15 | push const string "10 * (3+2) = "
16 | ,
17 | push const number 50
18 | end params ret values 3
19 | end call method ret values 0
20 |
21 |
22 | [3] bar = {firsname="James", lastname="Bond"}
23 |
24 | begin set env var
25 | begin object 2
26 | begin set by name
27 | push const string "James"
28 | end set by name: [firsname]
29 | ,
30 | begin set by name
31 | push const string "Bond"
32 | end set by name: [lastname]
33 | end object
34 | end set env var bar
35 |
36 |
37 | [4] bar.profession = "actor"
38 |
39 | begin set property
40 | push const string "actor"
41 | get env var auto create bar
42 | push const string "profession"
43 | end set property ret values 0
44 |
45 |
46 | [5] print bar
47 |
48 | begin call method
49 | get local var _E (0 0)
50 | begin params 2
51 | push const string "print"
52 | ,
53 | get env var bar
54 | end params ret values 2
55 | end call method ret values 0
56 |
57 |
58 | [7] print(concat(5, " big differences"))
59 |
60 | begin call method
61 | get local var _E (0 0)
62 | begin params 2
63 | push const string "print"
64 | ,
65 | begin call method
66 | get local var _E (0 0)
67 | begin params 3
68 | push const string "concat"
69 | ,
70 | push const number 5
71 | ,
72 | push const string " big differences"
73 | end params ret values 3
74 | end call method ret values 1
75 | end params ret values 2
76 | end call method ret values 0
77 |
78 | begin code list
79 | begin return
80 | get local var _E (0 0)
81 | end return values 1
82 | end code list ret values 0
83 | end function
84 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ObjectScript
2 | ============
3 |
4 | ObjectScript is a new programing language that mixes benefits of JavaScript, Lua and PHP
5 |
6 | Run examples-os\test.cmd to start example.
7 |
8 | Please check proj.win32\examples.sln for more examples.
9 |
10 | License
11 | =======
12 |
13 | ObjectScript is free software distributed under the terms of the MIT license reproduced below. ObjectScript may be used for any purpose, including commercial purposes, at absolutely no cost. No paperwork, no royalties, no GNU-like "copyleft" restrictions, either. Just download it and use it.
14 |
15 | The spirit of the ObjectScript license is that you are free to use ObjectScript for any purpose at no cost without having to ask us. The only requirement is that if you do use ObjectScript, then you should give us credit by including the copyright notice somewhere in your product or its documentation. A nice, but optional, way to give us further credit is to include a ObjectScript logo and a link to our site in a web page for your product.
16 |
17 | Permission is hereby granted, free of charge, to any person obtaining
18 | a copy of this software and associated documentation files (the
19 | "Software"), to deal in the Software without restriction, including
20 | without limitation the rights to use, copy, modify, merge, publish,
21 | distribute, sublicense, and/or sell copies of the Software, and to
22 | permit persons to whom the Software is furnished to do so, subject to
23 | the following conditions:
24 |
25 | The above copyright notice and this permission notice shall be
26 | included in all copies or substantial portions of the Software.
27 |
28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
31 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
32 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
33 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
34 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 |
--------------------------------------------------------------------------------
/source/os-binder-cc-functions.h:
--------------------------------------------------------------------------------
1 | /*
2 | AUTO-GENERATED FILE. DO NOT MODIFY.
3 |
4 | Note: this header is a header template
5 | and must NOT have multiple-inclusion protection.
6 | */
7 |
8 | /******************************************************************************
9 | * Copyright (C) 2012 Evgeniy Golovin (evgeniy.golovin@unitpoint.ru)
10 | *
11 | * Latest source code: https://github.com/unitpoint/objectscript
12 | *
13 | * Permission is hereby granted, free of charge, to any person obtaining
14 | * a copy of this software and associated documentation files (the
15 | * "Software"), to deal in the Software without restriction, including
16 | * without limitation the rights to use, copy, modify, merge, publish,
17 | * distribute, sublicense, and/or sell copies of the Software, and to
18 | * permit persons to whom the Software is furnished to do so, subject to
19 | * the following conditions:
20 | *
21 | * The above copyright notice and this permission notice shall be
22 | * included in all copies or substantial portions of the Software.
23 | *
24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 | ******************************************************************************/
32 |
33 | #ifdef __GNUC__
34 | #include "os-binder-function.h"
35 | #else
36 | #define OS_BIND_FUNC_CDECL
37 | #include "os-binder-function.h"
38 | #undef OS_BIND_FUNC_CDECL
39 |
40 | #define OS_BIND_FUNC_STDCALL
41 | #include "os-binder-function.h"
42 | #undef OS_BIND_FUNC_STDCALL
43 |
44 | #define OS_BIND_FUNC_FASTCALL
45 | #include "os-binder-function.h"
46 | #undef OS_BIND_FUNC_FASTCALL
47 |
48 | #define OS_BIND_FUNC_THISCALL
49 | #include "os-binder-function.h"
50 | #undef OS_BIND_FUNC_THISCALL
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-spectral-norm.txt:
--------------------------------------------------------------------------------
1 | 1.274223601
2 | time: 2.641
3 | OS script full time: 2.651831 secs
4 | gc time: 0.000130 secs (0.00%)
5 |
6 | === GET_PROPERTY, executed count: 1600416
7 | sum time: 1.030048 secs (38.84%), avg time of 100000 times: 0.064361
8 |
9 | === ADD, executed count: 6408810
10 | sum time: 0.211075 secs (7.96%), avg time of 100000 times: 0.003294
11 |
12 | === MUL, executed count: 4800400
13 | sum time: 0.155076 secs (5.85%), avg time of 100000 times: 0.003230
14 |
15 | === MOVE2, executed count: 3216577
16 | sum time: 0.115528 secs (4.36%), avg time of 100000 times: 0.003592
17 |
18 | === SUB, executed count: 3200001
19 | sum time: 0.085539 secs (3.23%), avg time of 100000 times: 0.002673
20 |
21 | === RETURN, executed count: 1600065
22 | sum time: 0.075810 secs (2.86%), avg time of 100000 times: 0.004738
23 |
24 | === JUMP, executed count: 1616453
25 | sum time: 0.064996 secs (2.45%), avg time of 100000 times: 0.004021
26 |
27 | === DIV, executed count: 1600001
28 | sum time: 0.057713 secs (2.18%), avg time of 100000 times: 0.003607
29 |
30 | === LOGIC_GREATER, executed count: 1616453
31 | sum time: 0.057330 secs (2.16%), avg time of 100000 times: 0.003547
32 |
33 | === MOVE, executed count: 1616307
34 | sum time: 0.056174 secs (2.12%), avg time of 100000 times: 0.003475
35 |
36 | === CALL, executed count: 1600062
37 | sum time: 0.056132 secs (2.12%), avg time of 100000 times: 0.003508
38 |
39 | === GET_UPVALUE, executed count: 1600045
40 | sum time: 0.054435 secs (2.05%), avg time of 100000 times: 0.003402
41 |
42 | === SET_PROPERTY, executed count: 8207
43 | sum time: 0.006125 secs (0.23%), avg time of 100000 times: 0.074637
44 |
45 | === NEW_FUNCTION, executed count: 7
46 | sum time: 0.000004 secs (0.00%), avg time of 100000 times: 0.051315
47 |
48 | === NEW_OBJECT, executed count: 5
49 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.020526
50 |
51 | === CALL_METHOD, executed count: 9
52 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.005702
53 |
54 | === ALL OPCODES, executed count: 30483822
55 | sum time: 2.025987 secs (76.40%), avg time of 100000 times: 0.006646
56 |
--------------------------------------------------------------------------------
/source/os-binder-FunctionClassImp.tpl:
--------------------------------------------------------------------------------
1 | template
2 | struct OS_BIND_FUNC_RUN_CLASS_NAME
3 | {
4 | typedef R(OS_BIND_FUNC_CC T::*F)(OS_BIND_FUNC_PARMS){const} OS_BIND_FUNC_CC_GNUC;
5 |
6 | static int run(OS * os, int params, int, int, void * user_param)
7 | {
8 | OS_GET_TEMPLATE_SELF(T*);
9 | OS_BIND_FUNC_GET_ARGS;
10 | typedef typename RemoveConst::type type;
11 | F& f = *(F*)user_param;
12 | // CtypeValue::push(os, CtypeValue::to((self->*f)(OS_BIND_FUNC_ARGS)));
13 | CtypeValue::push(os, (self->*f)(OS_BIND_FUNC_ARGS));
14 | return 1;
15 | }
16 | };
17 |
18 | template
19 | struct OS_BIND_FUNC_RUN_CLASS_NAME
20 | {
21 | typedef void(OS_BIND_FUNC_CC T::*F)(OS_BIND_FUNC_PARMS){const} OS_BIND_FUNC_CC_GNUC;
22 |
23 | static int run(OS * os, int params, int, int, void * user_param)
24 | {
25 | OS_GET_TEMPLATE_SELF(T*);
26 | OS_BIND_FUNC_GET_ARGS;
27 | F& f = *(F*)user_param;
28 | (self->*f)(OS_BIND_FUNC_ARGS);
29 | return 0;
30 | }
31 | };
32 |
33 | template
34 | struct OS_BIND_FUNC_CLASS_NAME
35 | {
36 | typedef R(OS_BIND_FUNC_CC T::*F)(OS_BIND_FUNC_PARMS){const} OS_BIND_FUNC_CC_GNUC;
37 |
38 | const char * name;
39 | F f;
40 |
41 | OS_BIND_FUNC_CLASS_NAME(const char * _name, F _f): name(_name), f(_f){}
42 |
43 | operator OS::FuncDef() const
44 | {
45 | OS::FuncDef def = {name,
46 | OS_BIND_FUNC_RUN_CLASS_NAME::run,
47 | &(new FunctionData(f))->f};
48 | return def;
49 | }
50 | };
51 |
52 | // namespace ObjectScript {
53 |
54 | template
55 | OS::FuncDef def(const char * name, R(OS_BIND_FUNC_CC T::*f)(OS_BIND_FUNC_PARMS){const} OS_BIND_FUNC_CC_GNUC)
56 | {
57 | typedef OS_BIND_FUNC_CLASS_NAME Func;
58 | return Func(name, f);
59 | }
60 |
61 | // } // namespace ObjectScript
62 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/examples/echo.c:
--------------------------------------------------------------------------------
1 | /*
2 | * echo.c --
3 | *
4 | * Produce a page containing all FastCGI inputs
5 | *
6 | *
7 | * Copyright (c) 1996 Open Market, Inc.
8 | *
9 | * See the file "LICENSE.TERMS" for information on usage and redistribution
10 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 | *
12 | */
13 | #ifndef lint
14 | static const char rcsid[] = "$Id: echo.c,v 1.5 1999/07/28 00:29:37 roberts Exp $";
15 | #endif /* not lint */
16 |
17 | #include "fcgi_config.h"
18 |
19 | #include
20 |
21 | #ifdef HAVE_UNISTD_H
22 | #include
23 | #endif
24 |
25 | #ifdef _WIN32
26 | #include
27 | #else
28 | extern char **environ;
29 | #endif
30 |
31 | #include "fcgi_stdio.h"
32 |
33 |
34 | static void PrintEnv(char *label, char **envp)
35 | {
36 | printf("%s: \n\n", label);
37 | for ( ; *envp != NULL; envp++) {
38 | printf("%s\n", *envp);
39 | }
40 | printf(" \n");
41 | }
42 |
43 | int main ()
44 | {
45 | char **initialEnv = environ;
46 | int count = 0;
47 |
48 | while (FCGI_Accept() >= 0) {
49 | char *contentLength = getenv("CONTENT_LENGTH");
50 | int len;
51 |
52 | printf("Content-type: text/html\r\n"
53 | "\r\n"
54 | "
FastCGI echo "
55 | "FastCGI echo \n"
56 | "Request number %d, Process ID: %d\n", ++count, getpid());
57 |
58 | if (contentLength != NULL) {
59 | len = strtol(contentLength, NULL, 10);
60 | }
61 | else {
62 | len = 0;
63 | }
64 |
65 | if (len <= 0) {
66 | printf("No data from standard input.
\n");
67 | }
68 | else {
69 | int i, ch;
70 |
71 | printf("Standard input: \n
\n");
72 | for (i = 0; i < len; i++) {
73 | if ((ch = getchar()) < 0) {
74 | printf("Error: Not enough bytes received on standard input\n");
75 | break;
76 | }
77 | putchar(ch);
78 | }
79 | printf("\n
\n");
80 | }
81 |
82 | PrintEnv("Request environment", environ);
83 | PrintEnv("Initial environment", initialEnv);
84 | } /* while */
85 |
86 | return 0;
87 | }
88 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/MPFDParser-1.0/Parser.h:
--------------------------------------------------------------------------------
1 | // This file is distributed under GPLv3 licence
2 | // Author: Gorelov Grigory (gorelov@grigory.info)
3 | //
4 | // Contacts and other info are on the WEB page: grigory.info/MPFDParser
5 |
6 |
7 |
8 | #ifndef _PARSER_H
9 | #define _PARSER_H
10 |
11 | // #include
12 | #include
13 | #include
14 | #include "Exception.h"
15 | #include "Field.h"
16 | #include
17 | #include
18 |
19 | namespace MPFD {
20 |
21 | class Parser {
22 | public:
23 | static const int StoreUploadedFilesInFilesystem = 1, StoreUploadedFilesInMemory = 2;
24 |
25 |
26 | Parser();
27 | ~Parser();
28 |
29 | void SetContentType(const std::string type);
30 |
31 | void AcceptSomeData(const char *data, const long length);
32 |
33 | void SetExternalDataBuffer(const char *data, const long length);
34 |
35 | void SetMaxCollectedDataLength(long max);
36 | void SetTempDirForFileUpload(std::string dir);
37 | void SetUploadedFilesStorage(int where);
38 |
39 | void FinishData();
40 |
41 | std::map GetFieldsMap();
42 |
43 | private:
44 | int WhereToStoreUploadedFiles;
45 |
46 | std::map Fields;
47 |
48 | std::string TempDirForFileUpload;
49 | int CurrentStatus;
50 |
51 | // Work statuses
52 | static int const Status_LookingForStartingBoundary = 1;
53 | static int const Status_ProcessingHeaders = 2;
54 | static int const Status_ProcessingContentOfTheField = 3;
55 |
56 | std::string Boundary;
57 | std::string ProcessingFieldName;
58 | bool _HeadersOfTheFieldAreProcessed;
59 | long ContentLength;
60 | char *DataCollector;
61 | long DataCollectorLength, MaxDataCollectorLength;
62 | bool IsExternalDataBuffer;
63 |
64 | bool FindStartingBoundaryAndTruncData();
65 | void _ProcessData();
66 | void _ParseHeaders(std::string headers);
67 | bool WaitForHeadersEndAndParseThem();
68 | void TruncateDataCollectorFromTheBeginning(long n);
69 | long BoundaryPositionInDataCollector();
70 | bool ProcessContentOfTheField();
71 | };
72 | }
73 |
74 | #endif /* _PARSER_H */
75 |
76 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/examples/threaded.c:
--------------------------------------------------------------------------------
1 | /*
2 | * threaded.c -- A simple multi-threaded FastCGI application.
3 | */
4 |
5 | #ifndef lint
6 | static const char rcsid[] = "$Id: threaded.c,v 1.9 2001/11/20 03:23:21 robs Exp $";
7 | #endif /* not lint */
8 |
9 | #include "fcgi_config.h"
10 |
11 | #include
12 | #include
13 |
14 | #ifdef HAVE_UNISTD_H
15 | #include
16 | #endif
17 |
18 | #include "fcgiapp.h"
19 |
20 |
21 | #define THREAD_COUNT 20
22 |
23 | static int counts[THREAD_COUNT];
24 |
25 | static void *doit(void *a)
26 | {
27 | int rc, i, thread_id = (int)a;
28 | pid_t pid = getpid();
29 | FCGX_Request request;
30 | char *server_name;
31 |
32 | FCGX_InitRequest(&request, 0, 0);
33 |
34 | for (;;)
35 | {
36 | static pthread_mutex_t accept_mutex = PTHREAD_MUTEX_INITIALIZER;
37 | static pthread_mutex_t counts_mutex = PTHREAD_MUTEX_INITIALIZER;
38 |
39 | /* Some platforms require accept() serialization, some don't.. */
40 | pthread_mutex_lock(&accept_mutex);
41 | rc = FCGX_Accept_r(&request);
42 | pthread_mutex_unlock(&accept_mutex);
43 |
44 | if (rc < 0)
45 | break;
46 |
47 | server_name = FCGX_GetParam("SERVER_NAME", request.envp);
48 |
49 | FCGX_FPrintF(request.out,
50 | "Content-type: text/html\r\n"
51 | "\r\n"
52 | "FastCGI Hello! (multi-threaded C, fcgiapp library) "
53 | "FastCGI Hello! (multi-threaded C, fcgiapp library) "
54 | "Thread %d, Process %ld"
55 | "Request counts for %d threads running on host %s
",
56 | thread_id, pid, THREAD_COUNT, server_name ? server_name : "?");
57 |
58 | sleep(2);
59 |
60 | pthread_mutex_lock(&counts_mutex);
61 | ++counts[thread_id];
62 | for (i = 0; i < THREAD_COUNT; i++)
63 | FCGX_FPrintF(request.out, "%5d " , counts[i]);
64 | pthread_mutex_unlock(&counts_mutex);
65 |
66 | FCGX_Finish_r(&request);
67 | }
68 |
69 | return NULL;
70 | }
71 |
72 | int main(void)
73 | {
74 | int i;
75 | pthread_t id[THREAD_COUNT];
76 |
77 | FCGX_Init();
78 |
79 | for (i = 1; i < THREAD_COUNT; i++)
80 | pthread_create(&id[i], NULL, doit, (void*)i);
81 |
82 | doit(0);
83 |
84 | return 0;
85 | }
86 |
87 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/perl/fcgi_config.h.in:
--------------------------------------------------------------------------------
1 | /* fcgi_config.h.in. Generated automatically from configure.in by autoheader. */
2 |
3 | /* Define if you have the header file. */
4 | #undef HAVE_ARPA_INET_H
5 |
6 | /* Define if there's a fileno() prototype in stdio.h */
7 | #undef HAVE_FILENO_PROTO
8 |
9 | /* Define if the fpos_t typedef is in stdio.h */
10 | #undef HAVE_FPOS
11 |
12 | /* Define if you have the header file. */
13 | #undef HAVE_INTTYPES_H
14 |
15 | /* Define if you have the header file. */
16 | #undef HAVE_LIMITS_H
17 |
18 | /* Define if you have the header file. */
19 | #undef HAVE_MEMORY_H
20 |
21 | /* Define if you have the header file. */
22 | #undef HAVE_NETDB_H
23 |
24 | /* Define if you have the header file. */
25 | #undef HAVE_NETINET_IN_H
26 |
27 | /* Define if sockaddr_un in sys/un.h contains a sun_len component */
28 | #undef HAVE_SOCKADDR_UN_SUN_LEN
29 |
30 | /* Define if the socklen_t typedef is in sys/socket.h */
31 | #undef HAVE_SOCKLEN
32 |
33 | /* Define if you have the header file. */
34 | #undef HAVE_STDINT_H
35 |
36 | /* Define if you have the header file. */
37 | #undef HAVE_STDLIB_H
38 |
39 | /* Define if you have the header file. */
40 | #undef HAVE_STRINGS_H
41 |
42 | /* Define if you have the header file. */
43 | #undef HAVE_STRING_H
44 |
45 | /* Define if you have the header file. */
46 | #undef HAVE_SYS_PARAM_H
47 |
48 | /* Define if you have the header file. */
49 | #undef HAVE_SYS_SOCKET_H
50 |
51 | /* Define if you have the header file. */
52 | #undef HAVE_SYS_STAT_H
53 |
54 | /* Define if you have the header file. */
55 | #undef HAVE_SYS_TIME_H
56 |
57 | /* Define if you have the header file. */
58 | #undef HAVE_SYS_TYPES_H
59 |
60 | /* Define if you have the header file. */
61 | #undef HAVE_UNISTD_H
62 |
63 | /* Define if va_arg(arg, long double) crashes the compiler */
64 | #undef HAVE_VA_ARG_LONG_DOUBLE_BUG
65 |
66 | /* Define if you have the ANSI C header files. */
67 | #undef STDC_HEADERS
68 |
69 | /* Define if cross-process locking is required by accept() */
70 | #undef USE_LOCKING
71 |
72 | /* Define to empty if `const' does not conform to ANSI C. */
73 | #undef const
74 |
75 | /* Define to `int' if does not define. */
76 | #undef ssize_t
77 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","scripts\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time: 3.704
5 | OS script full time: 3.716198 secs
6 | gc time: 0.000153 secs (0.00%)
7 |
8 | === MOVE, executed count: 12560282
9 | sum time: 0.419789 secs (11.30%), avg time of 100000 times: 0.003342
10 |
11 | === GET_PROPERTY, executed count: 10447693
12 | sum time: 0.373902 secs (10.06%), avg time of 100000 times: 0.003579
13 |
14 | === SET_PROPERTY, executed count: 9762270
15 | sum time: 0.350196 secs (9.42%), avg time of 100000 times: 0.003587
16 |
17 | === MOVE2, executed count: 8131546
18 | sum time: 0.303394 secs (8.16%), avg time of 100000 times: 0.003731
19 |
20 | === JUMP, executed count: 8092648
21 | sum time: 0.278831 secs (7.50%), avg time of 100000 times: 0.003445
22 |
23 | === ADD, executed count: 7304969
24 | sum time: 0.278389 secs (7.49%), avg time of 100000 times: 0.003811
25 |
26 | === LOGIC_GE, executed count: 3722222
27 | sum time: 0.143661 secs (3.87%), avg time of 100000 times: 0.003860
28 |
29 | === LOGIC_GREATER, executed count: 3565459
30 | sum time: 0.130348 secs (3.51%), avg time of 100000 times: 0.003656
31 |
32 | === SUB, executed count: 3443808
33 | sum time: 0.121857 secs (3.28%), avg time of 100000 times: 0.003538
34 |
35 | === LOGIC_EQ, executed count: 2977124
36 | sum time: 0.113839 secs (3.06%), avg time of 100000 times: 0.003824
37 |
38 | === MUL, executed count: 322560
39 | sum time: 0.011062 secs (0.30%), avg time of 100000 times: 0.003430
40 |
41 | === NEG, executed count: 181440
42 | sum time: 0.007159 secs (0.19%), avg time of 100000 times: 0.003946
43 |
44 | === NEW_FUNCTION, executed count: 4
45 | sum time: 0.000009 secs (0.00%), avg time of 100000 times: 0.230916
46 |
47 | === NEW_OBJECT, executed count: 2
48 | sum time: 0.000004 secs (0.00%), avg time of 100000 times: 0.205259
49 |
50 | === RETURN, executed count: 6
51 | sum time: 0.000002 secs (0.00%), avg time of 100000 times: 0.034210
52 |
53 | === NEW_ARRAY, executed count: 3
54 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.034210
55 |
56 | === LOGIC_BOOL, executed count: 4
57 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.012829
58 |
59 | === CALL, executed count: 3
60 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.017105
61 |
62 | === ALL OPCODES, executed count: 70512057
63 | sum time: 2.532446 secs (68.15%), avg time of 100000 times: 0.003592
64 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/examples/echo-x.c:
--------------------------------------------------------------------------------
1 | /*
2 | * echo2.c --
3 | *
4 | * Produce a page containing all the inputs (fcgiapp version)
5 | *
6 | *
7 | * Copyright (c) 1996 Open Market, Inc.
8 | *
9 | * See the file "LICENSE.TERMS" for information on usage and redistribution
10 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 | *
12 | */
13 | #ifndef lint
14 | static const char rcsid[] = "$Id: echo-x.c,v 1.1 2001/06/19 15:06:17 robs Exp $";
15 | #endif /* not lint */
16 |
17 | #include "fcgi_config.h"
18 |
19 | #include
20 |
21 | #ifdef HAVE_UNISTD_H
22 | #include
23 | #endif
24 |
25 | #ifdef _WIN32
26 | #include
27 | #else
28 | extern char **environ;
29 | #endif
30 |
31 | #include "fcgiapp.h"
32 |
33 | static void PrintEnv(FCGX_Stream *out, char *label, char **envp)
34 | {
35 | FCGX_FPrintF(out, "%s: \n\n", label);
36 | for( ; *envp != NULL; envp++) {
37 | FCGX_FPrintF(out, "%s\n", *envp);
38 | }
39 | FCGX_FPrintF(out, " \n");
40 | }
41 |
42 | int main ()
43 | {
44 | FCGX_Stream *in, *out, *err;
45 | FCGX_ParamArray envp;
46 | int count = 0;
47 |
48 | while (FCGX_Accept(&in, &out, &err, &envp) >= 0) {
49 | char *contentLength = FCGX_GetParam("CONTENT_LENGTH", envp);
50 | int len = 0;
51 |
52 | FCGX_FPrintF(out,
53 | "Content-type: text/html\r\n"
54 | "\r\n"
55 | "
FastCGI echo (fcgiapp version) "
56 | "FastCGI echo (fcgiapp version) \n"
57 | "Request number %d, Process ID: %d\n", ++count, getpid());
58 |
59 | if (contentLength != NULL)
60 | len = strtol(contentLength, NULL, 10);
61 |
62 | if (len <= 0) {
63 | FCGX_FPrintF(out, "No data from standard input.
\n");
64 | }
65 | else {
66 | int i, ch;
67 |
68 | FCGX_FPrintF(out, "Standard input: \n
\n");
69 | for (i = 0; i < len; i++) {
70 | if ((ch = FCGX_GetChar(in)) < 0) {
71 | FCGX_FPrintF(out,
72 | "Error: Not enough bytes received on standard input\n");
73 | break;
74 | }
75 | FCGX_PutChar(ch, out);
76 | }
77 | FCGX_FPrintF(out, "\n
\n");
78 | }
79 |
80 | PrintEnv(out, "Request environment", envp);
81 | PrintEnv(out, "Initial environment", environ);
82 | } /* while */
83 |
84 | return 0;
85 | }
86 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-11-02.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","scripts\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 3.9093301312643041
5 | OS script full time: 3.918909 secs
6 | gc time: 0.000505 secs (0.01%)
7 |
8 | === SET_PROPERTY, executed count: 9762270
9 | sum time: 0.492232 secs (12.56%), avg time of 100000 times: 0.005042
10 |
11 | === MOVE, executed count: 12560269
12 | sum time: 0.433301 secs (11.06%), avg time of 100000 times: 0.003450
13 |
14 | === GET_PROPERTY, executed count: 10447693
15 | sum time: 0.391429 secs (9.99%), avg time of 100000 times: 0.003747
16 |
17 | === MOVE2, executed count: 8131552
18 | sum time: 0.308502 secs (7.87%), avg time of 100000 times: 0.003794
19 |
20 | === JUMP, executed count: 8092648
21 | sum time: 0.289668 secs (7.39%), avg time of 100000 times: 0.003579
22 |
23 | === ADD, executed count: 7304969
24 | sum time: 0.277980 secs (7.09%), avg time of 100000 times: 0.003805
25 |
26 | === LOGIC_GE, executed count: 3722222
27 | sum time: 0.153433 secs (3.92%), avg time of 100000 times: 0.004122
28 |
29 | === LOGIC_GREATER, executed count: 3565459
30 | sum time: 0.134907 secs (3.44%), avg time of 100000 times: 0.003784
31 |
32 | === SUB, executed count: 3443808
33 | sum time: 0.129066 secs (3.29%), avg time of 100000 times: 0.003748
34 |
35 | === LOGIC_EQ, executed count: 2977124
36 | sum time: 0.118636 secs (3.03%), avg time of 100000 times: 0.003985
37 |
38 | === MUL, executed count: 322560
39 | sum time: 0.011449 secs (0.29%), avg time of 100000 times: 0.003549
40 |
41 | === NEG, executed count: 181440
42 | sum time: 0.006829 secs (0.17%), avg time of 100000 times: 0.003764
43 |
44 | === NEW_FUNCTION, executed count: 4
45 | sum time: 0.000010 secs (0.00%), avg time of 100000 times: 0.256576
46 |
47 | === RETURN, executed count: 6
48 | sum time: 0.000004 secs (0.00%), avg time of 100000 times: 0.068420
49 |
50 | === NEW_ARRAY, executed count: 3
51 | sum time: 0.000002 secs (0.00%), avg time of 100000 times: 0.068420
52 |
53 | === NEW_OBJECT, executed count: 2
54 | sum time: 0.000002 secs (0.00%), avg time of 100000 times: 0.076973
55 |
56 | === CALL_METHOD, executed count: 8
57 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.012829
58 |
59 | === LOGIC_BOOL, executed count: 4
60 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.012829
61 |
62 | === GET_UPVALUE, executed count: 5
63 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.010263
64 |
65 | === CALL, executed count: 3
66 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.017105
67 |
68 | === ALL OPCODES, executed count: 70512049
69 | sum time: 2.747452 secs (70.11%), avg time of 100000 times: 0.003896
70 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-31.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","scripts\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 3.9480264170694914
5 | OS script full time: 3.958531 secs
6 | gc time: 0.000374 secs (0.01%)
7 |
8 | === SET_PROPERTY, executed count: 9762270
9 | sum time: 0.474486 secs (11.99%), avg time of 100000 times: 0.004860
10 |
11 | === MOVE, executed count: 12560269
12 | sum time: 0.417746 secs (10.55%), avg time of 100000 times: 0.003326
13 |
14 | === GET_PROPERTY, executed count: 10447693
15 | sum time: 0.398955 secs (10.08%), avg time of 100000 times: 0.003819
16 |
17 | === MOVE2, executed count: 8131552
18 | sum time: 0.295578 secs (7.47%), avg time of 100000 times: 0.003635
19 |
20 | === JUMP, executed count: 8092648
21 | sum time: 0.281708 secs (7.12%), avg time of 100000 times: 0.003481
22 |
23 | === ADD, executed count: 7304969
24 | sum time: 0.270679 secs (6.84%), avg time of 100000 times: 0.003705
25 |
26 | === LOGIC_GE, executed count: 3722222
27 | sum time: 0.202268 secs (5.11%), avg time of 100000 times: 0.005434
28 |
29 | === LOGIC_GREATER, executed count: 3565459
30 | sum time: 0.167671 secs (4.24%), avg time of 100000 times: 0.004703
31 |
32 | === LOGIC_EQ, executed count: 2977124
33 | sum time: 0.161269 secs (4.07%), avg time of 100000 times: 0.005417
34 |
35 | === SUB, executed count: 3443808
36 | sum time: 0.120856 secs (3.05%), avg time of 100000 times: 0.003509
37 |
38 | === MUL, executed count: 322560
39 | sum time: 0.011022 secs (0.28%), avg time of 100000 times: 0.003417
40 |
41 | === NEG, executed count: 181440
42 | sum time: 0.010264 secs (0.26%), avg time of 100000 times: 0.005657
43 |
44 | === NEW_FUNCTION, executed count: 4
45 | sum time: 0.000012 secs (0.00%), avg time of 100000 times: 0.295062
46 |
47 | === RETURN, executed count: 6
48 | sum time: 0.000003 secs (0.00%), avg time of 100000 times: 0.051315
49 |
50 | === NEW_ARRAY, executed count: 3
51 | sum time: 0.000003 secs (0.00%), avg time of 100000 times: 0.085525
52 |
53 | === NEW_OBJECT, executed count: 2
54 | sum time: 0.000003 secs (0.00%), avg time of 100000 times: 0.128288
55 |
56 | === GET_UPVALUE, executed count: 5
57 | sum time: 0.000002 secs (0.00%), avg time of 100000 times: 0.030789
58 |
59 | === CALL_METHOD, executed count: 8
60 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.006414
61 |
62 | === CALL, executed count: 3
63 | sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.017105
64 |
65 | === LOGIC_PTR_EQ, executed count: 0
66 | sum time: 0.000000 secs (0.00%), avg time of 100000 times: -1.#IND00
67 |
68 | === ALL OPCODES, executed count: 70512049
69 | sum time: 2.812523 secs (71.05%), avg time of 100000 times: 0.003989
70 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/perl/README:
--------------------------------------------------------------------------------
1 | $Id: README,v 1.7 2001/10/04 08:08:34 skimo Exp $
2 |
3 | Copyright (c) 1996 Open Market, Inc.
4 | See the file "LICENSE.TERMS" for information on usage and redistribution
5 | of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6 |
7 | Copyright (c) 1996-1998 Sven Verdoolaege
8 | No additional restrictions/warranties.
9 |
10 | This is a Fast CGI module for perl. It's based on the FCGI module
11 | that comes with Open Market's FastCGI Developer's Kit, but does
12 | not require you to recompile perl.
13 |
14 | It even no longer requires perl to be compiled with sfio.
15 | To compile with sfio you'll need at least perl 5.003_02 and you'll have
16 | to have configured it with eg './Configure -Duseperlio -Dusesfio'.
17 | (See the INSTALL file that comes with the perl distribution.)
18 | To compile without sfio you'll need an even more recent perl version.
19 | (perl 5.004 and up should be fine.)
20 |
21 | See http://www.fastcgi.com/ for more information about fastcgi.
22 | Lincoln D. Stein's perl CGI module also contains some information
23 | about fastcgi programming.
24 |
25 | See echo.fpl for an example on how to use this module.
26 |
27 | To install, do the usual
28 |
29 | perl Makefile.PL
30 | make
31 | make install
32 |
33 | If you want to use the (experimental) pure perl version, that
34 | doesn't require a compiler and currently only works on Unix,
35 | you have to pass the --pure-perl option as in
36 | "perl Makefile.PL --pure-perl".
37 |
38 | Note that the pure version does not support Window's Named Pipes.
39 | Support for Named Pipes is not a requirement of the FastCGI specification.
40 | Named Pipes are used by mod_fastcgi and the FastCGI application library as a
41 | replacement for Unix sockets. mod_fastcgi uses Named Pipes on Windows (Unix
42 | sockets on Unix) by default (see the mod_fastcgi docs for more information).
43 |
44 | If you want the module to use a previously installed fcgi library
45 | instead of the included files, use the --use-installed option,
46 | optionally followed by the name of the directory in which it can
47 | be found.
48 |
49 | To configure the library Makefile.PL will run ./configure .
50 | You may want to run it yourself beforehand because its findings
51 | may not always be correct.
52 | The configure.readme file describes how to run ./configure (and only that).
53 |
54 | If you're on a solaris system and your installed fcgi library is 2.02b
55 | or earlier, you'll probably want to use the included files.
56 |
57 | The old interface of the FCGI module installs die and warn
58 | handlers that merely print the error/warning to STDERR (the
59 | default handlers print directly to stderr, which isn't redirected
60 | in the non sfio case). I'm not very happy with the result.
61 | Suggestions welcome.
62 |
63 | Sven Verdoolaege
64 | skimo@kotnet.org
65 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/profile-2012-10-03-#5.txt:
--------------------------------------------------------------------------------
1 | {-1:"..\\Release\\profile_benchmark.exe","scripts\\test_fannkuch.os","9"}
2 | 8629
3 | Pfannkuchen(9) = 30
4 | time = 4.67277
5 | OS script full time: 4.676206 secs
6 | gc time: 0.000155 secs (0.00%)
7 |
8 | === PUSH_LOCAL_VAR, executed count: 11364021
9 | sum time: 0.396540 secs (8.48%), avg time of 100000 times: 0.003489
10 |
11 | === SET_LOCAL_VAR_1_BY_BIN_OPERATOR_LOCAL_AND_NUMBER, executed count: 8775837
12 | sum time: 0.341766 secs (7.31%), avg time of 100000 times: 0.003894
13 |
14 | === SET_LOCAL_VAR_1, executed count: 9641559
15 | sum time: 0.325513 secs (6.96%), avg time of 100000 times: 0.003376
16 |
17 | === SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 6376814
18 | sum time: 0.318573 secs (6.81%), avg time of 100000 times: 0.004996
19 |
20 | === BIN_OPERATOR_BY_LOCAL_AND_NUMBER, executed count: 6137238
21 | sum time: 0.300288 secs (6.42%), avg time of 100000 times: 0.004893
22 |
23 | === GET_PROPERTY_BY_LOCALS, executed count: 6438708
24 | sum time: 0.285073 secs (6.10%), avg time of 100000 times: 0.004427
25 |
26 | === JUMP_1, executed count: 7548329
27 | sum time: 0.264091 secs (5.65%), avg time of 100000 times: 0.003499
28 |
29 | === IF_NOT_JUMP_1, executed count: 6659026
30 | sum time: 0.229704 secs (4.91%), avg time of 100000 times: 0.003450
31 |
32 | === GET_SET_PROPERTY_BY_LOCALS_AUTO_CREATE, executed count: 2580480
33 | sum time: 0.210167 secs (4.49%), avg time of 100000 times: 0.008144
34 |
35 | === BIN_OPERATOR_BY_LOCALS, executed count: 3967229
36 | sum time: 0.178382 secs (3.81%), avg time of 100000 times: 0.004496
37 |
38 | === IF_JUMP_1, executed count: 3242899
39 | sum time: 0.119530 secs (2.56%), avg time of 100000 times: 0.003686
40 |
41 | === LOGIC_GE, executed count: 2133277
42 | sum time: 0.112193 secs (2.40%), avg time of 100000 times: 0.005259
43 |
44 | === PUSH_NUMBER, executed count: 3123505
45 | sum time: 0.110322 secs (2.36%), avg time of 100000 times: 0.003532
46 |
47 | === GET_PROPERTY_BY_LOCAL_AND_NUMBER, executed count: 1167849
48 | sum time: 0.078407 secs (1.68%), avg time of 100000 times: 0.006714
49 |
50 | === POP, executed count: 1588945
51 | sum time: 0.055774 secs (1.19%), avg time of 100000 times: 0.003510
52 |
53 | === SET_PROPERTY, executed count: 804974
54 | sum time: 0.040658 secs (0.87%), avg time of 100000 times: 0.005051
55 |
56 | === PUSH_LOCAL_VAR_AUTO_CREATE, executed count: 804969
57 | sum time: 0.029039 secs (0.62%), avg time of 100000 times: 0.003607
58 |
59 | === GET_PROPERTY, executed count: 260644
60 | sum time: 0.017910 secs (0.38%), avg time of 100000 times: 0.006871
61 |
62 | === JUMP_2, executed count: 544319
63 | sum time: 0.016386 secs (0.35%), avg time of 100000 times: 0.003010
64 |
65 | === ADD, executed count: 322560
66 | sum time: 0.016078 secs (0.34%), avg time of 100000 times: 0.004985
67 |
68 | === ALL OPCODES, executed count: 84027573
69 | sum time: 3.468615 secs (74.18%), avg time of 100000 times: 0.004128
70 |
--------------------------------------------------------------------------------
/source/os-binder-arg-cc-functions.h:
--------------------------------------------------------------------------------
1 | /*
2 | AUTO-GENERATED FILE. DO NOT MODIFY.
3 |
4 | Note: this header is a header template
5 | and must NOT have multiple-inclusion protection.
6 | */
7 |
8 | /******************************************************************************
9 | * Copyright (C) 2012 Evgeniy Golovin (evgeniy.golovin@unitpoint.ru)
10 | *
11 | * Latest source code: https://github.com/unitpoint/objectscript
12 | *
13 | * Permission is hereby granted, free of charge, to any person obtaining
14 | * a copy of this software and associated documentation files (the
15 | * "Software"), to deal in the Software without restriction, including
16 | * without limitation the rights to use, copy, modify, merge, publish,
17 | * distribute, sublicense, and/or sell copies of the Software, and to
18 | * permit persons to whom the Software is furnished to do so, subject to
19 | * the following conditions:
20 | *
21 | * The above copyright notice and this permission notice shall be
22 | * included in all copies or substantial portions of the Software.
23 | *
24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
28 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
29 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
30 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 | ******************************************************************************/
32 |
33 | #define OS_BIND_FUNC_NUM_ARGS 0
34 | #include "os-binder-cc-functions.h"
35 | #undef OS_BIND_FUNC_NUM_ARGS
36 |
37 | #define OS_BIND_FUNC_NUM_ARGS 1
38 | #include "os-binder-cc-functions.h"
39 | #undef OS_BIND_FUNC_NUM_ARGS
40 |
41 | #define OS_BIND_FUNC_NUM_ARGS 2
42 | #include "os-binder-cc-functions.h"
43 | #undef OS_BIND_FUNC_NUM_ARGS
44 |
45 | #define OS_BIND_FUNC_NUM_ARGS 3
46 | #include "os-binder-cc-functions.h"
47 | #undef OS_BIND_FUNC_NUM_ARGS
48 |
49 | #define OS_BIND_FUNC_NUM_ARGS 4
50 | #include "os-binder-cc-functions.h"
51 | #undef OS_BIND_FUNC_NUM_ARGS
52 |
53 | #define OS_BIND_FUNC_NUM_ARGS 5
54 | #include "os-binder-cc-functions.h"
55 | #undef OS_BIND_FUNC_NUM_ARGS
56 |
57 | #define OS_BIND_FUNC_NUM_ARGS 6
58 | #include "os-binder-cc-functions.h"
59 | #undef OS_BIND_FUNC_NUM_ARGS
60 |
61 | #define OS_BIND_FUNC_NUM_ARGS 7
62 | #include "os-binder-cc-functions.h"
63 | #undef OS_BIND_FUNC_NUM_ARGS
64 |
65 | #define OS_BIND_FUNC_NUM_ARGS 8
66 | #include "os-binder-cc-functions.h"
67 | #undef OS_BIND_FUNC_NUM_ARGS
68 |
69 | #define OS_BIND_FUNC_NUM_ARGS 9
70 | #include "os-binder-cc-functions.h"
71 | #undef OS_BIND_FUNC_NUM_ARGS
72 |
73 | #define OS_BIND_FUNC_NUM_ARGS 10
74 | #include "os-binder-cc-functions.h"
75 | #undef OS_BIND_FUNC_NUM_ARGS
76 |
77 | #define OS_BIND_FUNC_NUM_ARGS 11
78 | #include "os-binder-cc-functions.h"
79 | #undef OS_BIND_FUNC_NUM_ARGS
80 |
81 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/configure.in:
--------------------------------------------------------------------------------
1 | dnl $Id: configure.in,v 1.27 2003/06/22 02:15:10 robs Exp $
2 | dnl
3 | dnl This file is an input file used by the GNU "autoconf" program to
4 | dnl generate the file "configure", which is run during the build
5 | dnl to configure the system for the local environment.
6 |
7 | AC_INIT
8 | AM_INIT_AUTOMAKE(fcgi, 2.4.1-SNAP-0311112127)
9 |
10 | AM_CONFIG_HEADER(fcgi_config.h)
11 |
12 | AC_PROG_CC
13 | AC_PROG_CPP
14 | AC_PROG_INSTALL
15 | AC_PROG_LIBTOOL
16 |
17 | AC_PROG_CXX
18 |
19 | AC_LANG([C++])
20 |
21 | dnl autoconf defaults CXX to 'g++', so its unclear whether it exists/works
22 | AC_MSG_CHECKING([whether $CXX works])
23 | AC_TRY_COMPILE([#include ],
24 | [std::cout << "ok";],
25 | [AC_MSG_RESULT(yes)
26 | LIBFCGIXX=libfcgi++.la
27 | ECHO_CPP=echo-cpp${EXEEXT}
28 | AC_MSG_CHECKING([whether cin has a streambuf assignment operator])
29 | AC_TRY_COMPILE([#include ],
30 | [cin = static_cast(0);],
31 | [AC_MSG_RESULT(yes)
32 | AC_DEFINE([HAVE_IOSTREAM_WITHASSIGN_STREAMBUF], [1],
33 | [Define if cin/cout/cerr has a streambuf assignment operator])],
34 | [AC_MSG_RESULT(no)])
35 | AC_MSG_CHECKING([whether char_type is defined in the context of streambuf])
36 | AC_TRY_COMPILE([#include ],
37 | [class fcgi_streambuf : public std::streambuf { char_type ct; }],
38 | [AC_MSG_RESULT(yes)
39 | AC_DEFINE([HAVE_STREAMBUF_CHAR_TYPE], [1],
40 | [Define if char_type is defined in the context of streambuf])],
41 | [AC_MSG_RESULT(no)])],
42 | [AC_MSG_RESULT(no)])
43 | AC_SUBST(LIBFCGIXX)
44 | AC_SUBST(ECHO_CPP)
45 |
46 | AC_LANG([C])
47 |
48 | AC_CHECK_LIB([nsl], [gethostbyname])
49 | AC_CHECK_LIB([socket], [socket])
50 |
51 | ACX_PTHREAD([THREADED=threaded${EXEEXT}])
52 | AC_SUBST([THREADED])
53 |
54 | FCGI_COMMON_CHECKS
55 |
56 | AC_REPLACE_FUNCS([strerror])
57 |
58 | AC_C_INLINE
59 |
60 | #--------------------------------------------------------------------
61 | # This is a little hokie in that it avoids including config.guess
62 | # and config.sub in the distribution, but its been working so far.
63 | # Windows builds don't run configure so we should be safe fixing
64 | # this to 'unix' (at least for now).
65 | #--------------------------------------------------------------------
66 | SYSTEM=unix
67 | AC_SUBST([SYSTEM])
68 |
69 | AC_PROG_CC_WARNINGS
70 |
71 | AC_CONFIG_FILES([Makefile
72 | cgi-fcgi/Makefile
73 | include/Makefile
74 | libfcgi/Makefile
75 | examples/Makefile])
76 |
77 | AC_OUTPUT
78 |
--------------------------------------------------------------------------------
/proj.win32/stack_usage/stack_usage.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "../../source/objectscript.h"
3 |
4 | using namespace ObjectScript;
5 |
6 | int _tmain(int argc, _TCHAR* argv[])
7 | {
8 | // craete ObjectScript instance
9 | OS * os = OS::create();
10 |
11 | /*
12 | Part 1: let's simulate following OS code:
13 |
14 | print("10 * (3+2) = ", 10 * (3+2))
15 | */
16 | // prepare function call
17 | os->getGlobal("print"); // #1 - stack values, it's print function from standart library
18 | os->pushNull(); // #2 - null, it's function this, each call of function must have this
19 | // push the first argument
20 | os->pushString("10 * (3+2) = "); // #3 - we have 3 stack values here
21 | // prepare second argument
22 | os->pushNumber(10); // #4
23 | os->pushNumber(3); // #5
24 | os->pushNumber(2); // #6
25 | os->runOp(OP_ADD); // #5 - 3+2
26 | os->runOp(OP_MUL); // #4 - 10 * (3+2)
27 | // we have 4 stack values here:
28 | // #1 - function
29 | // #2 - function this, it's null here
30 | // #3 - string "10 * (3+2) = "
31 | // #4 - number, it's result of 10 * (3+2), it's 50
32 | // we are ready to call function with arguments
33 | os->call(2); // call function with 2 arguments
34 | // #0 - called function remove all used stack values
35 | // please see console to view output of this example
36 |
37 | /*
38 | Part 2: let's simulate following OS code:
39 |
40 | bar = {firsname="James", lastname="Bond"}
41 | bar.profession = "actor"
42 | print bar
43 | */
44 |
45 | os->newObject(); // #1 - new object
46 |
47 | os->pushStackValue(-1); // #2 - the same object, -1 - is relative pointer to the top stack value
48 | os->pushString("firsname"); // #3 - property key
49 | os->pushString("James"); // #4 - property value
50 | os->setProperty(); // #1 - setProperty uses 3 stack values and pop them
51 |
52 | // second way of same functionality
53 | os->pushString("Bond"); // #2 - property value
54 | os->setProperty(-2, "lastname"); // #1
55 |
56 | os->setGlobal("bar"); // #0 - assign object value to global bar variable, pop value
57 |
58 | // let's do bar.profession = "actor"
59 | os->getGlobal("bar"); // #1 - our global a variable
60 | os->pushString("actor"); // #2 - property value
61 | os->setProperty(-2, "profession"); // #1
62 | os->pop(); // #0
63 |
64 | // let's do print bar
65 | os->getGlobal("print"); // #1
66 | os->pushNull(); // #2
67 | os->getGlobal("bar"); // #3
68 | os->call(1); // #0
69 |
70 | /*
71 | Part 3: let's simulate following OS code:
72 |
73 | print(concat(5, " big differences"))
74 | */
75 | os->getGlobal("print"); // #1 - print function
76 | os->pushNull(); // #2 - this for print
77 | os->getGlobal("concat"); // #3 - concat function
78 | os->pushNull(); // #4 - this for concat
79 | os->pushNumber(5); // #5
80 | os->pushString(" big differences"); // #6
81 | // call concat function with 2 arguments and 1 requested result value
82 | // the call pops 2 arguments + 1 this + 1 function and pushes 1 result value
83 | os->call(2, 1); // #3 - result is already at the top of stack
84 | // call print function with 1 arguments and 0 requested result values
85 | os->call(1); // #0
86 |
87 | // release the ObjectScript instance
88 | os->release();
89 | return 0;
90 | }
91 |
92 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/compile:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | # Wrapper for compilers which do not understand `-c -o'.
4 |
5 | # Copyright 1999, 2000 Free Software Foundation, Inc.
6 | # Written by Tom Tromey .
7 | #
8 | # This program is free software; you can redistribute it and/or modify
9 | # it under the terms of the GNU General Public License as published by
10 | # the Free Software Foundation; either version 2, or (at your option)
11 | # any later version.
12 | #
13 | # This program is distributed in the hope that it will be useful,
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | # GNU General Public License for more details.
17 | #
18 | # You should have received a copy of the GNU General Public License
19 | # along with this program; if not, write to the Free Software
20 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 |
22 | # As a special exception to the GNU General Public License, if you
23 | # distribute this file as part of a program that contains a
24 | # configuration script generated by Autoconf, you may include it under
25 | # the same distribution terms that you use for the rest of that program.
26 |
27 | # Usage:
28 | # compile PROGRAM [ARGS]...
29 | # `-o FOO.o' is removed from the args passed to the actual compile.
30 |
31 | prog=$1
32 | shift
33 |
34 | ofile=
35 | cfile=
36 | args=
37 | while test $# -gt 0; do
38 | case "$1" in
39 | -o)
40 | # configure might choose to run compile as `compile cc -o foo foo.c'.
41 | # So we do something ugly here.
42 | ofile=$2
43 | shift
44 | case "$ofile" in
45 | *.o | *.obj)
46 | ;;
47 | *)
48 | args="$args -o $ofile"
49 | ofile=
50 | ;;
51 | esac
52 | ;;
53 | *.c)
54 | cfile=$1
55 | args="$args $1"
56 | ;;
57 | *)
58 | args="$args $1"
59 | ;;
60 | esac
61 | shift
62 | done
63 |
64 | if test -z "$ofile" || test -z "$cfile"; then
65 | # If no `-o' option was seen then we might have been invoked from a
66 | # pattern rule where we don't need one. That is ok -- this is a
67 | # normal compilation that the losing compiler can handle. If no
68 | # `.c' file was seen then we are probably linking. That is also
69 | # ok.
70 | exec "$prog" $args
71 | fi
72 |
73 | # Name of file we expect compiler to create.
74 | cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
75 |
76 | # Create the lock directory.
77 | # Note: use `[/.-]' here to ensure that we don't use the same name
78 | # that we are using for the .o file. Also, base the name on the expected
79 | # object file name, since that is what matters with a parallel build.
80 | lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
81 | while true; do
82 | if mkdir $lockdir > /dev/null 2>&1; then
83 | break
84 | fi
85 | sleep 1
86 | done
87 | # FIXME: race condition here if user kills between mkdir and trap.
88 | trap "rmdir $lockdir; exit 1" 1 2 15
89 |
90 | # Run the compile.
91 | "$prog" $args
92 | status=$?
93 |
94 | if test -f "$cofile"; then
95 | mv "$cofile" "$ofile"
96 | fi
97 |
98 | rmdir $lockdir
99 | exit $status
100 |
--------------------------------------------------------------------------------
/proj.win32/os/os.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "windows.h"
3 | #include "../../source/objectscript.h"
4 | #include "../../source/os-binder.h"
5 |
6 | using namespace ObjectScript;
7 |
8 | static double inv_frequency = 0.0;
9 | static double start_time = 0.0;
10 |
11 | struct __init_time__
12 | {
13 | __init_time__()
14 | {
15 | LARGE_INTEGER largeInteger;
16 |
17 | if(inv_frequency == 0.0f){
18 | QueryPerformanceFrequency(&largeInteger);
19 | inv_frequency = double(largeInteger.QuadPart);
20 | if(inv_frequency > 0.0f){
21 | inv_frequency = 1.0f / inv_frequency;
22 | }
23 | }
24 |
25 | QueryPerformanceCounter(&largeInteger);
26 | start_time = double(largeInteger.QuadPart);
27 | }
28 | } __init_time__;
29 |
30 | OS::String getString(OS * os, const _TCHAR * str)
31 | {
32 | OS_CHAR buf[1024*10];
33 | int i = 0;
34 | for(; str[i]; i++){
35 | buf[i] = (OS_CHAR)str[i];
36 | }
37 | buf[i] = 0;
38 | return OS::String(os, buf);
39 | }
40 |
41 | double getTimeSec()
42 | {
43 | LARGE_INTEGER largeInteger;
44 | QueryPerformanceCounter(&largeInteger);
45 | double count = double(largeInteger.QuadPart);
46 | return inv_frequency * (count - start_time);
47 | }
48 |
49 | int _tmain(int argc, _TCHAR* argv[])
50 | {
51 | if(argc < 2){
52 | printf("ObjctScript " OS_VERSION " Copyright (C) 2012 Evgeniy Golovin (evgeniy.golovin@unitpoint.ru)\n");
53 | printf("Latest version and source code: https://github.com/unitpoint/objectscript\n");
54 | printf("\n");
55 | printf("Usage: %s script [args]\n", argv[0]);
56 | exit(1);
57 | }
58 |
59 | // craete ObjectScript instance
60 | OS * os = OS::create();
61 | // save allocated memory at start point
62 | int start_mem_usage = os->getAllocatedBytes();
63 | // set needed settings
64 | os->setSetting(OS_SETTING_CREATE_DEBUG_INFO, true);
65 | os->setSetting(OS_SETTING_CREATE_DEBUG_OPCODES, true);
66 | os->setSetting(OS_SETTING_CREATE_COMPILED_FILE, true);
67 | // create program arguments
68 | os->newObject();
69 | for(int i = 0; i < argc; i++){
70 | os->pushStackValue(-1);
71 | os->pushNumber(i-1);
72 | os->pushString(getString(os, argv[i]));
73 | os->setProperty();
74 | }
75 | // we can use the program arguments as global arg variable inside of our script
76 | os->setGlobal("arg");
77 | // set global getTimeSec function so we can check time inside of our script
78 | os->setGlobal(def("getTimeSec", getTimeSec));
79 | // run main stript
80 | os->require(getString(os, argv[1]));
81 | // os->compileFile(getString(os, argv[1]));
82 | {
83 | int mem_allocated = os->getAllocatedBytes()/1024;
84 | int mem_cached = os->getCachedBytes()/1024;
85 | // run gc full step
86 | os->gcFull();
87 | int after_mem_allocated = os->getAllocatedBytes()/1024;
88 | int after_mem_cached = os->getCachedBytes()/1024;
89 | // output some debug memory usage info
90 | printf("\n\n[before GC] memory used: %d Kb, cached: %d Kb, allocated: %d Kb\n[after GC] memory used: %d Kb, cached: %d Kb, allocated: %d Kb\n",
91 | mem_allocated - mem_cached,
92 | mem_cached,
93 | mem_allocated,
94 | after_mem_allocated - after_mem_cached,
95 | after_mem_cached,
96 | after_mem_allocated
97 | );
98 | #ifdef OS_DEBUG
99 | printf("\nNotice: debug build uses much more memory than release build\n");
100 | #endif
101 | }
102 | // release the ObjectScript instance
103 | os->release();
104 | return 0;
105 | }
106 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/Win32/FastCGI.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual C++ Express 2010
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "authorizer", "authorizer.vcxproj", "{B8466FA5-17D6-779C-A5E2-98D22B64C955}"
5 | ProjectSection(ProjectDependencies) = postProject
6 | {3484A592-4B75-1DC7-BADE-AD34A5FE6D64} = {3484A592-4B75-1DC7-BADE-AD34A5FE6D64}
7 | EndProjectSection
8 | EndProject
9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "config_h", "config_h.vcxproj", "{E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07}"
10 | EndProject
11 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echo_cpp", "echo-cpp.vcxproj", "{7846B5ED-9061-3655-373D-E84E2CCF578E}"
12 | ProjectSection(ProjectDependencies) = postProject
13 | {3484A592-4B75-1DC7-BADE-AD34A5FE6D64} = {3484A592-4B75-1DC7-BADE-AD34A5FE6D64}
14 | EndProjectSection
15 | EndProject
16 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfcgi", "libfcgi.vcxproj", "{3484A592-4B75-1DC7-BADE-AD34A5FE6D64}"
17 | ProjectSection(ProjectDependencies) = postProject
18 | {E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07} = {E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07}
19 | EndProjectSection
20 | EndProject
21 | Global
22 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
23 | Debug|Win32 = Debug|Win32
24 | Release|Win32 = Release|Win32
25 | Template|Win32 = Template|Win32
26 | EndGlobalSection
27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
28 | {B8466FA5-17D6-779C-A5E2-98D22B64C955}.Debug|Win32.ActiveCfg = Debug|Win32
29 | {B8466FA5-17D6-779C-A5E2-98D22B64C955}.Debug|Win32.Build.0 = Debug|Win32
30 | {B8466FA5-17D6-779C-A5E2-98D22B64C955}.Release|Win32.ActiveCfg = Release|Win32
31 | {B8466FA5-17D6-779C-A5E2-98D22B64C955}.Release|Win32.Build.0 = Release|Win32
32 | {B8466FA5-17D6-779C-A5E2-98D22B64C955}.Template|Win32.ActiveCfg = Release|Win32
33 | {B8466FA5-17D6-779C-A5E2-98D22B64C955}.Template|Win32.Build.0 = Release|Win32
34 | {E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07}.Debug|Win32.ActiveCfg = Debug|Win32
35 | {E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07}.Debug|Win32.Build.0 = Debug|Win32
36 | {E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07}.Release|Win32.ActiveCfg = Release|Win32
37 | {E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07}.Release|Win32.Build.0 = Release|Win32
38 | {E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07}.Template|Win32.ActiveCfg = Template|Win32
39 | {E9A5653D-4A0E-ADE6-0BD2-81C2B0ADAC07}.Template|Win32.Build.0 = Template|Win32
40 | {7846B5ED-9061-3655-373D-E84E2CCF578E}.Debug|Win32.ActiveCfg = Debug|Win32
41 | {7846B5ED-9061-3655-373D-E84E2CCF578E}.Debug|Win32.Build.0 = Debug|Win32
42 | {7846B5ED-9061-3655-373D-E84E2CCF578E}.Release|Win32.ActiveCfg = Release|Win32
43 | {7846B5ED-9061-3655-373D-E84E2CCF578E}.Release|Win32.Build.0 = Release|Win32
44 | {7846B5ED-9061-3655-373D-E84E2CCF578E}.Template|Win32.ActiveCfg = Template|Win32
45 | {7846B5ED-9061-3655-373D-E84E2CCF578E}.Template|Win32.Build.0 = Template|Win32
46 | {3484A592-4B75-1DC7-BADE-AD34A5FE6D64}.Debug|Win32.ActiveCfg = Debug|Win32
47 | {3484A592-4B75-1DC7-BADE-AD34A5FE6D64}.Debug|Win32.Build.0 = Debug|Win32
48 | {3484A592-4B75-1DC7-BADE-AD34A5FE6D64}.Release|Win32.ActiveCfg = Release|Win32
49 | {3484A592-4B75-1DC7-BADE-AD34A5FE6D64}.Release|Win32.Build.0 = Release|Win32
50 | {3484A592-4B75-1DC7-BADE-AD34A5FE6D64}.Template|Win32.ActiveCfg = Template|Win32
51 | {3484A592-4B75-1DC7-BADE-AD34A5FE6D64}.Template|Win32.Build.0 = Template|Win32
52 | EndGlobalSection
53 | GlobalSection(SolutionProperties) = preSolution
54 | HideSolutionNode = FALSE
55 | EndGlobalSection
56 | EndGlobal
57 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/fcgi_config.h.in:
--------------------------------------------------------------------------------
1 | /* fcgi_config.h.in. Generated automatically from configure.in by autoheader. */
2 |
3 | /* Define if you have the header file. */
4 | #undef HAVE_ARPA_INET_H
5 |
6 | /* Define if you have the header file. */
7 | #undef HAVE_DLFCN_H
8 |
9 | /* Define if there's a fileno() prototype in stdio.h */
10 | #undef HAVE_FILENO_PROTO
11 |
12 | /* Define if the fpos_t typedef is in stdio.h */
13 | #undef HAVE_FPOS
14 |
15 | /* Define if you have the header file. */
16 | #undef HAVE_INTTYPES_H
17 |
18 | /* Define if cin/cout/cerr has a streambuf assignment operator */
19 | #undef HAVE_IOSTREAM_WITHASSIGN_STREAMBUF
20 |
21 | /* Define if you have the `nsl' library (-lnsl). */
22 | #undef HAVE_LIBNSL
23 |
24 | /* Define if you have the `socket' library (-lsocket). */
25 | #undef HAVE_LIBSOCKET
26 |
27 | /* Define if you have the header file. */
28 | #undef HAVE_LIMITS_H
29 |
30 | /* Define if you have the header file. */
31 | #undef HAVE_MEMORY_H
32 |
33 | /* Define if you have the header file. */
34 | #undef HAVE_NETDB_H
35 |
36 | /* Define if you have the header file. */
37 | #undef HAVE_NETINET_IN_H
38 |
39 | /* Define if you have POSIX threads libraries and header files. */
40 | #undef HAVE_PTHREAD
41 |
42 | /* Define if sockaddr_un in sys/un.h contains a sun_len component */
43 | #undef HAVE_SOCKADDR_UN_SUN_LEN
44 |
45 | /* Define if the socklen_t typedef is in sys/socket.h */
46 | #undef HAVE_SOCKLEN
47 |
48 | /* Define if you have the header file. */
49 | #undef HAVE_STDINT_H
50 |
51 | /* Define if you have the header file. */
52 | #undef HAVE_STDLIB_H
53 |
54 | /* Define if char_type is defined in the context of streambuf */
55 | #undef HAVE_STREAMBUF_CHAR_TYPE
56 |
57 | /* Define if you have the `strerror' function. */
58 | #undef HAVE_STRERROR
59 |
60 | /* Define if you have the header file. */
61 | #undef HAVE_STRINGS_H
62 |
63 | /* Define if you have the header file. */
64 | #undef HAVE_STRING_H
65 |
66 | /* Define if you have the header file. */
67 | #undef HAVE_SYS_PARAM_H
68 |
69 | /* Define if you have the header file. */
70 | #undef HAVE_SYS_SOCKET_H
71 |
72 | /* Define if you have the header file. */
73 | #undef HAVE_SYS_STAT_H
74 |
75 | /* Define if you have the header file. */
76 | #undef HAVE_SYS_TIME_H
77 |
78 | /* Define if you have the header file. */
79 | #undef HAVE_SYS_TYPES_H
80 |
81 | /* Define if you have the header file. */
82 | #undef HAVE_UNISTD_H
83 |
84 | /* Define if va_arg(arg, long double) crashes the compiler */
85 | #undef HAVE_VA_ARG_LONG_DOUBLE_BUG
86 |
87 | /* Name of package */
88 | #undef PACKAGE
89 |
90 | /* Define to the necessary symbol if this constant uses a non-standard name on
91 | your system. */
92 | #undef PTHREAD_CREATE_JOINABLE
93 |
94 | /* Define if you have the ANSI C header files. */
95 | #undef STDC_HEADERS
96 |
97 | /* Define if cross-process locking is required by accept() */
98 | #undef USE_LOCKING
99 |
100 | /* Version number of package */
101 | #undef VERSION
102 |
103 | /* Define to empty if `const' does not conform to ANSI C. */
104 | #undef const
105 |
106 | /* Define as `__inline' if that's what the C compiler calls it, or to nothing
107 | if it is not supported. */
108 | #undef inline
109 |
110 | /* Define to `int' if does not define. */
111 | #undef ssize_t
112 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/java/FCGIGlobalDefs.java:
--------------------------------------------------------------------------------
1 | /*
2 | * @(#)FCGIGlobalDefs.java
3 | *
4 | *
5 | * FastCGi compatibility package Interface
6 | *
7 | *
8 | * Copyright (c) 1996 Open Market, Inc.
9 | *
10 | * See the file "LICENSE.TERMS" for information on usage and redistribution
11 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 | *
13 | * $Id: FCGIGlobalDefs.java,v 1.3 2000/03/21 12:12:25 robs Exp $
14 | */
15 |
16 | /* This class contains FCGI global definitions corresponding to
17 | * the #defs in the C version.
18 | */
19 |
20 | package com.fastcgi;
21 |
22 | import java.io.PrintStream;
23 |
24 | public abstract class FCGIGlobalDefs
25 | {
26 | private static final String RCSID = "$Id: FCGIGlobalDefs.java,v 1.3 2000/03/21 12:12:25 robs Exp $";
27 |
28 | public static final int def_FCGIMaxLen = 0xffff;
29 | /*
30 | * Define Length of FCGI message bodies in bytes
31 | */
32 | public static final int def_FCGIHeaderLen = 8;
33 | public static final int def_FCGIEndReqBodyLen = 8;
34 | public static final int def_FCGIBeginReqBodyLen = 8;
35 | public static final int def_FCGIUnknownBodyTypeBodyLen = 8;
36 | /*
37 | * Header defines
38 | */
39 | public static int def_FCGIVersion1 = 1;
40 | /* FCGI Record Types */
41 | public static final int def_FCGIBeginRequest = 1;
42 | public static final int def_FCGIAbortRequest = 2;
43 | public static final int def_FCGIEndRequest = 3;
44 | public static final int def_FCGIParams = 4;
45 | public static final int def_FCGIStdin = 5;
46 | public static final int def_FCGIStdout = 6;
47 | public static final int def_FCGIStderr = 7;
48 | public static final int def_FCGIData = 8;
49 | public static final int def_FCGIGetValues = 9;
50 | public static final int def_FCGIGetValuesResult = 10;
51 | public static final int def_FCGIUnknownType = 11;
52 | public static final int def_FCGIMaxType = def_FCGIUnknownType;
53 | /* Request ID Values */
54 | public static final int def_FCGINullRequestID = 0;
55 | /*
56 | * Begin Request defines
57 | */
58 | /* Mask flags */
59 | public static int def_FCGIKeepConn = 1;
60 | /* Roles */
61 | public static final int def_FCGIResponder = 1;
62 | public static final int def_FCGIAuthorizer = 2;
63 | public static final int def_FCGIFilter = 3;
64 | /*
65 | * End Request defines
66 | */
67 | /* Protocol status */
68 | public static final int def_FCGIRequestComplete = 0;
69 | public static final int def_FCGICantMpxConn = 1;
70 | public static final int def_FCGIOverload = 2;
71 | public static final int def_FCGIUnknownRole = 3;
72 | /*
73 | * Get Values, Get Values Results defines
74 | */
75 | public static final String def_FCGIMaxConns = "FCGI_MAX_CONNS";
76 | public static final String def_FCGIMaxReqs = "FCGI_MAX_REQS";
77 | public static final String def_FCGIMpxsConns = "FCGI_MPXS_CONNS";
78 | /*
79 | * Return codes for Process* functions
80 | */
81 | public static final int def_FCGIStreamRecord = 0;
82 | public static final int def_FCGISkip = 1;
83 | public static final int def_FCGIBeginRecord = 2;
84 | public static final int def_FCGIMgmtRecord = 3;
85 | /*
86 | * Error Codes
87 | */
88 | public static final int def_FCGIUnsupportedVersion = -2;
89 | public static final int def_FCGIProtocolError = -3;
90 | public static final int def_FCGIParamsError = -4;
91 | public static final int def_FCGICallSeqError = -5;
92 | }
93 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/examples/authorizer/Debug/authorizer.Build.CppClean.log:
--------------------------------------------------------------------------------
1 | .\..\examples/authorizer/Debug\authorizer.bsc
2 | .\..\examples/authorizer/Debug\authorizer.ilk
3 | .\..\examples/authorizer/Debug\authorizer.pdb
4 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.BSC
5 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.EXE
6 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.EXE.EMBED.MANIFEST
7 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.EXE.EMBED.MANIFEST.RES
8 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.EXE.INTERMEDIATE.MANIFEST
9 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.ILK
10 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.OBJ
11 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.PDB
12 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\AUTHORIZER.SBR
13 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\authorizer.write.1.tlog
14 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\authorizer_manifest.rc
15 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\BscMake.command.1.tlog
16 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\bscmake.read.1.tlog
17 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\bscmake.write.1.tlog
18 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\cl.command.1.tlog
19 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\CL.read.1.tlog
20 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\CL.write.1.tlog
21 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link.11968.read.1.tlog
22 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link.11968.write.1.tlog
23 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link.11968-cvtres.read.1.tlog
24 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link.11968-cvtres.write.1.tlog
25 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link.command.1.tlog
26 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link.read.1.tlog
27 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link.write.1.tlog
28 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link-cvtres.read.1.tlog
29 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\link-cvtres.write.1.tlog
30 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\mt.command.1.tlog
31 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\mt.read.1.tlog
32 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\mt.write.1.tlog
33 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\rc.command.1.tlog
34 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\rc.read.1.tlog
35 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\rc.write.1.tlog
36 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\examples\authorizer\Debug\vc100.idb
37 | C:\SOURCES\OS\PROJ.WIN32\OS-INSIGHT\FCGI-2.4.1\EXAMPLES\AUTHORIZER\DEBUG\VC100.PDB
38 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\.\..\examples/authorizer/Debug\authorizer.exe
39 | C:\Sources\OS\proj.win32\os-insight\fcgi-2.4.1\Win32\.\..\examples/authorizer/Debug\authorizer.exe.intermediate.manifest
40 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/include/fastcgi.h:
--------------------------------------------------------------------------------
1 | /*
2 | * fastcgi.h --
3 | *
4 | * Defines for the FastCGI protocol.
5 | *
6 | *
7 | * Copyright (c) 1995-1996 Open Market, Inc.
8 | *
9 | * See the file "LICENSE.TERMS" for information on usage and redistribution
10 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 | *
12 | * $Id: fastcgi.h,v 1.1.1.1 1997/09/16 15:36:32 stanleyg Exp $
13 | */
14 |
15 | #ifndef _FASTCGI_H
16 | #define _FASTCGI_H
17 |
18 | /*
19 | * Listening socket file number
20 | */
21 | #define FCGI_LISTENSOCK_FILENO 0
22 |
23 | typedef struct {
24 | unsigned char version;
25 | unsigned char type;
26 | unsigned char requestIdB1;
27 | unsigned char requestIdB0;
28 | unsigned char contentLengthB1;
29 | unsigned char contentLengthB0;
30 | unsigned char paddingLength;
31 | unsigned char reserved;
32 | } FCGI_Header;
33 |
34 | #define FCGI_MAX_LENGTH 0xffff
35 |
36 | /*
37 | * Number of bytes in a FCGI_Header. Future versions of the protocol
38 | * will not reduce this number.
39 | */
40 | #define FCGI_HEADER_LEN 8
41 |
42 | /*
43 | * Value for version component of FCGI_Header
44 | */
45 | #define FCGI_VERSION_1 1
46 |
47 | /*
48 | * Values for type component of FCGI_Header
49 | */
50 | #define FCGI_BEGIN_REQUEST 1
51 | #define FCGI_ABORT_REQUEST 2
52 | #define FCGI_END_REQUEST 3
53 | #define FCGI_PARAMS 4
54 | #define FCGI_STDIN 5
55 | #define FCGI_STDOUT 6
56 | #define FCGI_STDERR 7
57 | #define FCGI_DATA 8
58 | #define FCGI_GET_VALUES 9
59 | #define FCGI_GET_VALUES_RESULT 10
60 | #define FCGI_UNKNOWN_TYPE 11
61 | #define FCGI_MAXTYPE (FCGI_UNKNOWN_TYPE)
62 |
63 | /*
64 | * Value for requestId component of FCGI_Header
65 | */
66 | #define FCGI_NULL_REQUEST_ID 0
67 |
68 |
69 | typedef struct {
70 | unsigned char roleB1;
71 | unsigned char roleB0;
72 | unsigned char flags;
73 | unsigned char reserved[5];
74 | } FCGI_BeginRequestBody;
75 |
76 | typedef struct {
77 | FCGI_Header header;
78 | FCGI_BeginRequestBody body;
79 | } FCGI_BeginRequestRecord;
80 |
81 | /*
82 | * Mask for flags component of FCGI_BeginRequestBody
83 | */
84 | #define FCGI_KEEP_CONN 1
85 |
86 | /*
87 | * Values for role component of FCGI_BeginRequestBody
88 | */
89 | #define FCGI_RESPONDER 1
90 | #define FCGI_AUTHORIZER 2
91 | #define FCGI_FILTER 3
92 |
93 |
94 | typedef struct {
95 | unsigned char appStatusB3;
96 | unsigned char appStatusB2;
97 | unsigned char appStatusB1;
98 | unsigned char appStatusB0;
99 | unsigned char protocolStatus;
100 | unsigned char reserved[3];
101 | } FCGI_EndRequestBody;
102 |
103 | typedef struct {
104 | FCGI_Header header;
105 | FCGI_EndRequestBody body;
106 | } FCGI_EndRequestRecord;
107 |
108 | /*
109 | * Values for protocolStatus component of FCGI_EndRequestBody
110 | */
111 | #define FCGI_REQUEST_COMPLETE 0
112 | #define FCGI_CANT_MPX_CONN 1
113 | #define FCGI_OVERLOADED 2
114 | #define FCGI_UNKNOWN_ROLE 3
115 |
116 |
117 | /*
118 | * Variable names for FCGI_GET_VALUES / FCGI_GET_VALUES_RESULT records
119 | */
120 | #define FCGI_MAX_CONNS "FCGI_MAX_CONNS"
121 | #define FCGI_MAX_REQS "FCGI_MAX_REQS"
122 | #define FCGI_MPXS_CONNS "FCGI_MPXS_CONNS"
123 |
124 |
125 | typedef struct {
126 | unsigned char type;
127 | unsigned char reserved[7];
128 | } FCGI_UnknownTypeBody;
129 |
130 | typedef struct {
131 | FCGI_Header header;
132 | FCGI_UnknownTypeBody body;
133 | } FCGI_UnknownTypeRecord;
134 |
135 | #endif /* _FASTCGI_H */
136 |
137 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/scripts/mem_array_usage.txt:
--------------------------------------------------------------------------------
1 |
2 | [FILE] mem_array_usage.os
3 | [1] var function range(a, b){
4 |
5 | begin function
6 | begin locals 8, stack 13
7 | 0 _F (param)
8 | 1 this (param)
9 | 2 _E
10 | 3 _G
11 | 4 range
12 | 5 memory_get_usage
13 | 6 start_memory
14 | 7 array
15 | end locals
16 | begin function
17 | begin locals 7, stack 11
18 | 0 _F (param)
19 | 1 this (param)
20 | 2 a (param)
21 | 3 b (param)
22 | 4 _E
23 | 5 _G
24 | 6 arr
25 | end locals
26 |
27 | [2] var arr = {}
28 |
29 | new object 0: # (7)
30 | move: var arr (6) = # (7)
31 |
32 |
33 | [3] for(; a <= b; a++){
34 |
35 | begin scope
36 |
37 | begin loop
38 | begin if
39 | begin bool exp
40 | move: # (7) = param a (2)
41 | move: # (8) = param b (3)
42 | # (7) = # (7) [logic <=] # (8)
43 | # (7) = [logic not] # (7)
44 | end bool exp
45 | begin then
46 | break
47 | end then
48 | end if ret values 0
49 |
50 |
51 | [4] arr[] = a
52 |
53 | begin scope
54 | begin call method
55 | move: # (7) = param a (2)
56 | move: # (8) = var arr (6)
57 | move: # (9) = const string "__setempty" (-6)
58 | move: # (10) = # (7)
59 | end call method: start 8, params 3, ret values 0
60 | end scope ret values 0
61 |
62 |
63 | [3] for(; a <= b; a++){
64 |
65 | param a (2) = param a (2) [operator +] const number 1 (-4)
66 | end loop ret values 0
67 | end scope ret values 0
68 |
69 |
70 | [6] return arr
71 |
72 | return: var arr (6), count 1
73 | end function: var range (4), index 1
74 |
75 |
76 | [9] var function memory_get_usage()
77 |
78 | begin function
79 | begin locals 4, stack 7
80 | 0 _F (param)
81 | 1 this (param)
82 | 2 _E
83 | 3 _G
84 | end locals
85 |
86 | [11] return GC.allocatedBytes - GC.cachedBytes
87 |
88 | get property: # (4) = var _E (2) [const string "GC" (-7)]
89 | get property: # (4) = # (4) [const string "allocatedBytes" (-8)]
90 | get property: # (5) = var _E (2) [const string "GC" (-7)]
91 | get property: # (5) = # (5) [const string "cachedBytes" (-9)]
92 | # (4) = # (4) [operator -] # (5)
93 | return: # (4), count 1
94 | end function: var memory_get_usage (5), index 2
95 |
96 |
97 | [14] var start_memory = memory_get_usage()
98 |
99 | begin call
100 | move: # (8) = var memory_get_usage (5)
101 | move: # (9) = const null (-1)
102 | end call: start 8, params 2, ret values 1
103 | move: var start_memory (6) = # (8)
104 |
105 |
106 | [15] var array = range(1, 100000)
107 |
108 | begin call
109 | move: # (8) = var range (4)
110 | move: # (9) = const null (-1)
111 | move: # (10) = const number 1 (-4)
112 | move: # (11) = const number 100000 (-5)
113 | end call: start 8, params 4, ret values 1
114 | move: var array (7) = # (8)
115 |
116 |
117 | [16] printf("%d bytes\n", memory_get_usage() - start_memory)
118 |
119 | begin call method
120 | move: # (8) = var _E (2)
121 | move: # (9) = const string "printf" (-10)
122 | move: # (10) = const string "%d bytes
123 | " (-11)
124 | begin call
125 | move: # (11) = var memory_get_usage (5)
126 | move: # (12) = const null (-1)
127 | end call: start 11, params 2, ret values 1
128 | # (11) = # (11) [operator -] var start_memory (6)
129 | end call method: start 8, params 4, ret values 0
130 |
131 | return: var _E (2), count 1
132 | end function: <<->> (0), index 0
133 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/Win32/FastCGI.dsw:
--------------------------------------------------------------------------------
1 | Microsoft Developer Studio Workspace File, Format Version 6.00
2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3 |
4 | ###############################################################################
5 |
6 | Project: "authorizer"=".\authorizer.dsp" - Package Owner=<4>
7 |
8 | Package=<5>
9 | {{{
10 | }}}
11 |
12 | Package=<4>
13 | {{{
14 | Begin Project Dependency
15 | Project_Dep_Name libfcgi
16 | End Project Dependency
17 | }}}
18 |
19 | ###############################################################################
20 |
21 | Project: "cgifcgi"=".\cgifcgi.dsp" - Package Owner=<4>
22 |
23 | Package=<5>
24 | {{{
25 | }}}
26 |
27 | Package=<4>
28 | {{{
29 | Begin Project Dependency
30 | Project_Dep_Name libfcgi
31 | End Project Dependency
32 | }}}
33 |
34 | ###############################################################################
35 |
36 | Project: "config_h"=".\config_h.dsp" - Package Owner=<4>
37 |
38 | Package=<5>
39 | {{{
40 | }}}
41 |
42 | Package=<4>
43 | {{{
44 | }}}
45 |
46 | ###############################################################################
47 |
48 | Project: "echo"=".\echo.dsp" - Package Owner=<4>
49 |
50 | Package=<5>
51 | {{{
52 | }}}
53 |
54 | Package=<4>
55 | {{{
56 | Begin Project Dependency
57 | Project_Dep_Name libfcgi
58 | End Project Dependency
59 | }}}
60 |
61 | ###############################################################################
62 |
63 | Project: "echo_cpp"=".\echo-cpp.dsp" - Package Owner=<4>
64 |
65 | Package=<5>
66 | {{{
67 | }}}
68 |
69 | Package=<4>
70 | {{{
71 | Begin Project Dependency
72 | Project_Dep_Name libfcgi
73 | End Project Dependency
74 | }}}
75 |
76 | ###############################################################################
77 |
78 | Project: "echox"=".\echox.dsp" - Package Owner=<4>
79 |
80 | Package=<5>
81 | {{{
82 | }}}
83 |
84 | Package=<4>
85 | {{{
86 | Begin Project Dependency
87 | Project_Dep_Name libfcgi
88 | End Project Dependency
89 | }}}
90 |
91 | ###############################################################################
92 |
93 | Project: "libfcgi"=".\libfcgi.dsp" - Package Owner=<4>
94 |
95 | Package=<5>
96 | {{{
97 | }}}
98 |
99 | Package=<4>
100 | {{{
101 | Begin Project Dependency
102 | Project_Dep_Name config_h
103 | End Project Dependency
104 | }}}
105 |
106 | ###############################################################################
107 |
108 | Project: "logdump"=".\logdump.dsp" - Package Owner=<4>
109 |
110 | Package=<5>
111 | {{{
112 | }}}
113 |
114 | Package=<4>
115 | {{{
116 | Begin Project Dependency
117 | Project_Dep_Name libfcgi
118 | End Project Dependency
119 | }}}
120 |
121 | ###############################################################################
122 |
123 | Project: "size"=".\size.dsp" - Package Owner=<4>
124 |
125 | Package=<5>
126 | {{{
127 | }}}
128 |
129 | Package=<4>
130 | {{{
131 | Begin Project Dependency
132 | Project_Dep_Name libfcgi
133 | End Project Dependency
134 | }}}
135 |
136 | ###############################################################################
137 |
138 | Project: "threaded"=".\threaded.dsp" - Package Owner=<4>
139 |
140 | Package=<5>
141 | {{{
142 | }}}
143 |
144 | Package=<4>
145 | {{{
146 | Begin Project Dependency
147 | Project_Dep_Name libfcgi
148 | End Project Dependency
149 | }}}
150 |
151 | ###############################################################################
152 |
153 | Global:
154 |
155 | Package=<5>
156 | {{{
157 | }}}
158 |
159 | Package=<3>
160 | {{{
161 | }}}
162 |
163 | ###############################################################################
164 |
165 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/fcgi_config.h:
--------------------------------------------------------------------------------
1 | /* fcgi_config.h. Generated automatically by configure. */
2 | /* fcgi_config.h.in. Generated automatically from configure.in by autoheader. */
3 |
4 | /* Define if you have the header file. */
5 | #define HAVE_ARPA_INET_H 1
6 |
7 | /* Define if you have the header file. */
8 | #define HAVE_DLFCN_H 1
9 |
10 | /* Define if there's a fileno() prototype in stdio.h */
11 | #define HAVE_FILENO_PROTO 1
12 |
13 | /* Define if the fpos_t typedef is in stdio.h */
14 | #define HAVE_FPOS 1
15 |
16 | /* Define if you have the header file. */
17 | #define HAVE_INTTYPES_H 1
18 |
19 | /* Define if cin/cout/cerr has a streambuf assignment operator */
20 | /* #undef HAVE_IOSTREAM_WITHASSIGN_STREAMBUF */
21 |
22 | /* Define if you have the `nsl' library (-lnsl). */
23 | #define HAVE_LIBNSL 1
24 |
25 | /* Define if you have the `socket' library (-lsocket). */
26 | #define HAVE_LIBSOCKET 1
27 |
28 | /* Define if you have the header file. */
29 | #define HAVE_LIMITS_H 1
30 |
31 | /* Define if you have the header file. */
32 | #define HAVE_MEMORY_H 1
33 |
34 | /* Define if you have the header file. */
35 | #define HAVE_NETDB_H 1
36 |
37 | /* Define if you have the header file. */
38 | #define HAVE_NETINET_IN_H 1
39 |
40 | /* Define if you have POSIX threads libraries and header files. */
41 | /* #undef HAVE_PTHREAD */
42 |
43 | /* Define if sockaddr_un in sys/un.h contains a sun_len component */
44 | /* #undef HAVE_SOCKADDR_UN_SUN_LEN */
45 |
46 | /* Define if the socklen_t typedef is in sys/socket.h */
47 | /* #undef HAVE_SOCKLEN */
48 |
49 | /* Define if you have the header file. */
50 | /* #undef HAVE_STDINT_H */
51 |
52 | /* Define if you have the header file. */
53 | #define HAVE_STDLIB_H 1
54 |
55 | /* Define if char_type is defined in the context of streambuf */
56 | #define HAVE_STREAMBUF_CHAR_TYPE 1
57 |
58 | /* Define if you have the `strerror' function. */
59 | #define HAVE_STRERROR 1
60 |
61 | /* Define if you have the header file. */
62 | #define HAVE_STRINGS_H 1
63 |
64 | /* Define if you have the header file. */
65 | #define HAVE_STRING_H 1
66 |
67 | /* Define if you have the header file. */
68 | #define HAVE_SYS_PARAM_H 1
69 |
70 | /* Define if you have the header file. */
71 | #define HAVE_SYS_SOCKET_H 1
72 |
73 | /* Define if you have the header file. */
74 | #define HAVE_SYS_STAT_H 1
75 |
76 | /* Define if you have the header file. */
77 | #define HAVE_SYS_TIME_H 1
78 |
79 | /* Define if you have the header file. */
80 | #define HAVE_SYS_TYPES_H 1
81 |
82 | /* Define if you have the header file. */
83 | #define HAVE_UNISTD_H 1
84 |
85 | /* Define if va_arg(arg, long double) crashes the compiler */
86 | /* #undef HAVE_VA_ARG_LONG_DOUBLE_BUG */
87 |
88 | /* Name of package */
89 | #define PACKAGE "fcgi"
90 |
91 | /* Define to the necessary symbol if this constant uses a non-standard name on
92 | your system. */
93 | /* #undef PTHREAD_CREATE_JOINABLE */
94 |
95 | /* Define if you have the ANSI C header files. */
96 | #define STDC_HEADERS 1
97 |
98 | /* Define if cross-process locking is required by accept() */
99 | #define USE_LOCKING 1
100 |
101 | /* Version number of package */
102 | #define VERSION "2.4.1-SNAP-0311112127"
103 |
104 | /* Define to empty if `const' does not conform to ANSI C. */
105 | /* #undef const */
106 |
107 | /* Define as `__inline' if that's what the C compiler calls it, or to nothing
108 | if it is not supported. */
109 | /* #undef inline */
110 |
111 | /* Define to `int' if does not define. */
112 | /* #undef ssize_t */
113 |
--------------------------------------------------------------------------------
/proj.win32/examples.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual C++ Express 2010
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "os", "os\os.vcxproj", "{66BA8A80-0506-46C4-90A7-6C851122B854}"
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stack_usage", "stack_usage\stack_usage.vcxproj", "{AA619469-1993-4B8A-8B1F-E988439FB218}"
7 | EndProject
8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "run_os_prog", "run_os_prog\run_os_prog.vcxproj", "{24980B39-B863-4FA5-AB14-7CEB1EC23AB7}"
9 | EndProject
10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "add_user_module", "add_user_module\add_user_module.vcxproj", "{B28723D6-7842-4509-A3BC-B6335CF89CF0}"
11 | EndProject
12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "profile_benchmark", "profile_benchmark\profile_benchmark.vcxproj", "{430E6616-2719-4943-BD29-FF77CC5717C8}"
13 | EndProject
14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osbind", "osbind\osbind.vcxproj", "{2A1B3553-CE78-47C3-A7E1-3B8D758963FC}"
15 | EndProject
16 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "os-fcgi", "os-fcgi\os-fcgi.vcxproj", "{96B201A1-0A51-418A-98E5-07D4286D4145}"
17 | EndProject
18 | Global
19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
20 | Debug|Win32 = Debug|Win32
21 | Release|Win32 = Release|Win32
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {66BA8A80-0506-46C4-90A7-6C851122B854}.Debug|Win32.ActiveCfg = Debug|Win32
25 | {66BA8A80-0506-46C4-90A7-6C851122B854}.Debug|Win32.Build.0 = Debug|Win32
26 | {66BA8A80-0506-46C4-90A7-6C851122B854}.Release|Win32.ActiveCfg = Release|Win32
27 | {66BA8A80-0506-46C4-90A7-6C851122B854}.Release|Win32.Build.0 = Release|Win32
28 | {AA619469-1993-4B8A-8B1F-E988439FB218}.Debug|Win32.ActiveCfg = Debug|Win32
29 | {AA619469-1993-4B8A-8B1F-E988439FB218}.Debug|Win32.Build.0 = Debug|Win32
30 | {AA619469-1993-4B8A-8B1F-E988439FB218}.Release|Win32.ActiveCfg = Release|Win32
31 | {AA619469-1993-4B8A-8B1F-E988439FB218}.Release|Win32.Build.0 = Release|Win32
32 | {24980B39-B863-4FA5-AB14-7CEB1EC23AB7}.Debug|Win32.ActiveCfg = Debug|Win32
33 | {24980B39-B863-4FA5-AB14-7CEB1EC23AB7}.Debug|Win32.Build.0 = Debug|Win32
34 | {24980B39-B863-4FA5-AB14-7CEB1EC23AB7}.Release|Win32.ActiveCfg = Release|Win32
35 | {24980B39-B863-4FA5-AB14-7CEB1EC23AB7}.Release|Win32.Build.0 = Release|Win32
36 | {B28723D6-7842-4509-A3BC-B6335CF89CF0}.Debug|Win32.ActiveCfg = Debug|Win32
37 | {B28723D6-7842-4509-A3BC-B6335CF89CF0}.Debug|Win32.Build.0 = Debug|Win32
38 | {B28723D6-7842-4509-A3BC-B6335CF89CF0}.Release|Win32.ActiveCfg = Release|Win32
39 | {B28723D6-7842-4509-A3BC-B6335CF89CF0}.Release|Win32.Build.0 = Release|Win32
40 | {430E6616-2719-4943-BD29-FF77CC5717C8}.Debug|Win32.ActiveCfg = Debug|Win32
41 | {430E6616-2719-4943-BD29-FF77CC5717C8}.Debug|Win32.Build.0 = Debug|Win32
42 | {430E6616-2719-4943-BD29-FF77CC5717C8}.Release|Win32.ActiveCfg = Release|Win32
43 | {430E6616-2719-4943-BD29-FF77CC5717C8}.Release|Win32.Build.0 = Release|Win32
44 | {2A1B3553-CE78-47C3-A7E1-3B8D758963FC}.Debug|Win32.ActiveCfg = Debug|Win32
45 | {2A1B3553-CE78-47C3-A7E1-3B8D758963FC}.Debug|Win32.Build.0 = Debug|Win32
46 | {2A1B3553-CE78-47C3-A7E1-3B8D758963FC}.Release|Win32.ActiveCfg = Release|Win32
47 | {2A1B3553-CE78-47C3-A7E1-3B8D758963FC}.Release|Win32.Build.0 = Release|Win32
48 | {96B201A1-0A51-418A-98E5-07D4286D4145}.Debug|Win32.ActiveCfg = Debug|Win32
49 | {96B201A1-0A51-418A-98E5-07D4286D4145}.Debug|Win32.Build.0 = Debug|Win32
50 | {96B201A1-0A51-418A-98E5-07D4286D4145}.Release|Win32.ActiveCfg = Release|Win32
51 | {96B201A1-0A51-418A-98E5-07D4286D4145}.Release|Win32.Build.0 = Release|Win32
52 | EndGlobalSection
53 | GlobalSection(SolutionProperties) = preSolution
54 | HideSolutionNode = FALSE
55 | EndGlobalSection
56 | EndGlobal
57 |
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/scripts/n-body.os:
--------------------------------------------------------------------------------
1 | var start_time = os.clock()
2 |
3 | var PI = 3.141592653589793
4 | var SOLAR_MASS = 4 * PI * PI
5 | var DAYS_PER_YEAR = 365.24
6 | var bodies = {
7 | // simulate lua like table, lua starts from 1
8 | 1: { // Sun
9 | x = 0,
10 | y = 0,
11 | z = 0,
12 | vx = 0,
13 | vy = 0,
14 | vz = 0,
15 | mass = SOLAR_MASS
16 | },
17 | { // Jupiter
18 | x = 4.84143144246472090e+00,
19 | y = -1.16032004402742839e+00,
20 | z = -1.03622044471123109e-01,
21 | vx = 1.66007664274403694e-03 * DAYS_PER_YEAR,
22 | vy = 7.69901118419740425e-03 * DAYS_PER_YEAR,
23 | vz = -6.90460016972063023e-05 * DAYS_PER_YEAR,
24 | mass = 9.54791938424326609e-04 * SOLAR_MASS
25 | },
26 | { // Saturn
27 | x = 8.34336671824457987e+00,
28 | y = 4.12479856412430479e+00,
29 | z = -4.03523417114321381e-01,
30 | vx = -2.76742510726862411e-03 * DAYS_PER_YEAR,
31 | vy = 4.99852801234917238e-03 * DAYS_PER_YEAR,
32 | vz = 2.30417297573763929e-05 * DAYS_PER_YEAR,
33 | mass = 2.85885980666130812e-04 * SOLAR_MASS
34 | },
35 | { // Uranus
36 | x = 1.28943695621391310e+01,
37 | y = -1.51111514016986312e+01,
38 | z = -2.23307578892655734e-01,
39 | vx = 2.96460137564761618e-03 * DAYS_PER_YEAR,
40 | vy = 2.37847173959480950e-03 * DAYS_PER_YEAR,
41 | vz = -2.96589568540237556e-05 * DAYS_PER_YEAR,
42 | mass = 4.36624404335156298e-05 * SOLAR_MASS
43 | },
44 | { // Neptune
45 | x = 1.53796971148509165e+01,
46 | y = -2.59193146099879641e+01,
47 | z = 1.79258772950371181e-01,
48 | vx = 2.68067772490389322e-03 * DAYS_PER_YEAR,
49 | vy = 1.62824170038242295e-03 * DAYS_PER_YEAR,
50 | vz = -9.51592254519715870e-05 * DAYS_PER_YEAR,
51 | mass = 5.15138902046611451e-05 * SOLAR_MASS
52 | }
53 | }
54 |
55 | var function advance(bodies, nbody, dt){
56 | for(var i=1; i<=nbody; i++){
57 | var bi = bodies[i]
58 | var bix, biy, biz, bimass = bi.x, bi.y, bi.z, bi.mass
59 | var bivx, bivy, bivz = bi.vx, bi.vy, bi.vz
60 | for(var j=i+1; j<=nbody; j++){
61 | var bj = bodies[j]
62 | var dx, dy, dz = bix-bj.x, biy-bj.y, biz-bj.z
63 | var mag = (dx*dx + dy*dy + dz*dz) ** 0.5
64 | mag = dt / (mag * mag * mag)
65 | var bm = bj.mass*mag
66 | bivx = bivx - (dx * bm)
67 | bivy = bivy - (dy * bm)
68 | bivz = bivz - (dz * bm)
69 | bm = bimass*mag
70 | bj.vx = bj.vx + (dx * bm)
71 | bj.vy = bj.vy + (dy * bm)
72 | bj.vz = bj.vz + (dz * bm)
73 | }
74 | bi.vx = bivx
75 | bi.vy = bivy
76 | bi.vz = bivz
77 | bi.x = bix + dt * bivx
78 | bi.y = biy + dt * bivy
79 | bi.z = biz + dt * bivz
80 | }
81 | }
82 |
83 | var function energy(bodies, nbody){
84 | var e = 0
85 | for(var i=1; i<=nbody; i++){
86 | var bi = bodies[i]
87 | var vx, vy, vz, bim = bi.vx, bi.vy, bi.vz, bi.mass
88 | e = e + (0.5 * bim * (vx*vx + vy*vy + vz*vz))
89 | for(var j=i+1; j<=nbody; j++){
90 | var bj = bodies[j]
91 | var dx, dy, dz = bi.x-bj.x, bi.y-bj.y, bi.z-bj.z
92 | var distance = (dx*dx + dy*dy + dz*dz) ** 0.5
93 | e = e - ((bim * bj.mass) / distance)
94 | }
95 | }
96 | return e
97 | }
98 |
99 | var function offsetMomentum(b, nbody){
100 | var px, py, pz = 0, 0, 0
101 | for(var i=1; i<=nbody; i++){
102 | var bi = b[i]
103 | var bim = bi.mass
104 | px = px + (bi.vx * bim)
105 | py = py + (bi.vy * bim)
106 | pz = pz + (bi.vz * bim)
107 | }
108 | b[1].vx = -px / SOLAR_MASS
109 | b[1].vy = -py / SOLAR_MASS
110 | b[1].vz = -pz / SOLAR_MASS
111 | }
112 |
113 | var N = numberOf(arg && arg[1]) || 1000
114 | var nbody = #bodies
115 |
116 | offsetMomentum(bodies, nbody)
117 | printf("%0.9f\n", energy(bodies, nbody))
118 | // debugger
119 | for(var i=1; i<=N; i++){ advance(bodies, nbody, 0.01) }
120 | printf("%0.9f\n",energy(bodies, nbody))
121 |
122 | printf("time: %.3f\n", getTimeSec() - start_time)
--------------------------------------------------------------------------------
/proj.win32/profile_benchmark/scripts/n-body.lua:
--------------------------------------------------------------------------------
1 | local start_time = os.clock()
2 |
3 | local sqrt = math.sqrt
4 |
5 | local PI = 3.141592653589793
6 | local SOLAR_MASS = 4 * PI * PI
7 | local DAYS_PER_YEAR = 365.24
8 | local bodies = {
9 | { -- Sun
10 | x = 0,
11 | y = 0,
12 | z = 0,
13 | vx = 0,
14 | vy = 0,
15 | vz = 0,
16 | mass = SOLAR_MASS
17 | },
18 | { -- Jupiter
19 | x = 4.84143144246472090e+00,
20 | y = -1.16032004402742839e+00,
21 | z = -1.03622044471123109e-01,
22 | vx = 1.66007664274403694e-03 * DAYS_PER_YEAR,
23 | vy = 7.69901118419740425e-03 * DAYS_PER_YEAR,
24 | vz = -6.90460016972063023e-05 * DAYS_PER_YEAR,
25 | mass = 9.54791938424326609e-04 * SOLAR_MASS
26 | },
27 | { -- Saturn
28 | x = 8.34336671824457987e+00,
29 | y = 4.12479856412430479e+00,
30 | z = -4.03523417114321381e-01,
31 | vx = -2.76742510726862411e-03 * DAYS_PER_YEAR,
32 | vy = 4.99852801234917238e-03 * DAYS_PER_YEAR,
33 | vz = 2.30417297573763929e-05 * DAYS_PER_YEAR,
34 | mass = 2.85885980666130812e-04 * SOLAR_MASS
35 | },
36 | { -- Uranus
37 | x = 1.28943695621391310e+01,
38 | y = -1.51111514016986312e+01,
39 | z = -2.23307578892655734e-01,
40 | vx = 2.96460137564761618e-03 * DAYS_PER_YEAR,
41 | vy = 2.37847173959480950e-03 * DAYS_PER_YEAR,
42 | vz = -2.96589568540237556e-05 * DAYS_PER_YEAR,
43 | mass = 4.36624404335156298e-05 * SOLAR_MASS
44 | },
45 | { -- Neptune
46 | x = 1.53796971148509165e+01,
47 | y = -2.59193146099879641e+01,
48 | z = 1.79258772950371181e-01,
49 | vx = 2.68067772490389322e-03 * DAYS_PER_YEAR,
50 | vy = 1.62824170038242295e-03 * DAYS_PER_YEAR,
51 | vz = -9.51592254519715870e-05 * DAYS_PER_YEAR,
52 | mass = 5.15138902046611451e-05 * SOLAR_MASS
53 | }
54 | }
55 |
56 | local function advance(bodies, nbody, dt)
57 | for i=1,nbody do
58 | local bi = bodies[i]
59 | local bix, biy, biz, bimass = bi.x, bi.y, bi.z, bi.mass
60 | local bivx, bivy, bivz = bi.vx, bi.vy, bi.vz
61 | for j=i+1,nbody do
62 | local bj = bodies[j]
63 | local dx, dy, dz = bix-bj.x, biy-bj.y, biz-bj.z
64 | local mag = sqrt(dx*dx + dy*dy + dz*dz)
65 | mag = dt / (mag * mag * mag)
66 | local bm = bj.mass*mag
67 | bivx = bivx - (dx * bm)
68 | bivy = bivy - (dy * bm)
69 | bivz = bivz - (dz * bm)
70 | bm = bimass*mag
71 | bj.vx = bj.vx + (dx * bm)
72 | bj.vy = bj.vy + (dy * bm)
73 | bj.vz = bj.vz + (dz * bm)
74 | end
75 | bi.vx = bivx
76 | bi.vy = bivy
77 | bi.vz = bivz
78 | bi.x = bix + dt * bivx
79 | bi.y = biy + dt * bivy
80 | bi.z = biz + dt * bivz
81 | end
82 | end
83 |
84 | local function energy(bodies, nbody)
85 | local e = 0
86 | for i=1,nbody do
87 | local bi = bodies[i]
88 | local vx, vy, vz, bim = bi.vx, bi.vy, bi.vz, bi.mass
89 | e = e + (0.5 * bim * (vx*vx + vy*vy + vz*vz))
90 | for j=i+1,nbody do
91 | local bj = bodies[j]
92 | local dx, dy, dz = bi.x-bj.x, bi.y-bj.y, bi.z-bj.z
93 | local distance = sqrt(dx*dx + dy*dy + dz*dz)
94 | e = e - ((bim * bj.mass) / distance)
95 | end
96 | end
97 | return e
98 | end
99 |
100 | local function offsetMomentum(b, nbody)
101 | local px, py, pz = 0, 0, 0
102 | for i=1,nbody do
103 | local bi = b[i]
104 | local bim = bi.mass
105 | px = px + (bi.vx * bim)
106 | py = py + (bi.vy * bim)
107 | pz = pz + (bi.vz * bim)
108 | end
109 | b[1].vx = -px / SOLAR_MASS
110 | b[1].vy = -py / SOLAR_MASS
111 | b[1].vz = -pz / SOLAR_MASS
112 | end
113 |
114 | local N = tonumber(arg and arg[1]) or 1000
115 | local nbody = #bodies
116 |
117 | offsetMomentum(bodies, nbody)
118 | io.write( string.format("%0.9f",energy(bodies, nbody)), "\n")
119 | for i=1,N do advance(bodies, nbody, 0.01) end
120 | io.write( string.format("%0.9f",energy(bodies, nbody)), "\n")
121 |
122 | print(string.format("elapsed time: %.3f\n", os.clock() - start_time))
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # Makefile for FastCGI development kit
3 | #
4 | # $Id: Makefile.am,v 1.8 2003/11/02 21:42:47 robs Exp $
5 | #
6 |
7 | SUBDIRS = libfcgi cgi-fcgi examples include
8 |
9 | include_HEADERS = fcgi_config.h
10 |
11 | EXTRA_DIST = LICENSE.TERMS \
12 | Makefile.nt \
13 | cgi-fcgi/cgi-fcgi.mak \
14 | examples/authorizer.mak \
15 | examples/echo.mak \
16 | examples/echox.mak \
17 | examples/size.mak \
18 | examples/echo-cpp.mak \
19 | libfcgi/libfcgi.mak \
20 | images/aplib-hd.gif \
21 | images/divider.gif \
22 | images/fcgi-hd.gif \
23 | images/mail-hd.gif \
24 | images/navbar.gif \
25 | images/serv-hd.gif \
26 | images/words-hd.gif \
27 | include/fcgi_config_x86.h \
28 | java/FCGIGlobalDefs.java \
29 | java/FCGIInputStream.java \
30 | java/FCGIInterface.java \
31 | java/FCGIMessage.java \
32 | java/FCGIOutputStream.java \
33 | java/FCGIRequest.java \
34 | libfcgi/os_unix.c \
35 | libfcgi/os_win32.c \
36 | perl/ChangeLog \
37 | perl/FCGI.PL \
38 | perl/FCGI.XL \
39 | perl/MANIFEST \
40 | perl/Makefile.PL \
41 | perl/README \
42 | perl/aclocal.m4 \
43 | perl/configure \
44 | perl/configure.in \
45 | perl/echo.PL \
46 | perl/fcgi_config.h.in \
47 | perl/oldinterface.pod \
48 | perl/remote.PL \
49 | perl/threaded.PL \
50 | perl/typemap \
51 | perl/version.pm \
52 | Win32/FastCGI.dsw \
53 | Win32/authorizer.dsp \
54 | Win32/cgifcgi.dsp \
55 | Win32/config_h.dsp \
56 | Win32/echo-cpp.dsp \
57 | Win32/echo.dsp \
58 | Win32/echox.dsp \
59 | Win32/libfcgi.dsp \
60 | Win32/logdump.dsp \
61 | Win32/size.dsp \
62 | Win32/threaded.dsp \
63 | doc/FCGI_Accept.3 \
64 | doc/FCGI_Finish.3 \
65 | doc/FCGI_SetExitStatus.3 \
66 | doc/FCGI_StartFilterData.3 \
67 | doc/cgi-fcgi.1 \
68 | doc/fcgi-devel-kit.htm \
69 | doc/fcgi-java.htm \
70 | doc/fcgi-perf.htm \
71 | doc/fcgi-perl.htm \
72 | doc/fcgi-spec.html \
73 | doc/fcgi-tcl.htm \
74 | doc/omi-logo.gif \
75 | doc/overview.html \
76 | doc/www5-api-workshop.html \
77 | doc/fastcgi-prog-guide/ap_guida.htm \
78 | doc/fastcgi-prog-guide/ap_guide.htm \
79 | doc/fastcgi-prog-guide/apaman.htm \
80 | doc/fastcgi-prog-guide/ch1inta1.gif \
81 | doc/fastcgi-prog-guide/ch1intra.gif \
82 | doc/fastcgi-prog-guide/ch1intro.htm \
83 | doc/fastcgi-prog-guide/ch2c.htm \
84 | doc/fastcgi-prog-guide/ch3perl.htm \
85 | doc/fastcgi-prog-guide/ch4tcl.htm \
86 | doc/fastcgi-prog-guide/cover.htm \
87 | doc/fastcgi-prog-guide/covera.gif \
88 | doc/fastcgi-whitepaper/fastcgi.htm \
89 | doc/fastcgi-whitepaper/img00001.gif \
90 | doc/fastcgi-whitepaper/img00002.gif \
91 | doc/fastcgi-whitepaper/img00003.gif
92 |
93 |
--------------------------------------------------------------------------------
/proj.win32/os-fcgi/fcgi-2.4.1/include/fcgios.h:
--------------------------------------------------------------------------------
1 | /*
2 | * fcgios.h --
3 | *
4 | * Description of file.
5 | *
6 | *
7 | * Copyright (c) 1996 Open Market, Inc.
8 | * All rights reserved.
9 | *
10 | * This file contains proprietary and confidential information and
11 | * remains the unpublished property of Open Market, Inc. Use,
12 | * disclosure, or reproduction is prohibited except as permitted by
13 | * express written license agreement with Open Market, Inc.
14 | *
15 | * Bill Snapper
16 | * snapper@openmarket.com
17 | */
18 | #ifndef _FCGIOS_H
19 | #define _FCGIOS_H
20 |
21 | #ifdef _WIN32
22 | #define WIN32_LEAN_AND_MEAN
23 | #include
24 | #include
25 | #endif
26 |
27 | #include "fcgi_config.h"
28 |
29 | #ifdef HAVE_SYS_TIME_H
30 | #include
31 | #endif
32 |
33 | #ifdef HAVE_SYS_TYPES_H
34 | #include
35 | #endif
36 |
37 | #if defined (c_plusplus) || defined (__cplusplus)
38 | extern "C" {
39 | #endif
40 |
41 | #ifdef _WIN32
42 | #define OS_Errno GetLastError()
43 | #define OS_SetErrno(err) SetLastError(err)
44 | #ifndef O_NONBLOCK
45 | #define O_NONBLOCK 0x0004 /* no delay */
46 | #endif
47 | #else /* !_WIN32 */
48 | #define OS_Errno errno
49 | #define OS_SetErrno(err) errno = (err)
50 | #endif /* !_WIN32 */
51 |
52 | #ifndef DLLAPI
53 | #ifdef _WIN32
54 | #define DLLAPI __declspec(dllimport)
55 | #else
56 | #define DLLAPI
57 | #endif
58 | #endif
59 |
60 |
61 | /* This is the initializer for a "struct timeval" used in a select() call
62 | * right after a new request is accept()ed to determine readablity. Its
63 | * a drop-dead timer. Its only used for AF_UNIX sockets (not TCP sockets).
64 | * Its a workaround for a kernel bug in Linux 2.0.x and SCO Unixware.
65 | * Making this as small as possible, yet remain reliable would be best.
66 | * 2 seconds is very conservative. 0,0 is not reliable. The shorter the
67 | * timeout, the faster request processing will recover. The longer the
68 | * timeout, the more likely this application being "busy" will cause other
69 | * requests to abort and cause more dead sockets that need this timeout. */
70 | #define READABLE_UNIX_FD_DROP_DEAD_TIMEVAL 2,0
71 |
72 | #ifndef STDIN_FILENO
73 | #define STDIN_FILENO 0
74 | #endif
75 |
76 | #ifndef STDOUT_FILENO
77 | #define STDOUT_FILENO 1
78 | #endif
79 |
80 | #ifndef STDERR_FILENO
81 | #define STDERR_FILENO 2
82 | #endif
83 |
84 | #ifndef MAXPATHLEN
85 | #define MAXPATHLEN 1024
86 | #endif
87 |
88 | #ifndef X_OK
89 | #define X_OK 0x01
90 | #endif
91 |
92 | #ifndef _CLIENTDATA
93 | # if defined(__STDC__) || defined(__cplusplus)
94 | typedef void *ClientData;
95 | # else
96 | typedef int *ClientData;
97 | # endif /* __STDC__ */
98 | #define _CLIENTDATA
99 | #endif
100 |
101 | typedef void (*OS_AsyncProc) (ClientData clientData, int len);
102 |
103 | DLLAPI int OS_LibInit(int stdioFds[3]);
104 | DLLAPI void OS_LibShutdown(void);
105 | DLLAPI int OS_CreateLocalIpcFd(const char *bindPath, int backlog);
106 | DLLAPI int OS_FcgiConnect(char *bindPath);
107 | DLLAPI int OS_Read(int fd, char * buf, size_t len);
108 | DLLAPI int OS_Write(int fd, char * buf, size_t len);
109 | DLLAPI int OS_SpawnChild(char *execPath, int listenFd);
110 | DLLAPI int OS_AsyncReadStdin(void *buf, int len, OS_AsyncProc procPtr,
111 | ClientData clientData);
112 | DLLAPI int OS_AsyncRead(int fd, int offset, void *buf, int len,
113 | OS_AsyncProc procPtr, ClientData clientData);
114 | DLLAPI int OS_AsyncWrite(int fd, int offset, void *buf, int len,
115 | OS_AsyncProc procPtr, ClientData clientData);
116 | DLLAPI int OS_Close(int fd, int shutdown);
117 | DLLAPI int OS_CloseRead(int fd);
118 | DLLAPI int OS_DoIo(struct timeval *tmo);
119 | DLLAPI int OS_Accept(int listen_sock, int fail_on_intr, const char *webServerAddrs);
120 | DLLAPI int OS_IpcClose(int ipcFd, int shutdown);
121 | DLLAPI int OS_IsFcgi(int sock);
122 | DLLAPI void OS_SetFlags(int fd, int flags);
123 |
124 | DLLAPI void OS_ShutdownPending(void);
125 |
126 | #if defined (__cplusplus) || defined (c_plusplus)
127 | } /* terminate extern "C" { */
128 | #endif
129 |
130 | #endif /* _FCGIOS_H */
131 |
--------------------------------------------------------------------------------
/examples-os/add_user_module.txt:
--------------------------------------------------------------------------------
1 |
2 | [FILE] ../../examples-os/add_user_module.os
3 | [1] for(var i, s in ["123", "12w", 1234, " df", " "]){
4 |
5 | begin function
6 | begin locals, total 6
7 | 0 _E
8 | 1 _G
9 | end locals
10 | begin scope
11 | begin locals 4
12 | 2 i
13 | 3 s
14 | 4 #func
15 | 5 #valid
16 | end locals
17 | new local var i (2 0)
18 |
19 | new local var s (3 0)
20 |
21 | new local var #func (4 0 temp)
22 |
23 | new local var #valid (5 0 temp)
24 |
25 | begin code list
26 | begin set local var
27 | begin call method
28 | begin array 5
29 | begin set auto index
30 | push const string "123"
31 | end set auto index
32 | ,
33 | begin set auto index
34 | push const string "12w"
35 | end set auto index
36 | ,
37 | begin set auto index
38 | push const number 1234
39 | end set auto index
40 | ,
41 | begin set auto index
42 | push const string " df"
43 | end set auto index
44 | ,
45 | begin set auto index
46 | push const string " "
47 | end set auto index
48 | end array
49 | begin params 1
50 | push const string "__iter"
51 | end params ret values 1
52 | end call method ret values 1
53 | end set local var #func (4 0 temp)
54 |
55 | begin loop
56 | begin set local var
57 | begin set local var
58 | begin set local var
59 | begin call
60 | get local var #func (4 0 temp)
61 | begin params 0
62 | end params ret values 0
63 | end call ret values 3
64 | end set local var s (3 0)
65 | end set local var i (2 0)
66 | end set local var #valid (5 0 temp)
67 |
68 | begin if
69 | begin bool exp
70 | begin logic not
71 | get local var #valid (5 0 temp)
72 | end logic not
73 | end bool exp
74 | begin then
75 | break
76 | end then
77 | end if ret values 0
78 |
79 |
80 | [2] print("my.isdigit("..s..") = "my.isdigit(s)" my.hash("..s..") = "my.hash(s))
81 |
82 | begin scope
83 | begin call method
84 | get local var _E (0 0)
85 | begin params 5
86 | push const string "print"
87 | ,
88 | begin operator ..
89 | begin operator ..
90 | push const string "my.isdigit("
91 | get local var s (3 0)
92 | end operator ..
93 | push const string ") = "
94 | end operator ..
95 | ,
96 | begin call method
97 | get env var my
98 | begin params 2
99 | push const string "isdigit"
100 | ,
101 | get local var s (3 0)
102 | end params ret values 2
103 | end call method ret values 1
104 | ,
105 | begin operator ..
106 | begin operator ..
107 | push const string " my.hash("
108 | get local var s (3 0)
109 | end operator ..
110 | push const string ") = "
111 | end operator ..
112 | ,
113 | begin call method
114 | get env var my
115 | begin params 2
116 | push const string "hash"
117 | ,
118 | get local var s (3 0)
119 | end params ret values 2
120 | end call method ret values 1
121 | end params ret values 5
122 | end call method ret values 0
123 | end scope ret values 0
124 | end loop ret values 0
125 | end code list ret values 0
126 | end scope ret values 0
127 |
128 | begin code list
129 | begin return
130 | get local var _E (0 0)
131 | end return values 1
132 | end code list ret values 0
133 | end function
134 |
--------------------------------------------------------------------------------
/proj.win32/run_os_prog/run_os_prog.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {24980B39-B863-4FA5-AB14-7CEB1EC23AB7}
15 | Win32Proj
16 | run_os_prog
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | true
42 |
43 |
44 | false
45 |
46 |
47 |
48 |
49 |
50 | Level3
51 | Disabled
52 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
53 |
54 |
55 | Console
56 | true
57 |
58 |
59 |
60 |
61 | Level3
62 |
63 |
64 | MaxSpeed
65 | true
66 | true
67 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
68 |
69 |
70 | Console
71 | true
72 | true
73 | true
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/proj.win32/stack_usage/stack_usage.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {AA619469-1993-4B8A-8B1F-E988439FB218}
15 | Win32Proj
16 | stack_usage
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | true
42 |
43 |
44 | false
45 |
46 |
47 |
48 |
49 |
50 | Level3
51 | Disabled
52 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
53 |
54 |
55 | Console
56 | true
57 |
58 |
59 |
60 |
61 | Level3
62 |
63 |
64 | MaxSpeed
65 | true
66 | true
67 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
68 |
69 |
70 | Console
71 | true
72 | true
73 | true
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/proj.win32/add_user_module/add_user_module.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 |
14 | {B28723D6-7842-4509-A3BC-B6335CF89CF0}
15 | Win32Proj
16 | add_user_module
17 |
18 |
19 |
20 | Application
21 | true
22 | Unicode
23 |
24 |
25 | Application
26 | false
27 | true
28 | Unicode
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | true
42 |
43 |
44 | false
45 |
46 |
47 |
48 |
49 |
50 | Level3
51 | Disabled
52 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
53 |
54 |
55 | Console
56 | true
57 |
58 |
59 |
60 |
61 | Level3
62 |
63 |
64 | MaxSpeed
65 | true
66 | true
67 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
68 |
69 |
70 | Console
71 | true
72 | true
73 | true
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------