mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: PDB debugger now can use Esc scripts for pretty printing
This commit is contained in:
parent
33431e0b32
commit
fa58d0c40a
39 changed files with 1118 additions and 630 deletions
|
|
@ -3,6 +3,7 @@ uses
|
|||
Esc;
|
||||
|
||||
file
|
||||
test2.esc,
|
||||
test.esc,
|
||||
Esc.cpp;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,14 +25,22 @@ CONSOLE_APP_MAIN
|
|||
RLOG(e);
|
||||
}
|
||||
|
||||
code = LoadFile(GetDataFile("test2.esc"));
|
||||
|
||||
try {
|
||||
Scan(global, code);
|
||||
EscValue data_ptr;
|
||||
for(int i = 0; i < 100; i++)
|
||||
{
|
||||
RTIMING("run test 2");
|
||||
data_ptr = Execute(global, "test", INT_MAX);
|
||||
}
|
||||
RDUMP(data_ptr);
|
||||
}
|
||||
catch(CParser::Error e) {
|
||||
RLOG(e);
|
||||
}
|
||||
|
||||
RLOG("");
|
||||
RLOG("-----------------------");
|
||||
|
||||
DUMP(global.GetAdd("result"));
|
||||
|
||||
// EscValue v;
|
||||
// v.SetArray().Add(123);
|
||||
// EscValue v2 = v;
|
||||
// v.SetArray().Add(v);
|
||||
// DUMP(v);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,14 @@ sieve()
|
|||
N = 2000;
|
||||
sieve = N * [1];
|
||||
prime = [];
|
||||
:ii = 0;
|
||||
for(i = 2; i < N; i++) {
|
||||
if(sieve[i]) {
|
||||
prime[] = i;
|
||||
for(j = i; j < N; j += i)
|
||||
for(j = i; j < N; j += i) {
|
||||
sieve[j] = 0;
|
||||
:ii++;
|
||||
}
|
||||
}
|
||||
}
|
||||
return prime;
|
||||
|
|
|
|||
10
benchmarks/BenchEsc/test2.esc
Normal file
10
benchmarks/BenchEsc/test2.esc
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
test()
|
||||
{
|
||||
item.address = 1;
|
||||
from = 100;
|
||||
sz = 16;
|
||||
data_ptr = [];
|
||||
for(ii = 0; ii < 20000; ii++)
|
||||
data_ptr[] = item.address + (ii + from) * sz;
|
||||
return data_ptr;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue