v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
bmeurer c7d7ca361d [turbofan] Collect invocation counts and compute relative call frequencies.
Add a notion of "invocation count" to the baseline compilers, which
increment a special slot in the TypeFeedbackVector for each invocation
of a given function (the optimized code doesn't currently collect this
information).

Use this invocation count to relativize the call counts on the call
sites within the function, so that the inlining heuristic has a view
of relative importance of a call site rather than some absolute numbers
with unclear meaning for the current function. Also apply the call site
frequency as a factor to all frequencies in the inlinee by passing this
to the graph builders so that the importance of a call site in an
inlinee is relative to the topmost optimized function.

Note that all functions that neither have literals nor need type
feedback slots will share a single invocation count cell in the
canonical empty type feedback vector, so their invocation count is
meaningless, but that doesn't matter since we only use the invocation
count to relativize call counts within the function, which we only have
if we have at least one type feedback vector (the CallIC slot).

See the design document for additional details on this change:
https://docs.google.com/document/d/1VoYBhpDhJC4VlqMXCKvae-8IGuheBGxy32EOgC2LnT8

BUG=v8:5267,v8:5372
R=mvstanton@chromium.org,rmcilroy@chromium.org,mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2337123003
Cr-Commit-Position: refs/heads/master@{#39410}
2016-09-14 10:20:48 +00:00

106 lines
2.0 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
execute: yes
wrap: no
test function name: f
---
snippet: "
function f(...restArgs) { return restArgs; }
f();
"
frame size: 1
parameter count: 1
bytecode array length: 6
bytecodes: [
B(CreateRestParameter),
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 26 S> */ B(Nop),
/* 43 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f(a, ...restArgs) { return restArgs; }
f();
"
frame size: 2
parameter count: 2
bytecode array length: 13
bytecodes: [
B(CreateRestParameter),
B(Star), R(0),
B(LdaTheHole),
B(Star), R(1),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(1),
/* 29 S> */ B(Ldar), R(0),
/* 46 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f(a, ...restArgs) { return restArgs[0]; }
f();
"
frame size: 2
parameter count: 2
bytecode array length: 15
bytecodes: [
B(CreateRestParameter),
B(Star), R(0),
B(LdaTheHole),
B(Star), R(1),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(1),
/* 29 S> */ B(LdaZero),
/* 44 E> */ B(LdaKeyedProperty), R(0), U8(2),
/* 49 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f(a, ...restArgs) { return restArgs[0] + arguments[0]; }
f();
"
frame size: 5
parameter count: 2
bytecode array length: 26
bytecodes: [
B(CreateUnmappedArguments),
B(Star), R(2),
B(CreateRestParameter),
B(Star), R(0),
B(LdaTheHole),
B(Star), R(1),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(1),
/* 29 S> */ B(LdaZero),
/* 44 E> */ B(LdrKeyedProperty), R(0), U8(2), R(4),
B(LdaZero),
/* 59 E> */ B(LdaKeyedProperty), R(2), U8(4),
B(Add), R(4), U8(6),
/* 64 S> */ B(Return),
]
constant pool: [
]
handlers: [
]