mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
581 B
33 lines
581 B
if (typeof print !== 'function') { print = console.log; }
|
|
|
|
function build() {
|
|
var obj = {};
|
|
|
|
obj.key1 = 'foo';
|
|
obj.key2 = 'bar';
|
|
obj.key3 = 'quux';
|
|
obj.key4 = 'baz';
|
|
obj.key5 = 'quuux';
|
|
obj.key6 = [ 'foo', 'bar', 'quux', 'baz', 'quuux' ];
|
|
obj.key7 = [ undefined, null, true, 123, -234, {}, {}, {} ];
|
|
|
|
return obj;
|
|
}
|
|
|
|
function test() {
|
|
var obj;
|
|
var i;
|
|
var ignore;
|
|
|
|
obj = build();
|
|
for (i = 0; i < 4e5; i++) {
|
|
ignore = JSON.stringify(obj);
|
|
}
|
|
}
|
|
|
|
try {
|
|
test();
|
|
} catch (e) {
|
|
print(e.stack || e);
|
|
throw e;
|
|
}
|
|
|