name stringlengths 1 4.98k | code stringlengths 61 2.07M | asm stringlengths 57 12.9M | file stringlengths 18 192 |
|---|---|---|---|
coco_string_create_append(wchar_t const*, wchar_t) | wchar_t* coco_string_create_append(const wchar_t *target, const wchar_t appendix) {
int targetLen = coco_string_length(target);
wchar_t* data = new wchar_t[targetLen + 2];
wcsncpy(data, target, targetLen);
data[targetLen] = appendix;
data[targetLen + 1] = 0;
return data;
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0xefc0
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addl $0x2, %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x6040
movq %rax, -0x... | Davidc2525[P]Leaf/parser/Scanner.cpp |
coco_string_merge(wchar_t*&, wchar_t const*) | void coco_string_merge(wchar_t* &target, const wchar_t* appendix) {
if (!appendix) { return; }
wchar_t* data = coco_string_create_append(target, appendix);
delete [] target;
target = data;
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xf179
jmp 0xf1b2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0xee60
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xf1a... | Davidc2525[P]Leaf/parser/Scanner.cpp |
coco_string_hash(wchar_t const*) | int coco_string_hash(const wchar_t *data) {
int h = 0;
if (!data) { return 0; }
while (*data != 0) {
h = (h * 7) ^ *data;
++data;
}
if (h < 0) { h = -h; }
return h;
} | pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xf23f
movl $0x0, -0x4(%rbp)
jmp 0xf279
jmp 0xf241
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0xf265
imull $0x7, -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
xorl (%rcx), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
a... | Davidc2525[P]Leaf/parser/Scanner.cpp |
coco_string_create(char const*) | wchar_t* coco_string_create(const char* value) {
int len = 0;
if (value) { len = strlen(value); }
wchar_t* data = new wchar_t[len + 1];
for (int i = 0; i < len; ++i) { data[i] = (wchar_t) value[i]; }
data[len] = 0;
return data;
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xf2a6
movq -0x8(%rbp), %rdi
callq 0x6140
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %r... | Davidc2525[P]Leaf/parser/Scanner.cpp |
coco_string_create_char(wchar_t const*) | char* coco_string_create_char(const wchar_t *value) {
int len = coco_string_length(value);
char *res = new char[len + 1];
for (int i = 0; i < len; ++i) { res[i] = (char) value[i]; }
res[len] = 0;
return res;
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xefc0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x6040
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xf37c
movq -0x8(%rbp), %rax
movs... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Token::Token() | Token::Token() {
kind = 0;
pos = 0;
col = 0;
line = 0;
val = NULL;
next = NULL;
} | pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movl $0x0, 0x4(%rax)
movl $0x0, 0xc(%rax)
movl $0x0, 0x10(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
| Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::Buffer(_IO_FILE*, bool) | Buffer::Buffer(FILE* s, bool isUserStream) {
// ensure binary read on windows
#if _MSC_VER >= 1300
_setmode(_fileno(s), _O_BINARY);
#endif
stream = s; this->isUserStream = isUserStream;
if (CanSeek()) {
fseek(s, 0, SEEK_END);
fileLen = ftell(s);
fseek(s, 0, SEEK_SET);
bufLen = (fileLen < COCO_MAX_BUFFER_LENG... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
leaq 0x39aea(%rip), %rax # 0x48f50
addq $0x10, %rax
movq %rax, (%rdi)
movq -0x10(%rbp), %rax
movq %rax, 0x28(%rdi)
movb -0x11(%rbp)... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::Buffer(Buffer*) | Buffer::Buffer(Buffer *b) {
buf = b->buf;
bufCapacity = b->bufCapacity;
b->buf = NULL;
bufStart = b->bufStart;
bufLen = b->bufLen;
fileLen = b->fileLen;
bufPos = b->bufPos;
stream = b->stream;
b->stream = NULL;
isUserStream = b->isUserStream;
} | pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
leaq 0x39949(%rip), %rcx # 0x48f50
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %r... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::Buffer(unsigned char const*, int) | Buffer::Buffer(const unsigned char* buf, int len) {
this->buf = new unsigned char[len];
memcpy(this->buf, buf, len*sizeof(unsigned char));
bufStart = 0;
bufCapacity = bufLen = len;
fileLen = len;
bufPos = 0;
stream = NULL;
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x398ae(%rip), %rcx # 0x48f50
addq $0x10, %rcx
movq %rcx, (%rax)
movslq -0x14(%rbp), %rdi
callq 0x6040
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::~Buffer() | Buffer::~Buffer() {
Close();
if (buf != NULL) {
delete [] buf;
buf = NULL;
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
leaq 0x39835(%rip), %rax # 0x48f60
movq %rax, (%rdi)
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
jmp 0xf739
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xf76b
movq -0x10(%rbp), %rax
movq 0x8(%ra... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::Read() | int Buffer::Read() {
if (bufPos < bufLen) {
return buf[bufPos++];
} else if (GetPos() < fileLen) {
SetPos(GetPos()); // shift buffer start to Pos
return buf[bufPos++];
} else if ((stream != NULL) && !CanSeek() && (ReadNextStreamChunk() > 0)) {
return buf[bufPos++];
} else {
return EoF;
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl 0x20(%rcx), %eax
cmpl 0x18(%rcx), %eax
jge 0xf83e
movq -0x18(%rbp), %rdx
movq 0x8(%rdx), %rax
movl 0x20(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x20(%rdx)
movslq %ecx, %rcx
movzbl (%rax,%... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::ReadNextStreamChunk() | int Buffer::ReadNextStreamChunk() {
int free = bufCapacity - bufLen;
if (free == 0) {
// in the case of a growing input stream
// we can neither seek in the stream, nor can we
// foresee the maximum length, thus we must adapt
// the buffer size on demand.
bufCapacity = bufLen * 2;
unsigned char *newBuf = ... | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movl 0x10(%rcx), %eax
subl 0x18(%rcx), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0xf965
movq -0x30(%rbp), %rax
movl 0x18(%rax), %ecx
shll %ecx
movl %ecx, 0x10(%rax)
movslq 0x10(%rax), %rdi
callq... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::Peek() | int Buffer::Peek() {
int curPos = GetPos();
int ch = Read();
SetPos(curPos);
return ch;
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movq (%rdi), %rax
callq *0x30(%rax)
movq -0x18(%rbp), %rdi
movl %eax, -0xc(%rbp)
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x18(%rbp), %rdi
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %esi
movq (%rdi), %rax
callq ... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::GetString(int, int) | wchar_t* Buffer::GetString(int beg, int end) {
int len = 0;
wchar_t *buf = new wchar_t[end - beg];
int oldPos = GetPos();
SetPos(beg);
while (GetPos() < end) buf[len++] = (wchar_t) Read();
SetPos(oldPos);
wchar_t *res = coco_string_create(buf, 0, len);
coco_string_delete(buf);
return res;
} | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x10(%rbp), %eax
subl -0xc(%rbp), %eax
cltq
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Buffer::SetPos(int) | void Buffer::SetPos(int value) {
if ((value >= fileLen) && (stream != NULL) && !CanSeek()) {
// Wanted position is after buffer and the stream
// is not seek-able e.g. network or console,
// thus we have to read the stream manually till
// the wanted position is in sight.
while ((value >= fileLen) && (ReadNe... | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jl 0xfb59
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xfb59
movq -0x18(%rbp), %rdi
callq 0xf5a0
testb $0x1, %al
jne 0xfb59
jmp 0xfb29
movq... | Davidc2525[P]Leaf/parser/Scanner.cpp |
UTF8Buffer::Read() | int UTF8Buffer::Read() {
int ch;
do {
ch = Buffer::Read();
// until we find a utf8 start (0xxxxxxx or 11xxxxxx)
} while ((ch >= 128) && ((ch & 0xC0) != 0xC0) && (ch != EoF));
if (ch < 128 || ch == EoF) {
// nothing to do, first 127 chars are the same in ascii and utf8
// 0xxxxxxx or end of file character
}... | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0xf800
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl $0x80, -0xc(%rbp)
movb %al, -0x39(%rbp)
jl 0xfc71
movl -0xc(%rbp), %ecx
andl $0xc0, %ecx
xorl %eax, %eax
cmpl $0xc0, %ecx
movb %al... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::Init() | void Scanner::Init() {
EOL = '\n';
eofSym = 0;
maxT = 50;
noSym = 50;
int i;
for (i = 49; i <= 57; ++i) start.set(i, 28);
for (i = 65; i <= 90; ++i) start.set(i, 2);
for (i = 95; i <= 95; ++i) start.set(i, 2);
for (i = 97; i <= 122; ++i) start.set(i, 2);
for (i = 145; i <= 145; ++i) start.set(i, 2);
for (... | pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movb $0xa, 0x20(%rax)
movl $0x0, 0x24(%rax)
movl $0x32, 0x2c(%rax)
movl $0x32, 0x28(%rax)
movl $0x31, -0xc(%rbp)
cmpl $0x39, -0xc(%rbp)
jg 0xfeda
movq -0x38(%rbp), %rdi
addq $0x38, %rdi
movl -0xc(%rbp), %esi
m... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::Scanner(wchar_t const*) | Scanner::Scanner(const wchar_t* fileName) {
FILE* stream;
char *chFileName = coco_string_create_char(fileName);
if ((stream = fopen(chFileName, "rb")) == NULL) {
printf("--- Cannot open file %ls\n", fileName);
exit(1);
}
coco_string_delete(chFileName);
buffer = new Buffer(stream, false);
Init();
} | pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x38, %rdi
movq %rdi, -0x48(%rbp)
callq 0x12590
movq -0x40(%rbp), %rdi
addq $0x48, %rdi
movq %rdi, -0x38(%rbp)
callq 0x125e0
jmp 0x105b8
movq -0x10(%rbp), %rdi
callq 0xf320
movq %r... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::~Scanner() | Scanner::~Scanner() {
char* cur = (char*) firstHeap;
while(cur != NULL) {
cur = *(char**) (cur + COCO_HEAP_BLOCK_SIZE);
free(firstHeap);
firstHeap = cur;
}
delete [] tval;
delete buffer;
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x107ca
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x4000000(%rcx), %rcx
movq %rcx, -0x10(%rbp)
movq (%rax), %rdi
callq 0x63c0
movq -0... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::NextCh() | void Scanner::NextCh() {
if (oldEols > 0) { ch = EOL; oldEols--; }
else {
pos = buffer->GetPos();
// buffer reads unicode chars, if UTF8 has been detected
ch = buffer->Read(); col++; charPos++;
// replace isolated '\r' by '\n' in order to make
// eol handling uniform across Windows, Unix and Mac
if (ch ==... | pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x94(%rax)
jle 0x1086f
movq -0x10(%rbp), %rax
movzbl 0x20(%rax), %ecx
movl %ecx, 0x80(%rax)
movl 0x94(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x94(%rax)
jmp 0x10921
movq -0x10(%rbp), %rax
movq 0x98(... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::CreateToken() | Token* Scanner::CreateToken() {
Token *t;
if (((char*) heapTop + (int) sizeof(Token)) >= (char*) heapEnd) {
CreateHeapBlock();
}
t = (Token*) heapTop;
heapTop = (void*) ((char*) heapTop + sizeof(Token));
t->val = NULL;
t->next = NULL;
return t;
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x10(%rcx), %rax
addq $0x28, %rax
cmpq 0x18(%rcx), %rax
jb 0x1095b
movq -0x18(%rbp), %rdi
callq 0x10e60
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq 0x10(%rax), %rcx
addq $0x28... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::AddCh() | void Scanner::AddCh() {
if (tlen >= tvalLength) {
tvalLength *= 2;
wchar_t *newBuf = new wchar_t[tvalLength];
memcpy(newBuf, tval, tlen*sizeof(wchar_t));
delete [] tval;
tval = newBuf;
}
if (ch != Buffer::EoF) {
tval[tlen++] = ch;
NextCh();
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl 0x6c(%rcx), %eax
cmpl 0x68(%rcx), %eax
jl 0x10a34
movq -0x18(%rbp), %rax
movl 0x68(%rax), %ecx
shll %ecx
movl %ecx, 0x68(%rax)
movslq 0x68(%rax), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
mo... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::Comment0() | bool Scanner::Comment0() {
int level = 1, pos0 = pos, line0 = line, col0 = col, charPos0 = charPos;
NextCh();
if (ch == L'/') {
NextCh();
for(;;) {
if (ch == 10) {
level--;
if (level == 0) { oldEols = line - line0; NextCh(); return true; }
NextCh();
} else if (ch == buffer->EoF) return false;
... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl $0x1, -0x14(%rbp)
movl 0x84(%rdi), %eax
movl %eax, -0x18(%rbp)
movl 0x8c(%rdi), %eax
movl %eax, -0x1c(%rbp)
movl 0x90(%rdi), %eax
movl %eax, -0x20(%rbp)
movl 0x88(%rdi), %eax
movl %eax, -0x24(%rbp)
call... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::Comment1() | bool Scanner::Comment1() {
int level = 1, pos0 = pos, line0 = line, col0 = col, charPos0 = charPos;
NextCh();
if (ch == L'*') {
NextCh();
for(;;) {
if (ch == L'*') {
NextCh();
if (ch == L')') {
level--;
if (level == 0) { oldEols = line - line0; NextCh(); return true; }
NextCh();
}
... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl $0x1, -0x14(%rbp)
movl 0x84(%rdi), %eax
movl %eax, -0x18(%rbp)
movl 0x8c(%rdi), %eax
movl %eax, -0x1c(%rbp)
movl 0x90(%rdi), %eax
movl %eax, -0x20(%rbp)
movl 0x88(%rdi), %eax
movl %eax, -0x24(%rbp)
call... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::CreateHeapBlock() | void Scanner::CreateHeapBlock() {
void* newHeap;
char* cur = (char*) firstHeap;
while(((char*) tokens < cur) || ((char*) tokens > (cur + COCO_HEAP_BLOCK_SIZE))) {
cur = *((char**) (cur + COCO_HEAP_BLOCK_SIZE));
free(firstHeap);
firstHeap = cur;
}
// COCO_HEAP_BLOCK_SIZE byte heap + pointer to next heap blo... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq 0x70(%rax), %rcx
movb $0x1, %al
cmpq -0x18(%rbp), %rcx
movb %al, -0x21(%rbp)
jb 0x10eaa
movq -0x20(%rbp), %rax
movq 0x70(%rax), %rax
movq -0... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::AppendVal(Token*) | void Scanner::AppendVal(Token *t) {
int reqMem = (tlen + 1) * sizeof(wchar_t);
if (((char*) heapTop + reqMem) >= (char*) heapEnd) {
if (reqMem > COCO_HEAP_BLOCK_SIZE) {
printf("--- Too long token value\n");
exit(1);
}
CreateHeapBlock();
}
t->val = (wchar_t*) heapTop;
heapTop = (void*) ((char*) heapTop ... | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movl 0x6c(%rcx), %eax
addl $0x1, %eax
cltq
shlq $0x2, %rax
movl %eax, -0x14(%rbp)
movq 0x10(%rcx), %rax
movslq -0x14(%rbp), %rdx
addq %rdx, %rax
cmpq 0x18(%rcx), %rax
jb 0x10f92
cmpl $0x... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::NextToken() | Token* Scanner::NextToken() {
while (ch == ' ' ||
(ch >= 9 && ch <= 10) || ch == 13 || ch == L' '
) NextCh();
if ((ch == L'/' && Comment0()) || (ch == L'(' && Comment1()) || (ch == L'/' && Comment2())) return NextToken();
int recKind = noSym;
int recEnd = pos;
t = CreateToken();
t->pos = pos; t->col = col; t-... | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movb $0x1, %al
cmpl $0x20, 0x80(%rcx)
movb %al, -0x31(%rbp)
je 0x11058
movq -0x30(%rbp), %rax
cmpl $0x9, 0x80(%rax)
jl 0x11035
movq -0x30(%rbp), %rcx
movb $0x1, %al
cmpl $0xa, 0x80(%rc... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::SetScannerBehindT() | void Scanner::SetScannerBehindT() {
buffer->SetPos(t->pos);
NextCh();
line = t->line; col = t->col; charPos = t->charPos;
for (int i = 0; i < tlen; i++) NextCh();
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x98(%rax), %rdi
movq 0x58(%rax), %rax
movl 0x4(%rax), %esi
movq (%rdi), %rax
callq *0x38(%rax)
movq -0x18(%rbp), %rdi
callq 0x10830
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rcx
movl 0x10(%rcx), %ecx
movl... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::Scan() | Token* Scanner::Scan() {
if (tokens->next == NULL) {
return pt = tokens = NextToken();
} else {
pt = tokens = tokens->next;
return tokens;
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x70(%rax), %rax
cmpq $0x0, 0x20(%rax)
jne 0x124da
movq -0x18(%rbp), %rdi
callq 0x10ff0
movq -0x18(%rbp), %rcx
movq %rax, 0x70(%rcx)
movq %rax, 0x78(%rcx)
movq %rax, -0x8(%rbp)
jmp 0x124f6
movq -0x18(%r... | Davidc2525[P]Leaf/parser/Scanner.cpp |
Scanner::Peek() | Token* Scanner::Peek() {
do {
if (pt->next == NULL) {
pt->next = NextToken();
}
pt = pt->next;
} while (pt->kind > maxT); // skip pragmas
return pt;
} | pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
cmpq $0x0, 0x20(%rax)
jne 0x1253b
movq -0x10(%rbp), %rdi
callq 0x10ff0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x10... | Davidc2525[P]Leaf/parser/Scanner.cpp |
KeywordMap::~KeywordMap() | virtual ~KeywordMap() {
for (int i = 0; i < 128; ++i) {
Elem *e = tab[i];
while (e != NULL) {
Elem *next = e->next;
delete e;
e = next;
}
}
delete [] tab;
} | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x369fd(%rip), %rcx # 0x49048
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x80, -0xc(%rbp)
jge 0x126b8
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax... | Davidc2525[P]Leaf/parser/Scanner.h |
Errors::SynErr(int, int, int) | void Errors::SynErr(int line, int col, int n) {
wchar_t* s;
switch (n) {
case 0: s = coco_string_create(L"EOF expected"); break;
case 1: s = coco_string_create(L"t_pointer expected"); break;
case 2: s = coco_string_create(L"t_r_pointer expected"); break;
case 3: s = coco_string_create(L"number expected");... | pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x78(%rbp)
subq $0x40, %rax
ja 0x131bb
movq -0x78(%rbp), %rax
leaq 0x21ae8(%rip), %rcx # 0x34754
movsl... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::Get() | void Parser::Get() {
for (;;) {
t = la;
la = scanner->Scan();
if (la->kind <= maxT) { ++errDist; break; }
if (dummyToken != t) {
dummyToken->kind = t->kind;
dummyToken->pos = t->pos;
dummyToken->col = t->col;
dummyToken->line = t->line;
dummyToken->next = NULL;
coco_string_delete(dummyToken-... | pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x28(%rax)
movq 0x18(%rax), %rdi
callq 0x124a0
movq -0x10(%rbp), %rcx
movq %rax, 0x30(%rcx)
movq 0x30(%rcx), %rax
movl (%rax), %eax
cmpl (%rcx), %eax
jg ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::ExpectWeak(int, int) | void Parser::ExpectWeak(int n, int follow) {
if (la->kind == n) Get();
else {
SynErr(n);
while (!StartOf(follow)) Get();
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x30(%rax), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x13410
movq -0x18(%rbp), %rdi
callq 0x132b0
jmp 0x1343d
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::WeakSeparator(int, int, int) | bool Parser::WeakSeparator(int n, int syFol, int repFol) {
if (la->kind == n) {Get(); return true;}
else if (StartOf(repFol)) {return false;}
else {
SynErr(n);
while (!(StartOf(syFol) || StartOf(repFol) || StartOf(0))) {
Get();
}
return StartOf(syFol);
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0x30(%rax), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x134ca
movq -0x28(%rbp), %rdi
callq 0x132b0
movb $0x1, -0x1(%rbp)
jmp ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::SourceCode(LEAF::AST::NODEU*&) | void Parser::SourceCode(ASTU&b_node) {
while (StartOf(1)) {
ASTU stat;
Statement(stat);
block_add(b_node,stat);
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x13450
testb $0x1, %al
jne 0x135dc
jmp 0x135fb
movq -0x20(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x13610
movq -0x10(%rbp), %rax
movq (%rax... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::Statement(LEAF::AST::NODEU*&) | void Parser::Statement(ASTU&stat) {
ASTU e_stat;
switch (la->kind) {
case _t_pointer: case _name: case 15 /* "(" */: case 24 /* ":" */: case 25 /* "," */: case 26 /* "[" */: {
if (isVarDecl()) {
stat = block_stat();
VarDeclDef(stat);
Expect(11 /* ";" */);
} else {
Designator(stat);
if (... | pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x30(%rax), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x1c, %eax
ja 0x13bac
movq -0x38(%rbp), %rax
leaq 0x2120b(%rip), %rcx # 0x34858
movslq ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::VarDeclDef(LEAF::AST::NODEU*&) | void Parser::VarDeclDef(ASTU&s) {
int c_declaraciones = 0;
MetaData ** declaraciones = (MetaData**)malloc(sizeof(MetaData*)*100);
string * Tipe = new string("");
MetaData * md = new MetaData();
VarDcl(md);
declaraciones[c_declaraciones++]=md;
while (la->kind == 25 /* "," */) {
md = new MetaData();
... | pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x320, %edi # imm = 0x320
callq 0x6420
movq %rax, -0x20(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0xb0(%rbp)
movq ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::Designator(LEAF::AST::NODEU*&) | void Parser::Designator(ASTU&d_ast) {
Obj*obj = new Obj(); string * ns=new string(""); Obj * oex = new Obj();
if (la->kind == _name) {
Get();
LexString(ns);
*obj=*symbol_table::find(ns);
ASTU nc = ident(ns);
set_obj(nc,obj);
d_ast=nc;
//cout<<"; load "<<*get_obj(nc)->name<<", adr "<<get_o... | pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movl $0x48, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x50(%rbp)
callq 0x17930
jmp 0x14376
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x20, %edi
callq 0x62e0... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::ActParams(LEAF::AST::NODEU*&, bool) | void Parser::ActParams(ASTU&f_node,bool ifc) {
Obj * obj = get_obj(f_node); int n = 0; f_node = func_call(f_node,ifc);
Expect(15 /* "(" */);
if (StartOf(2)) {
ASTU s_2;
Expr(s_2);
n++; block_add(f_node,s_2);
while (la->kind == 25 /* "," */) {
Get();
ASTU s_2;
Expr(s_2);
n++; block_ad... | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xe2e0
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax),... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::FuncDecl(LEAF::AST::NODEU*&) | void Parser::FuncDecl(ASTU&f_node) {
int np=0;
bool extern_s = false;
Obj *obj = new Obj();
MetaData *fd = new MetaData();
string * FName = new string("anonima_");
FName->append(to_string(++cout_annon_func).c_str());
string * Tipe = new string("");
int anon = 1;
if (la->kind == 28 /* "extern" */) ... | pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0x0, -0x14(%rbp)
movb $0x0, -0x15(%rbp)
movl $0x48, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x88(%rbp)
callq 0x17930
jmp 0x148b7
mov... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::StatementBLock(LEAF::AST::NODEU*&) | void Parser::StatementBLock(ASTU&b_node) {
Expect(9 /* "{" */);
while (StartOf(1)) {
ASTU stat;
Statement(stat);
block_add(b_node,stat);
}
Expect(10 /* "}" */);
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl $0x9, %esi
callq 0x133a0
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x13450
testb $0x1, %al
jne 0x15066
jmp 0x15085
movq -0x20(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x13610
mov... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::TryCatchStatement(LEAF::AST::NODEU*&) | void Parser::TryCatchStatement(ASTU&stat) {
stat = block_try();
Expect(22 /* "try" */);
StatementBLock(stat);
PartCatchStatement(stat);
while (la->kind == 23 /* "catch" */) {
PartCatchStatement(stat);
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
callq 0xe690
movq -0x18(%rbp), %rdi
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x16, %esi
callq 0x133a0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15030
mo... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::VarDcl(Parser::MetaData*) | void Parser::VarDcl(MetaData * md) {
if (la->kind == _t_pointer) {
Get();
VarDcl(md);
cout << " puntero a";
puntero(last(md->type));
} else if (StartOf(6)) {
VarDirectDcl(md);
} else SynErr(58);
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x30(%rax), %rax
cmpl $0x1, (%rax)
jne 0x15189
movq -0x18(%rbp), %rdi
callq 0x132b0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15120
movq 0x34e72(%rip), %rdi # 0x49fd... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::Factor(LEAF::AST::NODEU*&) | void Parser::Factor(ASTU&f_node) {
Obj* obj = new Obj(); string * ns=new string(""); string * buff = new string("");
switch (la->kind) {
case _t_pointer: case _name: {
Designator(f_node);
break;
}
case 47 /* "true" */: {
Get();
*obj=*new Obj(0,new string(""),symbol_table::boolType); f_node = con... | pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x48, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x80(%rbp)
callq 0x17930
jmp 0x15209
movq -0x80(%rbp), %rax
movq %rax, -0x18(%rbp)
mov... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::FuncDcl(Parser::MetaData*) | void Parser::FuncDcl(MetaData * fd) {
if (la->kind == _t_pointer) {
Get();
FuncDcl(fd);
cout << "; puntero a";
puntero(last(fd->type));
} else if (StartOf(8)) {
FuncDirectDcl(fd);
} else SynErr(61);
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x30(%rax), %rax
cmpl $0x1, (%rax)
jne 0x15c69
movq -0x18(%rbp), %rdi
callq 0x132b0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15c00
movq 0x34392(%rip), %rdi # 0x49fd... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::PartCatchStatement(LEAF::AST::NODEU*&) | void Parser::PartCatchStatement(ASTU&_try_) {
ASTU catch_ast; ASTU ex_var;
Expect(23 /* "catch" */);
catch_ast = block_catch();
VarDeclDefCatch(ex_var);
catch_set_ex_var(catch_ast,ex_var);
StatementBLock(catch_ast);
try_add_catch(_try_,catch_ast);
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl $0x17, %esi
callq 0x133a0
callq 0xe740
movq -0x28(%rbp), %rdi
movq %rax, -0x18(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x15d20
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xe7d0
... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::VarDeclDefCatch(LEAF::AST::NODEU*&) | void Parser::VarDeclDefCatch(ASTU&s) {
int c_declaraciones = 0;
//MetaData ** declaraciones = (MetaData**)malloc(sizeof(MetaData*)*100);
string * Tipe = new string("");
MetaData * md = new MetaData();
VarDcl(md);
Expect(24 /* ":" */);
Expect(_name);
Tipe = new string(""); LexString(Tipe);
cout << ... | pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movb $0x1, -0x35(%rbp)
leaq -0x21(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x6500
movq ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::VarDirectDcl(Parser::MetaData*) | void Parser::VarDirectDcl(MetaData * md) {
string * Name = new string("");;
if (la->kind == _name) {
Get();
LexString(Name);
cout <<endl<< "; " << *Name << " es";
md->tmpName=Name;
} else if (la->kind == 15 /* "(" */) {
Get();
VarDcl(md);
Expect(16 /* ")" */);
} else if (StartOf(7)) {... | pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movb $0x1, -0x2d(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x6500
movq -0x40(%rbp), %rdi
movq ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::VarSuffix(Parser::MetaData*) | void Parser::VarSuffix(MetaData * md) {
if (la->kind == 26 /* "[" */) {
string * buff = new string("");
Get();
cout << " array [";
if (la->kind == _number) {
Get();
LexString(buff);
cout << atoi(buff->c_str());
}
Expect(27 /* "]" */);
_array(last(md->type)); cout << "] de";
} el... | pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x30(%rax), %rax
cmpl $0x1a, (%rax)
jne 0x16316
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movb $0x1, -0x2d(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::FuncDirectDcl(Parser::MetaData*) | void Parser::FuncDirectDcl(MetaData * fd) {
string * Name = new string(""); cout<<"";
if (la->kind == _name) {
Get();
} else if (la->kind == 15 /* "(" */) {
Get();
FuncDcl(fd);
Expect(16 /* ")" */);
} else if (StartOf(9)) {
} else SynErr(62);
while (la->kind == 15 /* "(" */ || la->kind == 26 /*... | pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movb $0x1, -0x2d(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x6500
movq -0x40(%rbp), %rdi
movq ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::FuncSuffix(Parser::MetaData*) | void Parser::FuncSuffix(MetaData * fd) {
if (la->kind == 26 /* "[" */) {
string * buff = new string("");
Get();
cout << " array [";
if (la->kind == _number) {
Get();
LexString(buff);
cout << atoi(buff->c_str());
}
Expect(27 /* "]" */);
_array(last(fd->type)); cout << "] de";
} ... | pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x30(%rax), %rax
cmpl $0x1a, (%rax)
jne 0x16696
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movb $0x1, -0x2d(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, ... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::BitShiffOp(LEAF::AST::NODEU*&) | void Parser::BitShiffOp(ASTU &E) {
ASTU T;
BitAndOrOp(E);
while (la->kind == 30 /* "<<" */ || la->kind == 31 /* ">>" */) {
if (la->kind == 30 /* "<<" */) {
Get();
BitAndOrOp(T);
E = bin_op(BitShiftL, E, T);
} else {
Get();
BitAndOrOp(T);
E = bin_op(BitShiftR, E, T);
}
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rsi
callq 0x16830
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movb $0x1, %al
cmpl $0x1e, (%rcx)
movb %al, -0x21(%rbp)
je 0x16794
movq -0x20(%rbp), %rax
movq 0x30(%rax... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::BitAndOrOp(LEAF::AST::NODEU*&) | void Parser::BitAndOrOp(ASTU &E) {
ASTU T;
if (la->kind == 32 /* "~" */) {
Get();
}
AndOrOp(E);
while (la->kind == _t_r_pointer || la->kind == 33 /* "|" */ || la->kind == 34 /* "^" */) {
if (la->kind == _t_r_pointer) {
Get();
AndOrOp(T);
E = bin_op(BitAnd, E, T);
} else if (la->kind ==... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq 0x30(%rax), %rax
cmpl $0x20, (%rax)
jne 0x1685a
movq -0x20(%rbp), %rdi
callq 0x132b0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x16980
movq -0x20(%rbp), %rax
movq 0x30(%ra... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::AndOrOp(LEAF::AST::NODEU*&) | void Parser::AndOrOp(ASTU &E) {
ASTU T;
RelaOp(E);
while (la->kind == 35 /* "&&" */ || la->kind == 36 /* "||" */) {
if (la->kind == 35 /* "&&" */) {
Get();
RelaOp(T);
E = bin_op(And, E, T);
} else {
Get();
RelaOp(T);
E = bin_op(Or, E, T);
}
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rsi
callq 0x16a60
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movb $0x1, %al
cmpl $0x23, (%rcx)
movb %al, -0x21(%rbp)
je 0x169c4
movq -0x20(%rbp), %rax
movq 0x30(%rax... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::RelaOp(LEAF::AST::NODEU*&) | void Parser::RelaOp(ASTU &E) {
ASTU T;
AddOp(E);
while (StartOf(10)) {
switch (la->kind) {
case 37 /* "==" */: {
Get();
AddOp(T);
E = bin_op(Eq, E, T);
break;
}
case 38 /* "!=" */: {
Get();
AddOp(T);
E = bin_op(Neq, E, T);
break;
}
case 39 /* ">" */: {
Get... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rsi
callq 0x16c30
movq -0x20(%rbp), %rdi
movl $0xa, %esi
callq 0x13450
testb $0x1, %al
jne 0x16a98
jmp 0x16c1e
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movl (%rax)... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::AddOp(LEAF::AST::NODEU*&) | void Parser::AddOp(ASTU&t_node) {
ASTU t_node_2; Obj*obj2 = new Obj(); op_types op;
Term(t_node);
while (la->kind == 43 /* "+" */ || la->kind == 44 /* "-" */) {
if (la->kind == 43 /* "+" */) {
Get();
op = Plus;
} else {
Get();
op = Minus;
}
Term(t_node_2);
t_node = bin_op(op,t_no... | pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x48, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0x17930
jmp 0x16c63
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::Term(LEAF::AST::NODEU*&) | void Parser::Term(ASTU&t_node) {
ASTU t_node_2; Obj*obj2 = new Obj(); op_types op;
Factor(t_node);
while (la->kind == _t_pointer || la->kind == 45 /* "/" */ || la->kind == 46 /* "%" */) {
if (la->kind == _t_pointer) {
Get();
op = Times;
} else if (la->kind == 45 /* "/" */) {
Get();
op = Sl... | pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x48, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0x17930
jmp 0x16d63
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::Parse() | void Parser::Parse() {
t = NULL;
la = dummyToken = new Token();
la->val = coco_string_create(L"Dummy Token");
Get();
Pro();
Expect(0);
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, 0x28(%rax)
movl $0x28, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x20(%rbp)
callq 0xf3e0
jmp 0x16ea7
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq %rcx,... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::Parser(Scanner*) | Parser::Parser(Scanner *scanner) {
maxT = 50;
ParserInitCaller<Parser>::CallInit(this);
dummyToken = NULL;
t = la = NULL;
minErrDist = 2;
errDist = minErrDist;
this->scanner = scanner;
errors = new Errors(this->scanner);
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl $0x0, 0x40(%rdi)
movl $0x32, (%rdi)
callq 0x17e80
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, 0x30(%rax)
movq $0x0, 0x28(%rax)
movl $0x2, 0x14(%rax)
movl 0x14(%rax), %ecx... | Davidc2525[P]Leaf/parser/Parser.cpp |
Errors::printMsg(int, int, wchar_t const*) | void Errors::printMsg(int line, int col, const wchar_t *s){
string buff = "";
int b,li;
li = 1;
scanner->buffer->SetPos(0);
while(true){
b = scanner->buffer->Read();
if(b == scanner->buffer->EoF)
break;
else{
buff.append(string((char*)&b));
if(b==10){
if(li==line){
printf(" <-- ... | pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x6500
movq -0x88(%rbp), %rdx
leaq 0x1ea8b(%rip), %rsi # 0x35b6d
leaq -0x38(%rbp), %r... | Davidc2525[P]Leaf/parser/Parser.cpp |
Parser::isVarDecl() | bool isVarDecl(){
scanner->ResetPeek();
string*n = new string("");
string*n2 = new string(":");
Token* x = la;
LexStringtoken(x,n);
// cout<<";t: "<<*n<<" = "<<(*n2==*n)<<endl;
if(*n2==*n) {scanner->ResetPeek(); return true;}
while(1){
nc:
n = new string("");
x = s... | pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq 0x18(%rax), %rdi
callq 0x12570
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x60(%rbp)
movq %rax, -0x68(%rbp)
movb $0x1, -0x2d(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x6500
movq -0x60(%r... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::dump(Struct*, int) | void dump(Struct * vd,int d){
for (int i = 0; i < d;i++)
{
cout<<" ";
}
cout<<";kind: "<<vd->kind<<endl;
if(vd->elemType!=NULL){
dump(vd->elemType,++d);
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x176b8
movq 0x3292f(%rip), %rdi # 0x49fd0
leaq 0x1d351(%rip), %rsi # 0x349f9
call... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::last(Struct*) | Struct* last(Struct * vd){//importante
if(vd->elemType==NULL){
return vd;
}else{
return last(vd->elemType);
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1790d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x17922
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
ca... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::un_pointer(Obj*) | void un_pointer(Obj*o){//desreferenciar
int np=o->nPars;
int adr=o->adr;
if(
(o->type->kind == Struct::Pointer ||
o->type->kind == Struct::Arr )
&& o->type->elemType!=NULL){
//*o=*new Obj(o->kind,o->name,o->type->elemType);
o->type = o->type->elemType;
//o->adr = adr;
//o->nPars=np;
}else{
... | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0xc, 0x10(%rax)
je 0x179b0
movq -0x10(%rbp),... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::unwrap_call_function(Obj*) | void unwrap_call_function(Obj*o){
int np=o->nPars;
if(o->type->kind == Struct::Func && o->type->elemType!=NULL){
string * return_name = o->name;
//return_name->append(o->name->c_str());
//*o=*new Obj(Obj::Var,return_name,o->type->elemType);
o->kind=Obj::Var;
o->type = o->type->elemType;
//o->nPar... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpl $0x9, 0x10(%rax)
jne 0x17acb
movq -0x10(%rbp), %rax
movq 0x18(%rax),... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::funcion(Struct*) | void funcion(Struct * vd){
Struct * cvd = new Struct();
cvd->kind =Struct::Func;
cvd->elemType = new Struct();
*cvd->elemType = *vd;
*vd = *cvd;
} | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x30, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
callq 0xcab0
jmp 0x17b7b
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl $0x9, 0x10(%rax)
movl $0x30, %edi
callq 0x62e0
... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::puntero(Struct*) | void puntero(Struct * vd){//puntero
if(vd->kind == Struct::Func){
//return;
}
//vd->kind=2;
Struct * cvd = new Struct();
cvd->kind = Struct::Pointer;
cvd->elemType = new Struct();
*cvd->elemType = *vd;
*vd = *cvd;
} | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x9, 0x10(%rax)
jne 0x17c4c
jmp 0x17c4c
movl $0x30, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x30(%rbp)
callq 0xcab0
jmp 0x17c67
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::make_ref(Obj*) | void make_ref(Obj*o){//referenciar
Obj tmp = *o;
//*o = *new Obj();
o->type = new Struct();
o->type->kind = Struct::Pointer;
o->type->elemType = new Struct();
o->type->elemType = tmp.type;
/*o->kind = tmp.kind;
o->name = tmp.name;
o->nPars = tmp.nPars;
o->adr = tmp.adr;
o->locals = ... | pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rcx
movq %rcx, -0x20(%rbp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x30(%rax), %xmm3
movaps %xmm3, -0x30(%rbp)
movaps %xmm2, -0x40(%rbp)
movaps %xmm1, -... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::LexStringtoken(Token*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) | void LexStringtoken(Token*to,string *lex){
string * ft = new string("");
ft->append(string(coco_string_create_char(to->val)));
//cout<<"; ft "<<ft->c_str()<<endl;
lex->append(*ft);
} | pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movb $0x1, -0x35(%rbp)
leaq -0x21(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x6500
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq... | Davidc2525[P]Leaf/parser/Parser.h |
Parser::_array1(Struct*, int) | void _array1(Struct * vd,int size){
Struct * cvd = new Struct();
cvd->kind = Struct::Arr;;
cvd->elemType = new Struct();
*cvd->elemType = *vd;
*vd = *cvd;
} | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x30, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0xcab0
jmp 0x1815e
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x5, 0x10(%rax)
movl $0... | Davidc2525[P]Leaf/parser/Parser.h |
LEAF::ASSEMBLY::Section::Section(LEAF::ASSEMBLY::SlotVisitor*, LEAF::ASSEMBLY::Sections) | Section::Section(SlotVisitor *v, Sections type)
{
visitor = v;
this->type = type;
/**
* Agregamos el slock para la seccion.
* ejemplo:
*
* section .data
* ...
* section .text
* ...
*
*/
bool show_title = false;
CONF::Conf &conf = CONF::ConfManager::get(... | pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
addq $0x8, %rdi
movq %rdi, -0x50(%rbp)
callq 0x186a0
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl -0x14(%rbp), %ecx
movl %ecx, (%rax)
m... | Davidc2525[P]Leaf/assembly/interface/Section.cpp |
LEAF::CONF::Conf::group(char const*) | Conf &group(conf_key g)
{
Conf *new_group = new Conf;
for (auto x = items.begin(); x != items.end(); x++)
{
if (start_with(g, (*x).first))
{
new_group->set(sub_from(g, (*x).first), (*x).second);
}
}
return *new_group;
} | pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, -0x40(%rbp)
callq 0xe8c0
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq %rax, -0x18(%rbp)
callq 0x18aa0
movq %rax, -0x20(%rbp... | Davidc2525[P]Leaf/assembly/interface/../../conf/conf.h |
LEAF::CONF::Conf::start_with(char const*, char const*) | bool start_with(const char *v1, const char *v2)
{
for (int x = 0; x < strlen(v1); x++)
{
if (v1[x] != v2[x])
return false;
}
return true;
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6140
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x18b97
movq -0x18(%rbp), %rax
movslq -0x... | Davidc2525[P]Leaf/assembly/interface/../../conf/conf.h |
LEAF::CONF::Conf::sub_from(char const*, char const*) | const char *sub_from(const char *v1, const char *v2)
{
int index = to(v1, v2);
string nc(v2);
string nc2 = nc.substr(index);
string *r = new string(nc2);
return r->c_str();
} | pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x18da0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x650... | Davidc2525[P]Leaf/assembly/interface/../../conf/conf.h |
LEAF::CONF::Conf::to(char const*, char const*) | int to(const char *v1, const char *v2)
{
int index = 0;
for (int x = 0; x < strlen(v1); x++)
{
if (v1[x] != v2[x])
return index;
index++;
}
return index;
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movslq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6140
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x18e17
movq -0x18... | Davidc2525[P]Leaf/assembly/interface/../../conf/conf.h |
LEAF::CONF::Conf::get(char const*) | conf_value get(conf_key k)
{
for (auto x = items.begin(); x != items.end(); x++)
{
if (strcmp(k, x->first) == 0)
{
return x->second;
}
}
throw *new KeyNoFound;
return NULL;
} | pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x18aa0
movq %rax, -0x18(%rbp)
movq -0x40(%rbp), %rdi
callq 0x18b00
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x18ad0
testb $0x1, %al
jne 0x19021
j... | Davidc2525[P]Leaf/assembly/interface/../../conf/conf.h |
size_to_string(sizes) | const char *size_to_string(sizes s)
{
switch (s)
{
case none:
return "";
case byte:
return "BYTE";
case hword:
return "";
case word:
return "WORD";
case dword:
return "DWORD";
case qword:
return "QWORD";
}
return "";
} | pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x5, %rax
ja 0x19a86
movq -0x18(%rbp), %rax
leaq 0x1c079(%rip), %rcx # 0x35aa8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1c12e(%rip), %rax # 0x35b6d
movq %rax, -0x8(%rbp)
jmp 0x19a91
leaq 0x1c0... | Davidc2525[P]Leaf/assembly/interface/sizes.cpp |
LEAF::ASSEMBLY::IntelVisitor::visit(LEAF::ASSEMBLY::SectionSlot*) | void IntelVisitor::visit(SectionSlot *l)
{
string *s = new string("");
switch (l->sect)
{
case Sections::text:
s->append("section .text");
break;
case Sections::data:
s->append("section .data");
break;
case Sections::_extern:
s->append(";extern");
... | pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movb $0x1, -0x2d(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x6500
movq -0x40(%rbp), %rdi
movq ... | Davidc2525[P]Leaf/assembly/implements/IntelVisitor.cpp |
LEAF::ASSEMBLY::IntelVisitor::visit(LEAF::ASSEMBLY::MemoryOperand*) | void IntelVisitor::visit(MemoryOperand *l)
{
string *_body = new string("[");
int c = 0;
for (auto x = l->parts.begin(); x != l->parts.end(); x++)
{
if (x != l->parts.begin())
_body->append(enum_load_mod_to_str((*x)->lm));
(*x)->ope->accept(this);
_body->append(this-... | pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x68(%rbp)
movq %rax, -0x70(%rbp)
movb $0x1, -0x2d(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x6500
movq -0x68(%rbp), %rdi
movq ... | Davidc2525[P]Leaf/assembly/implements/IntelVisitor.cpp |
LEAF::ASSEMBLY::IntelVisitor::visit(LEAF::ASSEMBLY::DInstruccion*) | void IntelVisitor::visit(DInstruccion *l)
{
string *out = new string("\t");
out->append(l->ins);
out->append(" ");
vector<op_pair *>::iterator x = l->operands.begin();
int c = 0;
for (; x != l->operands.end(); x++)
{
if ((*x)->load_size != none)
{
out->append(size... | pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, -0x60(%rbp)
movq %rax, -0x68(%rbp)
movb $0x1, -0x2d(%rbp)
leaq -0x19(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x6500
movq -0x60(%rbp), %rdi
movq ... | Davidc2525[P]Leaf/assembly/implements/IntelVisitor.cpp |
LEAF::ASSEMBLY::enum_load_mod_to_str(LEAF::ASSEMBLY::load_mod) | const char *LEAF::ASSEMBLY::enum_load_mod_to_str(load_mod m)
{
switch (m)
{
case add:
return "+";
break;
case sub:
return "-";
break;
case mul:
return "*";
break;
case div:
return "/";
break;
case mod:
return "%";
break;
default:
break;
}
} | pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x1b319
movq -0x18(%rbp), %rax
leaq 0x1a95d(%rip), %rcx # 0x35c2c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1a981(%rip), %rax # 0x35c60
movq %rax, -0x8(%rbp)
jmp 0x1b31d
leaq 0x1ac... | Davidc2525[P]Leaf/assembly/implements/MemoryOperand.cpp |
LEAF::ASSEMBLY::Program::Program(LEAF::ASSEMBLY::SlotVisitor*) | Program::Program(SlotVisitor *v)
{
visitor = v;
sections.insert(make_pair(Sections::text,
new Section(visitor)));
sections.insert(make_pair(Sections::data,
new Section(visitor, Sections::data)));
sections.insert(make_pair(Sections::bss,
... | pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp # imm = 0x210
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x120(%rbp)
addq $0x8, %rdi
movq %rdi, -0x130(%rbp)
movq %rdi, %rax
movq %rax, -0x128(%rbp)
callq 0x1c440
movq -0x120(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
... | Davidc2525[P]Leaf/assembly/interface/Program.cpp |
LEAF::ASSEMBLY::Program::write(std::ostream&) | void Program::write(ostream &out)
{
Sections secs[5] = {Sections::global,
Sections::_extern,
Sections::data,
Sections::bss,
Sections::text};
for (int x = 0; x < 5; x++)
{
section(secs[x])->write(out);
... | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x19931(%rip), %rax # 0x35c90
movq %rax, -0x30(%rbp)
movq 0x1992e(%rip), %rax # 0x35c98
movq %rax, -0x28(%rbp)
movl 0x1992c(%rip), %eax # 0x35ca0
movl %eax, -0x20(%rbp)
... | Davidc2525[P]Leaf/assembly/interface/Program.cpp |
LEAF::ASSEMBLY::Program::section(LEAF::ASSEMBLY::Sections) | Section *Program::section(Sections s)
{
map<Sections, Section *>::iterator found = sections.find(s);
if (found != sections.end())
{
return found->second;
}
else
{
return nullptr;
}
} | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x8, %rdi
leaq -0x14(%rbp), %rsi
callq 0x1c530
movq -0x30(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0x8, %rdi
callq 0x1c590
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x2... | Davidc2525[P]Leaf/assembly/interface/Program.cpp |
randomString(int, char*) | void randomString(int size, char *output) // pass the destination size and the destination itself
{
srand(time(NULL)); // seed with time
char src[size];
size = rand() % size; // this randomises the size (optional)
src[size] = '\0'; // start with the end of the string...
// ...and work your way ... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x6290
movl %eax, %edi
callq 0x62b0
movl -0x4(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x18(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x... | Davidc2525[P]Leaf/tree.cpp |
to_reg_[abi:cxx11](int, int) | string *_to_reg_(int r, int offset)
{
//return new string("R"+to_string(r));
switch (r + offset)
{
case 1:
{
return new string("rax");
}
case 2:
{
return new string("rbx");
}
case 3:
{
return new string("rcx");
}
case 4:
{
return ... | pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movl %edi, -0xc(%rbp)
movl %esi, -0x10(%rbp)
movl -0xc(%rbp), %edx
movl -0x10(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x13, %eax
ja 0x1dffb
movq -0x58(%rbp), %rax
leaq 0x1886... | Davidc2525[P]Leaf/tree.cpp |
sreq(Struct*, Struct*) | bool sreq(Struct *o1, Struct *o2)
{
if (o1->elemType != NULL && o2->elemType != NULL)
{
if (o1->kind == o2->kind)
{
sreq(o1->elemType, o2->elemType);
}
else
{
return false;
}
}
else
{
if (o1->elemType == NULL && o2->elem... | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1e095
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1e095
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jne 0x1e08d
movq -0x10(%rbp)... | Davidc2525[P]Leaf/tree.cpp |
modoToString(EffectivePartLoadMode) | const char *modoToString(EffectivePartLoadMode mode)
{
switch (mode)
{
case Add:
return "+";
break;
case Sub:
return "-";
break;
case Div:
return "/";
break;
case Mul:
return "*";
break;
default:
break;
}
} | pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x1e27c
movq -0x18(%rbp), %rax
leaq 0x17ab5(%rip), %rcx # 0x35cf4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x17a11(%rip), %rax # 0x35c60
movq %rax, -0x8(%rbp)
jmp 0x1e280
leaq 0x17d... | Davidc2525[P]Leaf/tree.cpp |
EffectiveAddr::toString() | char *EffectiveAddr::toString()
{
RegisterProvider *rp = RegisterManager::getInstance()->getProviderBy(64);
string *addr = new string();
/**
* TODO: delete
* TODO: colocar el registro dependiendo de la arquitectura
*/
if (withBp)
{
// RegisterProvider *rp = RegisterManager::g... | pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
callq 0x21500
movq %rax, %rdi
movl $0x40, %esi
callq 0x21620
movq %rax, -0x10(%rbp)
movl $0x20, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, -0x60(%rbp)
callq 0x6430
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %r... | Davidc2525[P]Leaf/tree.cpp |
ThreeFactory::getAstHandler(int) | AstHandler *ThreeFactory::getAstHandler(int id)
{
if (id > ids)
{
// cout << "Manejador no registrado: "<<id;
throw "Manejador no registrador";
//exit(1);
}
AstHandler *found = handlers[id];
if (!found)
{
//cout << "Manejador no registrado";
throw "Maneja... | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movl -0xc(%rbp), %eax
cmpl (%rcx), %eax
jle 0x1e735
movl $0x8, %edi
callq 0x6160
movq %rax, %rdi
leaq 0x1761c(%rip), %rax # 0x35d3e
movq %rax, (%rdi)
movq 0x2b88c(%rip), %rsi # 0x... | Davidc2525[P]Leaf/threeFactory.cpp |
ThreeFactory::addAstHandler(AstHandler*) | int ThreeFactory::addAstHandler(AstHandler *ast_h)
{
int index = ids;
handlers[index] = ast_h;
ids++;
return index;
} | pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movl %ecx, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movq 0x8(%rax), %rcx
movslq -0x14(%rbp), %rdx
movq %rsi, (%rcx,%rdx,8)
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x14(%rbp), %eax
popq %rbp
retq
n... | Davidc2525[P]Leaf/threeFactory.cpp |
Struct::Struct(int) | Struct::Struct(int kind)
{
this->kind = kind;
this->nFields = 0;
this->fields = NULL;
this->elemType = NULL;
} | pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, 0xc(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, 0x28(%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0x10(%rax)
movl $0x0, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq $0x0, 0x18(%rax)
popq %rbp
retq
nopl (%rax)
| Davidc2525[P]Leaf/compiler/symb_tab/struct.cpp |
Struct::Struct(int, Struct*) | Struct::Struct(int kind, Struct *elemType)
{
this->kind = kind;
this->elemType = elemType;
this->nFields = 0;
this->fields = new Obj();
} | pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, (%rax)
movl $0x0, 0xc(%rax)
movq $0x0, 0x18(%rax)
movq $0x0, 0x28(%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x1... | Davidc2525[P]Leaf/compiler/symb_tab/struct.cpp |
Struct::assign(Struct*) | void Struct::assign(Struct *o)
{
this->kind = o->kind;
this->elemType = (o->elemType);
this->nFields = o->nFields;
this->fields = o->fields;
} | pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movl 0x20(%rcx), %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rcx
mo... | Davidc2525[P]Leaf/compiler/symb_tab/struct.cpp |
Struct::equals(Struct*) | bool Struct::equals(Struct *other)
{
if (this->elemType != NULL && other->elemType != NULL)
{
if (this->kind == other->kind)
{
this->elemType->equals(other->elemType);
}
else
{
return false;
}
}
else
{
if (this->elemType... | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x18(%rax)
je 0x1ea39
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1ea39
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jne 0... | Davidc2525[P]Leaf/compiler/symb_tab/struct.cpp |
symbol_table::get_id(Struct*, int) | int symbol_table::get_id(Struct *type, int ac)
{
int id = ac;
//cout<<"kind "<<type->kind<<endl;
if (type->elemType != NULL)
{
id = get_id(type->elemType, id) + type->kind+id;
}
else
{
id+= type->kind;
}
return id;
} | pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1feaf
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x10(%rbp), %esi
callq 0x1fe70
movq -0x8(%rbp), %rcx
addl 0x10(%rcx), %eax
addl -0... | Davidc2525[P]Leaf/compiler/symb_tab/symbol_table.cpp |
symbol_table::insert(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, Struct*) | Obj *symbol_table::insert(int kind, string *name, Struct *type)
{
Obj *obj = new Obj(kind, name, type);
//cout << "; insert st, obj kind: " << kind << ", name " << *name << ", type kind: " << type->kind << ", level: " << curLevel << endl;
if (type->kind == Struct::Arr)
{
// cout << "; - elemtyp... | pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x48, %edi
callq 0x62e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movl -0x4(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x1fe10
jmp 0x1ff09
movq -0x48(%rbp), %rax
movq %... | Davidc2525[P]Leaf/compiler/symb_tab/symbol_table.cpp |
symbol_table::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) | Obj *symbol_table::find(string *name)
{
/*Obj *obj;
Scope *scope;
scope = curScope;
while (scope != NULL) { // for all open scopes
obj = scope->locals;
while (obj != NULL) { // for all objects in this scope
if (obj->name == name){
//cout<<" find obj: "<<obj... | pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
movq 0x2aff9(%rip), %rax # 0x4b030
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x20099
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x20086
movq -0x28(%rbp), %rax
movq 0x8(%... | Davidc2525[P]Leaf/compiler/symb_tab/symbol_table.cpp |
symbol_table::findField(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, Struct*) | Obj *symbol_table::findField(string *name, Struct *t)
{
for (Obj *p = t->fields; p != NULL; p = p->next)
{
if (*p->name == *name)
return p;
}
cout << "; " << *name << " field is undeclared" << endl;
return symbol_table::noObj;
} | pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x20144
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x17ff0
testb $0x1, %al
jne 0x2012a
jmp 0x20134
movq -0... | Davidc2525[P]Leaf/compiler/symb_tab/symbol_table.cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.