690bda84eb
An IIFE or top-level code is executed only once hence, there is no need to collect type feedback. We can save some memory by not using IC slots for property Loads/Stores within a IIFE/top-level code. This CL emits Runtime Get/Set property calls instead of LdaNamedProperty /StaNamedProperty for the property loads within a IIFE and top-level code. Change-Id: I3e0ce26d05d82bb3648cb9262c4e112a2c4556c9 Reviewed-on: https://chromium-review.googlesource.com/1146579 Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Chandan Reddy <chandanreddy@google.com> Cr-Commit-Position: refs/heads/master@{#54949}
121 lines
3.2 KiB
Plaintext
121 lines
3.2 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
top level: yes
|
|
oneshot opt: no
|
|
|
|
---
|
|
snippet: "
|
|
|
|
l = {
|
|
'a': 1.1,
|
|
'b': 2.2
|
|
};
|
|
|
|
v = l['a'] + l['b'];
|
|
l['b'] = 7;
|
|
l['a'] = l['b'];
|
|
|
|
"
|
|
frame size: 3
|
|
parameter count: 1
|
|
bytecode array length: 74
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(1),
|
|
B(Ldar), R(1),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(1),
|
|
/* 64 S> */ B(LdaGlobal), U8(1), U8(4),
|
|
B(Star), R(1),
|
|
/* 69 E> */ B(LdaNamedProperty), R(1), U8(2), U8(6),
|
|
B(Star), R(1),
|
|
/* 77 E> */ B(LdaGlobal), U8(1), U8(4),
|
|
B(Star), R(2),
|
|
/* 78 E> */ B(LdaNamedProperty), R(2), U8(3), U8(8),
|
|
/* 75 E> */ B(Add), R(1), U8(3),
|
|
/* 66 E> */ B(StaGlobal), U8(4), U8(10),
|
|
/* 91 S> */ B(LdaGlobal), U8(1), U8(4),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(7),
|
|
/* 98 E> */ B(StaNamedProperty), R(1), U8(3), U8(12),
|
|
/* 109 S> */ B(LdaGlobal), U8(1), U8(4),
|
|
B(Star), R(1),
|
|
/* 118 E> */ B(LdaGlobal), U8(1), U8(4),
|
|
B(Star), R(2),
|
|
/* 119 E> */ B(LdaNamedProperty), R(2), U8(3), U8(8),
|
|
B(Star), R(2),
|
|
/* 116 E> */ B(StaNamedProperty), R(1), U8(2), U8(14),
|
|
B(Mov), R(2), R(0),
|
|
B(Ldar), R(0),
|
|
/* 127 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 = {
|
|
'cc': 1.1,
|
|
'dd': 2.2
|
|
};
|
|
if (l['cc'] < 3) {
|
|
l['cc'] = 3;
|
|
} else {
|
|
l['dd'] = 3;
|
|
}
|
|
|
|
"
|
|
frame size: 3
|
|
parameter count: 1
|
|
bytecode array length: 70
|
|
bytecodes: [
|
|
/* 0 E> */ B(StackCheck),
|
|
/* 7 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(1),
|
|
B(Ldar), R(1),
|
|
/* 9 E> */ B(StaGlobal), U8(1), U8(1),
|
|
/* 65 S> */ B(LdaGlobal), U8(1), U8(3),
|
|
B(Star), R(1),
|
|
/* 70 E> */ B(LdaNamedProperty), R(1), U8(2), U8(5),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(3),
|
|
/* 77 E> */ B(TestLessThan), R(1), U8(7),
|
|
B(JumpIfFalse), U8(22),
|
|
/* 92 S> */ B(LdaGlobal), U8(1), U8(3),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(3),
|
|
B(Star), R(2),
|
|
/* 100 E> */ B(StaNamedProperty), R(1), U8(2), U8(8),
|
|
B(Mov), R(2), R(0),
|
|
B(Ldar), R(2),
|
|
B(Jump), U8(20),
|
|
/* 128 S> */ B(LdaGlobal), U8(1), U8(3),
|
|
B(Star), R(1),
|
|
B(LdaSmi), I8(3),
|
|
B(Star), R(2),
|
|
/* 136 E> */ B(StaNamedProperty), R(1), U8(3), U8(10),
|
|
B(Mov), R(2), R(0),
|
|
B(Ldar), R(2),
|
|
B(Ldar), R(0),
|
|
/* 156 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["cc"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["dd"],
|
|
]
|
|
handlers: [
|
|
]
|
|
|