| // Verify that DFG TryGetById nodes properly save live registers. This test should not crash. |
| function tryMultipleGetByIds() { return '(function (base) { return @tryGetById(base, "value1") + @tryGetById(base, "value2") + @tryGetById(base, "value3"); })'; } |
| let get = createBuiltin(tryMultipleGetByIds()); |
| expected: "Testing, testing, 123" |
| extraFieldToMakeThisObjectDifferentThanObj1: 42, |
| let objects = [obj1, obj2]; |
| for (let i = 0; i < 200000; i++) { |
| let obj = objects[i % 2]; |
| if (get(obj) !== obj.expected) |
| throw new Error("wrong on iteration: " + i); |