Conversation
|
Interesting, my fix already breaks something too... Edit: never mind, dumb copy & paste mistake. |
… PMap keys (#12683) * Initial plan * Fix PMap infinite recursion with recursive ttype values in HL generator Co-authored-by: Simn <634365+Simn@users.noreply.github.com> * Fix ttype_compare HEnum collision: add euid to enum_proto for unique identity Co-authored-by: Simn <634365+Simn@users.noreply.github.com> * Rename eid→ename_idx, simplify tsame→ttype_compare=0, merge development branch Co-authored-by: Simn <634365+Simn@users.noreply.github.com> * Remove #if hl guards from Issue12239/Issue12256/Issue9662 tests - not HL-specific Co-authored-by: Simn <634365+Simn@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Simn <634365+Simn@users.noreply.github.com> Co-authored-by: Simon Krajewski <simon@haxe.org>
|
I checked the code, and I can't find a case where it fail yet, so that's probably a good sign. However hlcode.txt gives me different result for the following code typedef TreeA = {
var ?node : TreeA;
}
function main() {
var a : TreeA = { node : null };
trace(a);
}Before copilote changes, i.e. on commit 992f68c: After copilote changes: Copilote changes makes a HDynobj and 2 OToVirtual calls (it'll reduce to 1 call if |
|
My initial guess is that this is the |
|
This also means strict mode anon identification isn't going to work because it won't consider these types equal either. This is also related to #11474. |
|
@copilot Please check again if |
…aching (#12718) * Initial plan * Investigate tanon_identification for HL anons_cache replacement Co-authored-by: Simn <634365+Simn@users.noreply.github.com> * Add opaque_field_params to unification_context; use it in HL anon identification via tanon_identification Co-authored-by: Simn <634365+Simn@users.noreply.github.com> * Rename local field_type to get_field_type in tanon_identification to avoid shadowing Co-authored-by: Simn <634365+Simn@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Simn <634365+Simn@users.noreply.github.com>
|
@yuxiaomao Please see if it works for you now! |
|
Observation on shiro's code base:
function main() {
var a = new App();
a.mainLoop();
}
interface IDrawable {
public function render( engine : Engine ) : Void;
}
class App implements IDrawable {
public function new() {
}
public function mainLoop() {
var engine = new Engine();
engine.render(this);
}
public function render( e : Engine ) {
}
}
class Engine {
public function new() {
}
public function render( obj : { function render( engine : Engine ) : Void; } ) {
}
}Development has a strange additional field get/set PR
typedef WheelGroup = {
?choices : Array<String>,
?neutralChoice: String,
}
function main() {
var icons : Array<String> = [];
new ChoiceWheel({
choices: icons,
});
}
class ChoiceWheel {
public function new( group : WheelGroup ) {
}
}Development PR
enum EKind {
Empty;
}
typedef ApplicationDesc = {
@:optional final target: EKind; //@:optional and final each remove part of strange thing
}
function registerAffixDesc(): ApplicationDesc {
return { target : Empty };
}
function main() {
registerAffixDesc();
}Development (expected) PR (dynobj instead of virtual, two tovirtual calls) |
doesn't actually help but is still a good band name
There are several problems with the HL generator related to its
ttypeusage. I'm fixing an obvious one related to infinite recursion here, but there's at least one other: ifttypeis used as key toPMapand is recursive, that won't work.This means we need a different data structure for this, but I'm not sure what's best to use, so let's ask the robot.