prg-titech / Kanon

A live programming environment specialized for data structure programming.
https://prg-titech.github.io/Kanon/
MIT License
68 stars 4 forks source link

Objects referred by overwritten property are removed from output graph. #14

Open akiou opened 7 years ago

akiou commented 7 years ago

When I write the following program and the cursor position is at last line, there must be 3 array objects([1,2,3], [2,4,6], [1,4,9]) in the visualization pane created during the program execution. But, the second array object([2,4,6]) is not appeared in the pane.

let obj = new Object();
let arr = [1,2,3];

obj.arr = arr.map(e => e + e);
obj.arr = arr.map(e => e * e);
akiou commented 7 years ago

This is because the object ids of the second array object([2,4,6]) and third array object([1,4,9]) are assigned 'new1-1-arr'.