summary refs log tree commit diff stats
path: root/tests/ccgbugs
Commit message (Collapse)AuthorAgeFilesLines
* Fix semantic pass with borrowed magic procs (#8945)LemonBoy2018-09-111-0/+8
| | | Reported by pqflx3 on the forum.
* Always emit hti object types if needed (#8940)LemonBoy2018-09-111-0/+8
| | | | | | | | The compiler is now smart enough to emit types only if needed without all the importc tricks. This also fixes a codegen bug where, if all the stars align correctly, typeinfo doesn't include any definition of `TNimType` but uses it. Found by @skilchen in #8938
* Allow wCodegenDecl on lambdas (#8892)LemonBoy2018-09-071-0/+13
|
* Codegen fix for function pointers marked inline (#8866)LemonBoy2018-09-042-0/+27
| | | | Fixes #5345 Fixes #5701
* fixes #8781 by appending "_U" instead of 'U' (#8787)Vindaar2018-08-271-0/+25
|
* make more tests green; system.repr does not produce 'nil' for strings and ↵Araq2018-08-221-2/+2
| | | | seqs anymore
* Fix unsound transform pass (#8633)LemonBoy2018-08-141-0/+8
| | | | | When a `var openArray[T]` function parameter goes trough the `transformAddrDeref` pass we may lose the `var` specifier, leading to nasty crashes at runtime.
* Fixes 8616 (#8617)LemonBoy2018-08-123-0/+16
| | | | | | | | * Don't leave dangling forward references to types Fixes #8616 * Add a test case for #8616
* fixes #7392 (#7395)cooldome2018-03-232-1/+8
|
* Fixes #7363 (#7371)cooldome2018-03-201-0/+14
|
* Codegen: use type forward declarations more aggresively. Fixes #7339 (#7340)cooldome2018-03-162-0/+27
| | | Do not emit object definition it if used only by ref or ptr
* fixes #7332 (#7341)andri lim2018-03-161-0/+29
|
* fixes #6960Andreas Rumpf2018-02-111-0/+31
|
* Fixes codegen bug with literal negative zero, fixes #7079 (#7158)GULPF2018-01-311-0/+9
| | | | | | * Fixes #7079 * Fix handling of neg zero during constant folding
* fixes #668Araq2017-12-151-0/+26
|
* Improved collection-to-string behavior (#6825)Fabian Keller2017-12-144-4/+4
|
* fixes #6889Andreas Rumpf2017-12-081-0/+15
|
* fixes another sighashes problemAraq2017-12-081-0/+13
|
* Fix usage of parameters types in templates #6756 (#6768)Anatoly Galiulin2017-11-291-0/+18
|
* fixes #6724Andreas Rumpf2017-11-191-0/+33
|
* fixes #6422Andreas Rumpf2017-10-261-1/+18
|
* make tests green againAndreas Rumpf2017-10-161-3/+3
|
* fixes #6279Andreas Rumpf2017-08-292-1/+13
|
* fixes #6234Andreas Rumpf2017-08-111-0/+22
|
* Remove expr/stmt (#5857)Arne Döring2017-07-252-2/+2
|
* fix #5296 (#5565)zah2017-03-191-0/+14
|
* fixes #5439Araq2017-02-261-0/+27
|
* fixes #5404Araq2017-02-171-0/+16
|
* fixes #5402Araq2017-02-161-0/+26
|
* fixes #5339Andreas Rumpf2017-02-091-0/+38
|
* new name mangling scheme implementedAndreas Rumpf2017-02-021-1/+1
|
* Create temp var in deepcopy if needed (#5205)Brandon Pickering2017-01-151-0/+16
|
* Reset exprs before return by arg. Fixes #5098 (#5191)Brandon Pickering2017-01-111-0/+26
|
* fixes #5147Araq2016-12-301-0/+10
|
* fixes #5137Andreas Rumpf2016-12-221-0/+9
|
* fixes serious codegen regression that caused Nimble to misbehaveAraq2016-12-101-0/+47
|
* fixes #5055Araq2016-11-301-0/+14
|
* fixes #5079Araq2016-11-301-0/+25
|
* fixes #4626Andreas Rumpf2016-09-131-0/+7
|
* fixes #4721Andreas Rumpf2016-09-071-0/+11
|
* fixes #4653Andreas Rumpf2016-08-241-0/+26
|
* fixes #4551Andreas Rumpf2016-08-091-0/+13
|
* fixes #4354Andreas Rumpf2016-08-041-0/+27
|
* fixes #4505, fixes #4230Andreas Rumpf2016-08-041-0/+20
|
* fixes #4345Andreas Rumpf2016-07-191-0/+8
|
* fixes #4186Andreas Rumpf2016-06-021-0/+19
|
* Resolve bugs with `deep recursion` of asyncdispatch.cheatfate2016-05-181-1/+1
| | | | | Introduce callSoon() implementation. Patch tests to use waitFor() instead of asyncCheck()
* makes tests green againAndreas Rumpf2016-05-111-1/+1
|
* fixes #4089Andreas Rumpf2016-04-191-0/+12
|
* made tests green againAndreas Rumpf2016-03-291-3/+0
|
span class="p">, string> Source_line; // used only by 'subx run' :(before "End --debug Settings") load_labels(); load_source_lines(); :(code) void load_labels() { ifstream fin("labels"); fin >> std::hex; while (has_data(fin)) { uint32_t addr = 0; fin >> addr; string name; fin >> name; put(Symbol_name, addr, name); } } void load_source_lines() { ifstream fin("source_lines"); fin >> std::hex; while (has_data(fin)) { uint32_t addr = 0; fin >> addr; string line; getline(fin, line); put(Source_line, addr, hacky_squeeze_out_whitespace(line)); } } :(after "Run One Instruction") if (contains_key(Symbol_name, EIP)) trace(Callstack_depth, "run") << "== label " << get(Symbol_name, EIP) << end(); if (contains_key(Source_line, EIP)) trace(Callstack_depth, "run") << "0x" << HEXWORD << EIP << ": " << get(Source_line, EIP) << end(); else // no source line info; do what you can trace(Callstack_depth, "run") << "0x" << HEXWORD << EIP << ": " << debug_info(EIP) << end(); :(code) string debug_info(uint32_t inst_address) { uint8_t op = read_mem_u8(inst_address); if (op != 0xe8) { ostringstream out; out << HEXBYTE << NUM(op); return out.str(); } int32_t offset = read_mem_i32(inst_address+/*skip op*/1); uint32_t next_eip = inst_address+/*inst length*/5+offset; if (contains_key(Symbol_name, next_eip)) return "e8/call "+get(Symbol_name, next_eip); ostringstream out; out << "e8/call 0x" << HEXWORD << next_eip; return out.str(); } //: If a label starts with '$watch-', make a note of the effective address //: computed by the next instruction. Start dumping out its contents to the //: trace after every subsequent instruction. :(after "Run One Instruction") dump_watch_points(); :(before "End Globals") map<string, uint32_t> Watch_points; :(before "End Reset") Watch_points.clear(); :(code) void dump_watch_points() { if (Watch_points.empty()) return; trace(Callstack_depth, "dbg") << "watch points:" << end(); for (map<string, uint32_t>::iterator p = Watch_points.begin(); p != Watch_points.end(); ++p) trace(Callstack_depth, "dbg") << " " << p->first << ": " << HEXWORD << p->second << " -> " << HEXWORD << read_mem_u32(p->second) << end(); } :(before "End Globals") string Watch_this_effective_address; :(after "Run One Instruction") Watch_this_effective_address = ""; if (contains_key(Symbol_name, EIP) && starts_with(get(Symbol_name, EIP), "$watch-")) Watch_this_effective_address = get(Symbol_name, EIP); :(after "Found effective_address(addr)") if (!Watch_this_effective_address.empty()) { dbg << "now watching " << HEXWORD << addr << " for " << Watch_this_effective_address << end(); put(Watch_points, Watch_this_effective_address, addr); } //: helpers :(code) string hacky_squeeze_out_whitespace(const string& s) { // strip whitespace at start string::const_iterator first = s.begin(); while (first != s.end() && isspace(*first)) ++first; if (first == s.end()) return ""; // strip whitespace at end string::const_iterator last = --s.end(); while (last != s.begin() && isspace(*last)) --last; ++last; // replace runs of spaces/dots with single space until comment or string // TODO: // leave alone dots not surrounded by whitespace // leave alone '#' within word // leave alone '"' within word // squeeze spaces after end of string ostringstream out; bool previous_was_space = false; bool in_comment_or_string = false; for (string::const_iterator curr = first; curr != last; ++curr) { if (in_comment_or_string) out << *curr; else if (isspace(*curr) || *curr == '.') previous_was_space = true; else { if (previous_was_space) out << ' '; out << *curr; previous_was_space = false; if (*curr == '#' || *curr == '"') in_comment_or_string = true; } } return out.str(); }