MCPcopy Create free account
hub / github.com/nodejs/node / TestICs

Function TestICs

deps/v8/test/mjsunit/harmony/private.js:393–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

391
392
393function TestICs() {
394 var p = {}
395 p[s] = "moo";
396
397
398 var o = Object.create(p);
399 o[s1] = "bow-wow";
400 function checkNonOwn(o) {
401 assertEquals(undefined, o[s]);
402 assertEquals("bow-wow", o[s1]);
403 }
404
405 checkNonOwn(o);
406
407 // Test monomorphic/optimized.
408 for (var i = 0; i < 1000; i++) {
409 checkNonOwn(o);
410 }
411
412 // Test non-monomorphic.
413 for (var i = 0; i < 1000; i++) {
414 var oNew = Object.create(p);
415 oNew["s" + i] = i;
416 oNew[s1] = "bow-wow";
417 checkNonOwn(oNew);
418 }
419}
420TestICs();

Callers 1

private.jsFile · 0.85

Calls 2

checkNonOwnFunction · 0.85
createMethod · 0.45

Tested by

no test coverage detected