0714bd9fa0
This is a reland of eccf186749
Original change's description:
> [interpreter] Separate bytecodes for one-shot property loads and stores
>
> Create LdaNamedPropertyNoFeedback and StaNamedPropertyNoFeedback
> for one-shot property loads and stores. This CL replaces the runtime
> calls with new bytecodes for named property load stores in one-shot code.
> the runtime calls needed extra set of consecutive registers and
> additional move instructions. This increased the size of
> bytecode-array and possibly extended the life time of objects.
> By replacing them with NoFeedback bytecodes we avoid these issues.
>
> Bug: v8:8072
> Change-Id: I20a38a5ce9940026171d870d354787fe0b7c5a6f
> Reviewed-on: https://chromium-review.googlesource.com/1196725
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Chandan Reddy <chandanreddy@google.com>
> Cr-Commit-Position: refs/heads/master@{#56211}
Bug: v8:8072
Change-Id: Ie8e52b37daf35c7bc08bb910d7b15a9b783354e4
Reviewed-on: https://chromium-review.googlesource.com/1245742
Commit-Queue: Chandan Reddy <chandanreddy@google.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56266}
388 lines
11 KiB
Plaintext
388 lines
11 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
top level: yes
|
|
oneshot opt: yes
|
|
|
|
---
|
|
snippet: "
|
|
|
|
l = {
|
|
'a': 1,
|
|
'b': 2
|
|
};
|
|
|
|
v = l['a'] + l['b'];
|
|
l['b'] = 7;
|
|
l['a'] = l['b'];
|
|
|
|
"
|
|
frame size: 4
|
|
parameter count: 1
|
|
bytecode array length: 77
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(LdaConstant), U8(0),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(41),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
|
|
/* 60 S> */ B(LdaGlobal), U8(1), U8(3),
|
|
B(Star), R(1),
|
|
/* 65 E> */ B(LdaNamedPropertyNoFeedback), R(1), U8(2),
|
|
B(Star), R(1),
|
|
/* 73 E> */ B(LdaGlobal), U8(1), U8(3),
|
|
B(Star), R(2),
|
|
/* 74 E> */ B(LdaNamedPropertyNoFeedback), R(2), U8(3),
|
|
/* 71 E> */ B(Add), R(1), U8(2),
|
|
/* 62 E> */ B(StaGlobal), U8(4), U8(5),
|
|
/* 87 S> */ B(LdaGlobal), U8(1), U8(3),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(7),
|
|
/* 94 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(3), U8(0),
|
|
/* 105 S> */ B(LdaGlobal), U8(1), U8(3),
|
|
B(Star), R(1),
|
|
/* 114 E> */ B(LdaGlobal), U8(1), U8(3),
|
|
B(Star), R(2),
|
|
/* 115 E> */ B(LdaNamedPropertyNoFeedback), R(2), U8(3),
|
|
B(Star), R(2),
|
|
/* 112 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
|
|
B(Mov), R(2), R(0),
|
|
B(Ldar), R(0),
|
|
/* 128 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["v"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
|
|
l = {
|
|
'a': 1.1,
|
|
'b': 2.2
|
|
};
|
|
for (i = 0; i < 5; ++i) {
|
|
l['a'] = l['a'] + l['b'];
|
|
l['b'] = l['a'] + l['b'];
|
|
}
|
|
|
|
"
|
|
frame size: 4
|
|
parameter count: 1
|
|
bytecode array length: 120
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(LdaConstant), U8(0),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(41),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
|
|
B(LdaUndefined),
|
|
B(Star), R(0),
|
|
/* 68 S> */ B(LdaZero),
|
|
/* 70 E> */ B(StaGlobal), U8(2), U8(2),
|
|
/* 77 S> */ B(LdaGlobal), U8(2), U8(4),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(5),
|
|
/* 77 E> */ B(TestLessThan), R(1), U8(6),
|
|
B(JumpIfFalse), U8(83),
|
|
/* 63 E> */ B(StackCheck),
|
|
/* 97 S> */ B(LdaGlobal), U8(1), U8(7),
|
|
B(Star), R(1),
|
|
/* 106 E> */ B(LdaGlobal), U8(1), U8(7),
|
|
B(Star), R(2),
|
|
/* 107 E> */ B(LdaNamedProperty), R(2), U8(3), U8(10),
|
|
B(Star), R(2),
|
|
/* 115 E> */ B(LdaGlobal), U8(1), U8(7),
|
|
B(Star), R(3),
|
|
/* 116 E> */ B(LdaNamedProperty), R(3), U8(4), U8(12),
|
|
/* 113 E> */ B(Add), R(2), U8(9),
|
|
/* 104 E> */ B(StaNamedProperty), R(1), U8(3), U8(14),
|
|
/* 131 S> */ B(LdaGlobal), U8(1), U8(7),
|
|
B(Star), R(1),
|
|
/* 140 E> */ B(LdaGlobal), U8(1), U8(7),
|
|
B(Star), R(2),
|
|
/* 141 E> */ B(LdaNamedProperty), R(2), U8(3), U8(10),
|
|
B(Star), R(2),
|
|
/* 149 E> */ B(LdaGlobal), U8(1), U8(7),
|
|
B(Star), R(3),
|
|
/* 150 E> */ B(LdaNamedProperty), R(3), U8(4), U8(12),
|
|
/* 147 E> */ B(Add), R(2), U8(16),
|
|
B(Star), R(2),
|
|
/* 138 E> */ B(StaNamedProperty), R(1), U8(4), U8(17),
|
|
B(Mov), R(2), R(0),
|
|
/* 84 S> */ B(LdaGlobal), U8(2), U8(4),
|
|
B(Inc), U8(19),
|
|
/* 84 E> */ B(StaGlobal), U8(2), U8(2),
|
|
B(JumpLoop), U8(90), I8(0),
|
|
B(Ldar), R(0),
|
|
/* 171 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["i"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
|
|
l = {
|
|
'a': 1.1,
|
|
'b': 2.2
|
|
};
|
|
while (s > 0) {
|
|
l['a'] = l['a'] - l['b'];
|
|
l['b'] = l['b'] - l['a'];
|
|
}
|
|
|
|
"
|
|
frame size: 4
|
|
parameter count: 1
|
|
bytecode array length: 109
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(LdaConstant), U8(0),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(41),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
|
|
B(LdaUndefined),
|
|
B(Star), R(0),
|
|
/* 72 S> */ B(LdaGlobal), U8(2), U8(2),
|
|
B(Star), R(1),
|
|
B(LdaZero),
|
|
/* 72 E> */ B(TestGreaterThan), R(1), U8(4),
|
|
B(JumpIfFalse), U8(77),
|
|
/* 63 E> */ B(StackCheck),
|
|
/* 87 S> */ B(LdaGlobal), U8(1), U8(5),
|
|
B(Star), R(1),
|
|
/* 97 E> */ B(LdaGlobal), U8(1), U8(5),
|
|
B(Star), R(2),
|
|
/* 98 E> */ B(LdaNamedProperty), R(2), U8(3), U8(8),
|
|
B(Star), R(2),
|
|
/* 106 E> */ B(LdaGlobal), U8(1), U8(5),
|
|
B(Star), R(3),
|
|
/* 107 E> */ B(LdaNamedProperty), R(3), U8(4), U8(10),
|
|
/* 104 E> */ B(Sub), R(2), U8(7),
|
|
/* 95 E> */ B(StaNamedProperty), R(1), U8(3), U8(12),
|
|
/* 122 S> */ B(LdaGlobal), U8(1), U8(5),
|
|
B(Star), R(1),
|
|
/* 132 E> */ B(LdaGlobal), U8(1), U8(5),
|
|
B(Star), R(2),
|
|
/* 133 E> */ B(LdaNamedProperty), R(2), U8(4), U8(10),
|
|
B(Star), R(2),
|
|
/* 141 E> */ B(LdaGlobal), U8(1), U8(5),
|
|
B(Star), R(3),
|
|
/* 142 E> */ B(LdaNamedProperty), R(3), U8(3), U8(8),
|
|
/* 139 E> */ B(Sub), R(2), U8(14),
|
|
B(Star), R(2),
|
|
/* 130 E> */ B(StaNamedProperty), R(1), U8(4), U8(15),
|
|
B(Mov), R(2), R(0),
|
|
B(Ldar), R(2),
|
|
B(JumpLoop), U8(83), I8(0),
|
|
B(Ldar), R(0),
|
|
/* 163 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["s"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
|
|
l = {
|
|
'a': 1.1,
|
|
'b': 2.2
|
|
};
|
|
s = 10;
|
|
do {
|
|
l['a'] = l['b'] - l['a'];
|
|
} while (s < 10);
|
|
|
|
"
|
|
frame size: 4
|
|
parameter count: 1
|
|
bytecode array length: 81
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(LdaConstant), U8(0),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(41),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
|
|
/* 63 S> */ B(LdaSmi), I8(10),
|
|
/* 65 E> */ B(StaGlobal), U8(2), U8(2),
|
|
B(LdaUndefined),
|
|
B(Star), R(0),
|
|
/* 77 E> */ B(StackCheck),
|
|
/* 90 S> */ B(LdaGlobal), U8(1), U8(4),
|
|
B(Star), R(1),
|
|
/* 99 E> */ B(LdaGlobal), U8(1), U8(4),
|
|
B(Star), R(2),
|
|
/* 100 E> */ B(LdaNamedProperty), R(2), U8(3), U8(7),
|
|
B(Star), R(2),
|
|
/* 108 E> */ B(LdaGlobal), U8(1), U8(4),
|
|
B(Star), R(3),
|
|
/* 109 E> */ B(LdaNamedProperty), R(3), U8(4), U8(9),
|
|
/* 106 E> */ B(Sub), R(2), U8(6),
|
|
B(Star), R(2),
|
|
/* 97 E> */ B(StaNamedProperty), R(1), U8(4), U8(11),
|
|
B(Mov), R(2), R(0),
|
|
/* 133 S> */ B(LdaGlobal), U8(2), U8(13),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(10),
|
|
/* 133 E> */ B(TestLessThan), R(1), U8(15),
|
|
B(JumpIfFalse), U8(5),
|
|
B(JumpLoop), U8(50), I8(0),
|
|
B(Ldar), R(0),
|
|
/* 146 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["s"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
|
|
l = {
|
|
'c': 1.1,
|
|
'd': 2.2
|
|
};
|
|
if (l['c'] < 3) {
|
|
l['c'] = 3;
|
|
} else {
|
|
l['d'] = 3;
|
|
}
|
|
|
|
"
|
|
frame size: 4
|
|
parameter count: 1
|
|
bytecode array length: 75
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(LdaConstant), U8(0),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(41),
|
|
B(Star), R(3),
|
|
B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
|
|
/* 63 S> */ B(LdaGlobal), U8(1), U8(2),
|
|
B(Star), R(1),
|
|
/* 68 E> */ B(LdaNamedPropertyNoFeedback), R(1), U8(2),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(3),
|
|
/* 74 E> */ B(TestLessThan), R(1), U8(4),
|
|
B(JumpIfFalse), U8(22),
|
|
/* 89 S> */ B(LdaGlobal), U8(1), U8(2),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(3),
|
|
B(Star), R(2),
|
|
/* 96 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
|
|
B(Mov), R(2), R(0),
|
|
B(Ldar), R(2),
|
|
B(Jump), U8(20),
|
|
/* 124 S> */ B(LdaGlobal), U8(1), U8(2),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(3),
|
|
B(Star), R(2),
|
|
/* 131 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(3), U8(0),
|
|
B(Mov), R(2), R(0),
|
|
B(Ldar), R(2),
|
|
B(Ldar), R(0),
|
|
/* 150 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["c"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["d"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
|
|
a = [1.1, [2.2, 4.5]];
|
|
|
|
"
|
|
frame size: 5
|
|
parameter count: 1
|
|
bytecode array length: 20
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(LdaConstant), U8(0),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(4),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::kCreateArrayLiteralWithoutAllocationSite), R(3), U8(2),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
|
|
B(Star), R(0),
|
|
/* 36 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
|
|
b = [];
|
|
|
|
"
|
|
frame size: 5
|
|
parameter count: 1
|
|
bytecode array length: 20
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(LdaConstant), U8(0),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(37),
|
|
B(Star), R(4),
|
|
B(CallRuntime), U16(Runtime::kCreateArrayLiteralWithoutAllocationSite), R(3), U8(2),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(0),
|
|
B(Star), R(0),
|
|
/* 21 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|