v8/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden
leszeks d2caa302a7 [ignition] Add bytecodes for loads/stores in the current context
The majority of context slot accesses are to the local context (current context
register and depth 0), so this adds bytecodes to optimise for that case.

This cuts down bytecode size by roughly 1% (measured on Octane and Top25).

Review-Url: https://codereview.chromium.org/2459513002
Cr-Commit-Position: refs/heads/master@{#40641}
2016-10-28 10:11:06 +00:00

63 lines
1.2 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: no
test function name: f
---
snippet: "
function Outer() {
var outerVar = 1;
function Inner(innerArg) {
this.innerFunc = function() { return outerVar * innerArg; }
}
this.getInnerFunc = function() { return new Inner(1).innerFunc; }
}
var f = new Outer().getInnerFunc();
f();
"
frame size: 1
parameter count: 1
bytecode array length: 12
bytecodes: [
/* 97 E> */ B(StackCheck),
/* 102 S> */ B(LdrContextSlot), R(context), U8(4), U8(1), R(0),
/* 120 E> */ B(LdaCurrentContextSlot), U8(4),
B(Mul), R(0), U8(2),
/* 130 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function Outer() {
var outerVar = 1;
function Inner(innerArg) {
this.innerFunc = function() { outerVar = innerArg; }
}
this.getInnerFunc = function() { return new Inner(1).innerFunc; }
}
var f = new Outer().getInnerFunc();
f();
"
frame size: 0
parameter count: 1
bytecode array length: 9
bytecodes: [
/* 97 E> */ B(StackCheck),
/* 102 S> */ B(LdaCurrentContextSlot), U8(4),
/* 111 E> */ B(StaContextSlot), R(context), U8(4), U8(1),
B(LdaUndefined),
/* 123 S> */ B(Return),
]
constant pool: [
]
handlers: [
]