bfa90f7e7c
Besides avoiding the weird hack of inserting a statement at the 0th index of the function body, we also avoid allocating (and initializing) the variable if it's unreferenced (which I'd wager is the common case). Bug: v8:6092 Change-Id: If917d422bb4818cf21e8272aa786ca84d4472802 Reviewed-on: https://chromium-review.googlesource.com/784092 Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#49646}
48 lines
651 B
Plaintext
48 lines
651 B
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
test function name: f
|
|
|
|
---
|
|
snippet: "
|
|
var f;
|
|
f = function f() {};
|
|
f();
|
|
"
|
|
frame size: 0
|
|
parameter count: 1
|
|
bytecode array length: 3
|
|
bytecodes: [
|
|
/* 21 E> */ B(StackCheck),
|
|
B(LdaUndefined),
|
|
/* 25 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var f;
|
|
f = function f() { return f; };
|
|
f();
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 7
|
|
bytecodes: [
|
|
B(Mov), R(closure), R(0),
|
|
/* 21 E> */ B(StackCheck),
|
|
/* 26 S> */ B(Ldar), R(0),
|
|
/* 35 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|