1c0c5fda26
Moves the context chain search loop out of generated bytecode, and into the (Lda|Ldr|Sda)ContextSlot handler, by passing the context depth in as an additional operand. This should decrease the bytecode size and increase performance for deep context chain searches, at the cost of slightly increasing bytecode size for shallow context access. Review-Url: https://codereview.chromium.org/2336643002 Cr-Commit-Position: refs/heads/master@{#39378}
144 lines
2.7 KiB
Plaintext
144 lines
2.7 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
execute: yes
|
|
wrap: no
|
|
test function name: f
|
|
|
|
---
|
|
snippet: "
|
|
function f() { return arguments; }
|
|
f();
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 6
|
|
bytecodes: [
|
|
B(CreateMappedArguments),
|
|
B(Star), R(0),
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 15 S> */ B(Nop),
|
|
/* 33 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function f() { return arguments[0]; }
|
|
f();
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 9
|
|
bytecodes: [
|
|
B(CreateMappedArguments),
|
|
B(Star), R(0),
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 15 S> */ B(LdaZero),
|
|
/* 31 E> */ B(LdaKeyedProperty), R(0), U8(1),
|
|
/* 36 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function f() { 'use strict'; return arguments; }
|
|
f();
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 6
|
|
bytecodes: [
|
|
B(CreateUnmappedArguments),
|
|
B(Star), R(0),
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 29 S> */ B(Nop),
|
|
/* 47 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function f(a) { return arguments[0]; }
|
|
f();
|
|
"
|
|
frame size: 2
|
|
parameter count: 2
|
|
bytecode array length: 19
|
|
bytecodes: [
|
|
B(CreateFunctionContext), U8(1),
|
|
B(PushContext), R(1),
|
|
B(Ldar), R(arg0),
|
|
B(StaContextSlot), R(context), U8(4), U8(0),
|
|
B(CreateMappedArguments),
|
|
B(Star), R(0),
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 16 S> */ B(LdaZero),
|
|
/* 32 E> */ B(LdaKeyedProperty), R(0), U8(1),
|
|
/* 37 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function f(a, b, c) { return arguments; }
|
|
f();
|
|
"
|
|
frame size: 2
|
|
parameter count: 4
|
|
bytecode array length: 28
|
|
bytecodes: [
|
|
B(CreateFunctionContext), U8(3),
|
|
B(PushContext), R(1),
|
|
B(Ldar), R(arg0),
|
|
B(StaContextSlot), R(context), U8(6), U8(0),
|
|
B(Ldar), R(arg1),
|
|
B(StaContextSlot), R(context), U8(5), U8(0),
|
|
B(Ldar), R(arg2),
|
|
B(StaContextSlot), R(context), U8(4), U8(0),
|
|
B(CreateMappedArguments),
|
|
B(Star), R(0),
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 22 S> */ B(Nop),
|
|
/* 40 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function f(a, b, c) { 'use strict'; return arguments; }
|
|
f();
|
|
"
|
|
frame size: 1
|
|
parameter count: 4
|
|
bytecode array length: 6
|
|
bytecodes: [
|
|
B(CreateUnmappedArguments),
|
|
B(Star), R(0),
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 36 S> */ B(Nop),
|
|
/* 54 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|