Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden

Issue 2459513002: [ignition] Add bytecodes for loads/stores in the current context (Closed)
Patch Set: s/LocalContext/CurrentContext/g Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # 1 #
2 # Autogenerated by generate-bytecode-expectations. 2 # Autogenerated by generate-bytecode-expectations.
3 # 3 #
4 4
5 --- 5 ---
6 wrap: no 6 wrap: no
7 test function name: f 7 test function name: f
8 8
9 --- 9 ---
10 snippet: " 10 snippet: "
11 function Outer() { 11 function Outer() {
12 var outerVar = 1; 12 var outerVar = 1;
13 function Inner(innerArg) { 13 function Inner(innerArg) {
14 this.innerFunc = function() { return outerVar * innerArg; } 14 this.innerFunc = function() { return outerVar * innerArg; }
15 } 15 }
16 this.getInnerFunc = function() { return new Inner(1).innerFunc; } 16 this.getInnerFunc = function() { return new Inner(1).innerFunc; }
17 } 17 }
18 var f = new Outer().getInnerFunc(); 18 var f = new Outer().getInnerFunc();
19 f(); 19 f();
20 " 20 "
21 frame size: 1 21 frame size: 1
22 parameter count: 1 22 parameter count: 1
23 bytecode array length: 14 23 bytecode array length: 12
24 bytecodes: [ 24 bytecodes: [
25 /* 97 E> */ B(StackCheck), 25 /* 97 E> */ B(StackCheck),
26 /* 102 S> */ B(LdrContextSlot), R(context), U8(4), U8(1), R(0), 26 /* 102 S> */ B(LdrContextSlot), R(context), U8(4), U8(1), R(0),
27 /* 120 E> */ B(LdaContextSlot), R(context), U8(4), U8(0), 27 /* 120 E> */ B(LdaCurrentContextSlot), U8(4),
28 B(Mul), R(0), U8(2), 28 B(Mul), R(0), U8(2),
29 /* 130 S> */ B(Return), 29 /* 130 S> */ B(Return),
30 ] 30 ]
31 constant pool: [ 31 constant pool: [
32 ] 32 ]
33 handlers: [ 33 handlers: [
34 ] 34 ]
35 35
36 --- 36 ---
37 snippet: " 37 snippet: "
38 function Outer() { 38 function Outer() {
39 var outerVar = 1; 39 var outerVar = 1;
40 function Inner(innerArg) { 40 function Inner(innerArg) {
41 this.innerFunc = function() { outerVar = innerArg; } 41 this.innerFunc = function() { outerVar = innerArg; }
42 } 42 }
43 this.getInnerFunc = function() { return new Inner(1).innerFunc; } 43 this.getInnerFunc = function() { return new Inner(1).innerFunc; }
44 } 44 }
45 var f = new Outer().getInnerFunc(); 45 var f = new Outer().getInnerFunc();
46 f(); 46 f();
47 " 47 "
48 frame size: 0 48 frame size: 0
49 parameter count: 1 49 parameter count: 1
50 bytecode array length: 11 50 bytecode array length: 9
51 bytecodes: [ 51 bytecodes: [
52 /* 97 E> */ B(StackCheck), 52 /* 97 E> */ B(StackCheck),
53 /* 102 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), 53 /* 102 S> */ B(LdaCurrentContextSlot), U8(4),
54 /* 111 E> */ B(StaContextSlot), R(context), U8(4), U8(1), 54 /* 111 E> */ B(StaContextSlot), R(context), U8(4), U8(1),
55 B(LdaUndefined), 55 B(LdaUndefined),
56 /* 123 S> */ B(Return), 56 /* 123 S> */ B(Return),
57 ] 57 ]
58 constant pool: [ 58 constant pool: [
59 ] 59 ]
60 handlers: [ 60 handlers: [
61 ] 61 ]
62 62
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698