OuterContextVariables.golden 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#
# 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();
"
21
frame size: 1
22
parameter count: 1
23
bytecode array length: 13
24
bytecodes: [
25
  /*   97 E> */ B(StackCheck),
26
  /*  102 S> */ B(LdaImmutableContextSlot), R(context), U8(4), U8(1),
27
                B(Star), R(0),
28
                B(LdaImmutableCurrentContextSlot), U8(4),
29
  /*  118 E> */ B(Mul), R(0), U8(0),
30
  /*  129 S> */ B(Return),
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
]
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();
"
49
frame size: 0
50
parameter count: 1
51
bytecode array length: 9
52
bytecodes: [
53
  /*   97 E> */ B(StackCheck),
54
  /*  102 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
55
  /*  111 E> */ B(StaContextSlot), R(context), U8(4), U8(1),
56 57
                B(LdaUndefined),
  /*  123 S> */ B(Return),
58 59 60 61 62 63
]
constant pool: [
]
handlers: [
]