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

Side by Side Diff: test/cctest/interpreter/test-bytecode-generator.cc

Issue 1700993002: Remove strong mode support from property loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. Created 4 years, 10 months 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
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/interpreter/bytecode-array-iterator.h" 8 #include "src/interpreter/bytecode-array-iterator.h"
9 #include "src/interpreter/bytecode-generator.h" 9 #include "src/interpreter/bytecode-generator.h"
10 #include "src/interpreter/interpreter.h" 10 #include "src/interpreter/interpreter.h"
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 FeedbackVectorSpec feedback_spec(&zone); 1058 FeedbackVectorSpec feedback_spec(&zone);
1059 FeedbackVectorSlot slot1 = feedback_spec.AddLoadICSlot(); 1059 FeedbackVectorSlot slot1 = feedback_spec.AddLoadICSlot();
1060 FeedbackVectorSlot slot2 = feedback_spec.AddLoadICSlot(); 1060 FeedbackVectorSlot slot2 = feedback_spec.AddLoadICSlot();
1061 1061
1062 Handle<i::TypeFeedbackVector> vector = 1062 Handle<i::TypeFeedbackVector> vector =
1063 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec); 1063 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec);
1064 1064
1065 // These are a hack used by the LoadICXXXWide tests below. 1065 // These are a hack used by the LoadICXXXWide tests below.
1066 int wide_idx_1 = vector->GetIndex(slot1) - 2; 1066 int wide_idx_1 = vector->GetIndex(slot1) - 2;
1067 int wide_idx_2 = vector->GetIndex(slot1) - 2; 1067 int wide_idx_2 = vector->GetIndex(slot1) - 2;
1068 int wide_idx_3 = vector->GetIndex(slot1) - 2;
1069 int wide_idx_4 = vector->GetIndex(slot1) - 2;
1070 1068
1071 // clang-format off 1069 // clang-format off
1072 ExpectedSnippet<const char*> snippets[] = { 1070 ExpectedSnippet<const char*> snippets[] = {
1073 {"function f(a) { return a.name; }\nf({name : \"test\"})", 1071 {"function f(a) { return a.name; }\nf({name : \"test\"})",
1074 1 * kPointerSize, 1072 1 * kPointerSize,
1075 2, 1073 2,
1076 10, 1074 10,
1077 { 1075 {
1078 B(StackCheck), // 1076 B(StackCheck), //
1079 B(Ldar), A(1, 2), // 1077 B(Ldar), A(1, 2), //
1080 B(Star), R(0), // 1078 B(Star), R(0), //
1081 B(LoadICSloppy), R(0), U8(0), U8(vector->GetIndex(slot1)), // 1079 B(LoadIC), R(0), U8(0), U8(vector->GetIndex(slot1)), //
1082 B(Return), // 1080 B(Return), //
1083 }, 1081 },
1084 1, 1082 1,
1085 {"name"}}, 1083 {"name"}},
1086 {"function f(a) { return a[\"key\"]; }\nf({key : \"test\"})", 1084 {"function f(a) { return a[\"key\"]; }\nf({key : \"test\"})",
1087 1 * kPointerSize, 1085 1 * kPointerSize,
1088 2, 1086 2,
1089 10, 1087 10,
1090 { 1088 {
1091 B(StackCheck), // 1089 B(StackCheck), //
1092 B(Ldar), A(1, 2), // 1090 B(Ldar), A(1, 2), //
1093 B(Star), R(0), // 1091 B(Star), R(0), //
1094 B(LoadICSloppy), R(0), U8(0), U8(vector->GetIndex(slot1)), // 1092 B(LoadIC), R(0), U8(0), U8(vector->GetIndex(slot1)), //
1095 B(Return) // 1093 B(Return) //
1096 }, 1094 },
1097 1, 1095 1,
1098 {"key"}}, 1096 {"key"}},
1099 {"function f(a) { return a[100]; }\nf({100 : \"test\"})", 1097 {"function f(a) { return a[100]; }\nf({100 : \"test\"})",
1100 1 * kPointerSize, 1098 1 * kPointerSize,
1101 2, 1099 2,
1102 11, 1100 11,
1103 { 1101 {
1104 B(StackCheck), // 1102 B(StackCheck), //
1105 B(Ldar), A(1, 2), // 1103 B(Ldar), A(1, 2), //
1106 B(Star), R(0), // 1104 B(Star), R(0), //
1107 B(LdaSmi8), U8(100), // 1105 B(LdaSmi8), U8(100), //
1108 B(KeyedLoadICSloppy), R(0), U8(vector->GetIndex(slot1)), // 1106 B(KeyedLoadIC), R(0), U8(vector->GetIndex(slot1)), //
1109 B(Return) // 1107 B(Return) //
1110 }, 1108 },
1111 0}, 1109 0},
1112 {"function f(a, b) { return a[b]; }\nf({arg : \"test\"}, \"arg\")", 1110 {"function f(a, b) { return a[b]; }\nf({arg : \"test\"}, \"arg\")",
1113 1 * kPointerSize, 1111 1 * kPointerSize,
1114 3, 1112 3,
1115 11, 1113 11,
1116 { 1114 {
1117 B(StackCheck), // 1115 B(StackCheck), //
1118 B(Ldar), A(1, 3), // 1116 B(Ldar), A(1, 3), //
1119 B(Star), R(0), // 1117 B(Star), R(0), //
1120 B(Ldar), A(1, 2), // 1118 B(Ldar), A(1, 2), //
1121 B(KeyedLoadICSloppy), R(0), U8(vector->GetIndex(slot1)), // 1119 B(KeyedLoadIC), R(0), U8(vector->GetIndex(slot1)), //
1122 B(Return) // 1120 B(Return) //
1123 }, 1121 },
1124 0}, 1122 0},
1125 {"function f(a) { var b = a.name; return a[-124]; }\n" 1123 {"function f(a) { var b = a.name; return a[-124]; }\n"
1126 "f({\"-124\" : \"test\", name : 123 })", 1124 "f({\"-124\" : \"test\", name : 123 })",
1127 2 * kPointerSize, 1125 2 * kPointerSize,
1128 2, 1126 2,
1129 21, 1127 21,
1130 { 1128 {
1131 B(StackCheck), // 1129 B(StackCheck), //
1132 B(Ldar), A(1, 2), // 1130 B(Ldar), A(1, 2), //
1133 B(Star), R(1), // 1131 B(Star), R(1), //
1134 B(LoadICSloppy), R(1), U8(0), U8(vector->GetIndex(slot1)), // 1132 B(LoadIC), R(1), U8(0), U8(vector->GetIndex(slot1)), //
1135 B(Star), R(0), // 1133 B(Star), R(0), //
1136 B(Ldar), A(1, 2), // 1134 B(Ldar), A(1, 2), //
1137 B(Star), R(1), // 1135 B(Star), R(1), //
1138 B(LdaSmi8), U8(-124), // 1136 B(LdaSmi8), U8(-124), //
1139 B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot2)), // 1137 B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot2)), //
1140 B(Return), // 1138 B(Return), //
1141 }, 1139 },
1142 1, 1140 1,
1143 {"name"}}, 1141 {"name"}},
1144 {"function f(a) { \"use strict\"; return a.name; }\nf({name : \"test\"})",
1145 1 * kPointerSize,
1146 2,
1147 10,
1148 {
1149 B(StackCheck), //
1150 B(Ldar), A(1, 2), //
1151 B(Star), R(0), //
1152 B(LoadICStrict), R(0), U8(0), U8(vector->GetIndex(slot1)), //
1153 B(Return), //
1154 },
1155 1,
1156 {"name"}},
1157 {"function f(a, b) { \"use strict\"; return a[b]; }\n"
1158 "f({arg : \"test\"}, \"arg\")",
1159 1 * kPointerSize,
1160 3,
1161 11,
1162 {
1163 B(StackCheck), //
1164 B(Ldar), A(1, 3), //
1165 B(Star), R(0), //
1166 B(Ldar), A(2, 3), //
1167 B(KeyedLoadICStrict), R(0), U8(vector->GetIndex(slot1)), //
1168 B(Return), //
1169 },
1170 0},
1171 {"function f(a) {\n" 1142 {"function f(a) {\n"
1172 " var b;\n" 1143 " var b;\n"
1173 "b = a.name;" 1144 "b = a.name;"
1174 REPEAT_127(SPACE, " b = a.name; ") 1145 REPEAT_127(SPACE, " b = a.name; ")
1175 " return a.name; }\n" 1146 " return a.name; }\n"
1176 "f({name : \"test\"})\n", 1147 "f({name : \"test\"})\n",
1177 2 * kPointerSize, 1148 2 * kPointerSize,
1178 2, 1149 2,
1179 1292, 1150 1292,
1180 { 1151 {
1181 B(StackCheck), // 1152 B(StackCheck), //
1182 B(Ldar), A(1, 2), // 1153 B(Ldar), A(1, 2), //
1183 B(Star), R(1), // 1154 B(Star), R(1), //
1184 B(LoadICSloppy), R(1), U8(0), U8(wide_idx_1 += 2), // 1155 B(LoadIC), R(1), U8(0), U8(wide_idx_1 += 2), //
1185 B(Star), R(0), // 1156 B(Star), R(0), //
1186 REPEAT_127(COMMA, // 1157 REPEAT_127(COMMA, //
1187 B(Ldar), A(1, 2), // 1158 B(Ldar), A(1, 2), //
1188 B(Star), R(1), // 1159 B(Star), R(1), //
1189 B(LoadICSloppy), R(1), U8(0), // 1160 B(LoadIC), R(1), U8(0), //
1190 U8((wide_idx_1 += 2)), // 1161 U8((wide_idx_1 += 2)), //
1191 B(Star), R(0)), // 1162 B(Star), R(0)), //
1192 B(Ldar), A(1, 2), // 1163 B(Ldar), A(1, 2), //
1193 B(Star), R(1), // 1164 B(Star), R(1), //
1194 B(LoadICSloppyWide), R(1), U16(0), U16(wide_idx_1 + 2), // 1165 B(LoadICWide), R(1), U16(0), U16(wide_idx_1 + 2), //
1195 B(Return), // 1166 B(Return), //
1196 }, 1167 },
1197 1, 1168 1,
1198 {"name"}},
1199 {"function f(a) {\n"
1200 " 'use strict'; var b;\n"
1201 " b = a.name;\n"
1202 REPEAT_127(SPACE, " b = a.name; ")
1203 " return a.name; }\n"
1204 "f({name : \"test\"})\n",
1205 2 * kPointerSize,
1206 2,
1207 1292,
1208 {
1209 B(StackCheck), //
1210 B(Ldar), A(1, 2), //
1211 B(Star), R(1), //
1212 B(LoadICStrict), R(1), U8(0), U8((wide_idx_2 += 2)), //
1213 B(Star), R(0), //
1214 REPEAT_127(COMMA, //
1215 B(Ldar), A(1, 2), //
1216 B(Star), R(1), //
1217 B(LoadICStrict), R(1), U8(0), //
1218 U8((wide_idx_2 += 2)), //
1219 B(Star), R(0)), //
1220 B(Ldar), A(1, 2), //
1221 B(Star), R(1), //
1222 B(LoadICStrictWide), R(1), U16(0), U16(wide_idx_2 + 2), //
1223 B(Return), //
1224 },
1225 1,
1226 {"name"}}, 1169 {"name"}},
1227 {"function f(a, b) {\n" 1170 {"function f(a, b) {\n"
1228 " var c;\n" 1171 " var c;\n"
1229 " c = a[b];" 1172 " c = a[b];"
1230 REPEAT_127(SPACE, " c = a[b]; ") 1173 REPEAT_127(SPACE, " c = a[b]; ")
1231 " return a[b]; }\n" 1174 " return a[b]; }\n"
1232 "f({name : \"test\"}, \"name\")\n", 1175 "f({name : \"test\"}, \"name\")\n",
1233 2 * kPointerSize, 1176 2 * kPointerSize,
1234 3, 1177 3,
1235 1420, 1178 1420,
1236 { 1179 {
1237 B(StackCheck), // 1180 B(StackCheck), //
1238 B(Ldar), A(1, 3), // 1181 B(Ldar), A(1, 3), //
1239 B(Star), R(1), // 1182 B(Star), R(1), //
1240 B(Ldar), A(2, 3), // 1183 B(Ldar), A(2, 3), //
1241 B(KeyedLoadICSloppy), R(1), U8((wide_idx_3 += 2)), // 1184 B(KeyedLoadIC), R(1), U8((wide_idx_2 += 2)), //
1242 B(Star), R(0), // 1185 B(Star), R(0), //
1243 REPEAT_127(COMMA, // 1186 REPEAT_127(COMMA, //
1244 B(Ldar), A(1, 3), // 1187 B(Ldar), A(1, 3), //
1245 B(Star), R(1), // 1188 B(Star), R(1), //
1246 B(Ldar), A(2, 3), // 1189 B(Ldar), A(2, 3), //
1247 B(KeyedLoadICSloppy), R(1), U8((wide_idx_3 += 2)), // 1190 B(KeyedLoadIC), R(1), U8((wide_idx_2 += 2)), //
1248 B(Star), R(0)), // 1191 B(Star), R(0)), //
1249 B(Ldar), A(1, 3), // 1192 B(Ldar), A(1, 3), //
1250 B(Star), R(1), // 1193 B(Star), R(1), //
1251 B(Ldar), A(2, 3), // 1194 B(Ldar), A(2, 3), //
1252 B(KeyedLoadICSloppyWide), R(1), U16(wide_idx_3 + 2), // 1195 B(KeyedLoadICWide), R(1), U16(wide_idx_2 + 2), //
1253 B(Return), //
1254 }},
1255 {"function f(a, b) {\n"
1256 " 'use strict'; var c;\n"
1257 " c = a[b];"
1258 REPEAT_127(SPACE, " c = a[b]; ")
1259 " return a[b]; }\n"
1260 "f({name : \"test\"}, \"name\")\n",
1261 2 * kPointerSize,
1262 3,
1263 1420,
1264 {
1265 B(StackCheck), //
1266 B(Ldar), A(1, 3), //
1267 B(Star), R(1), //
1268 B(Ldar), A(2, 3), //
1269 B(KeyedLoadICStrict), R(1), U8((wide_idx_4 += 2)), //
1270 B(Star), R(0), //
1271 REPEAT_127(COMMA, //
1272 B(Ldar), A(1, 3), //
1273 B(Star), R(1), //
1274 B(Ldar), A(2, 3), //
1275 B(KeyedLoadICStrict), R(1), U8((wide_idx_4 += 2)), //
1276 B(Star), R(0)), //
1277 B(Ldar), A(1, 3), //
1278 B(Star), R(1), //
1279 B(Ldar), A(2, 3), //
1280 B(KeyedLoadICStrictWide), R(1), U16(wide_idx_4 + 2), //
1281 B(Return), // 1196 B(Return), //
1282 }}, 1197 }},
1283 }; 1198 };
1284 // clang-format on 1199 // clang-format on
1285 1200
1286 for (size_t i = 0; i < arraysize(snippets); i++) { 1201 for (size_t i = 0; i < arraysize(snippets); i++) {
1287 Handle<BytecodeArray> bytecode_array = 1202 Handle<BytecodeArray> bytecode_array =
1288 helper.MakeBytecode(snippets[i].code_snippet, helper.kFunctionName); 1203 helper.MakeBytecode(snippets[i].code_snippet, helper.kFunctionName);
1289 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 1204 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
1290 } 1205 }
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 2 * kPointerSize, 1297 2 * kPointerSize,
1383 2, 1298 2,
1384 20, 1299 20,
1385 { 1300 {
1386 B(StackCheck), // 1301 B(StackCheck), //
1387 B(Ldar), A(1, 2), // 1302 B(Ldar), A(1, 2), //
1388 B(Star), R(0), // 1303 B(Star), R(0), //
1389 B(Ldar), A(1, 2), // 1304 B(Ldar), A(1, 2), //
1390 B(Star), R(1), // 1305 B(Star), R(1), //
1391 B(LdaSmi8), U8(-124), // 1306 B(LdaSmi8), U8(-124), //
1392 B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot1)), // 1307 B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot1)), //
1393 B(StoreICSloppy), R(0), U8(0), U8(vector->GetIndex(slot2)), // 1308 B(StoreICSloppy), R(0), U8(0), U8(vector->GetIndex(slot2)), //
1394 B(LdaUndefined), // 1309 B(LdaUndefined), //
1395 B(Return), // 1310 B(Return), //
1396 }, 1311 },
1397 1, 1312 1,
1398 {"name"}}, 1313 {"name"}},
1399 {"function f(a) { \"use strict\"; a.name = \"val\"; }\n" 1314 {"function f(a) { \"use strict\"; a.name = \"val\"; }\n"
1400 "f({name : \"test\"})", 1315 "f({name : \"test\"})",
1401 kPointerSize, 1316 kPointerSize,
1402 2, 1317 2,
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 // clang-format off 1503 // clang-format off
1589 ExpectedSnippet<const char*> snippets[] = { 1504 ExpectedSnippet<const char*> snippets[] = {
1590 {"function f(a) { return a.func(); }\nf(" FUNC_ARG ")", 1505 {"function f(a) { return a.func(); }\nf(" FUNC_ARG ")",
1591 2 * kPointerSize, 1506 2 * kPointerSize,
1592 2, 1507 2,
1593 17, 1508 17,
1594 { 1509 {
1595 B(StackCheck), // 1510 B(StackCheck), //
1596 B(Ldar), A(1, 2), // 1511 B(Ldar), A(1, 2), //
1597 B(Star), R(1), // 1512 B(Star), R(1), //
1598 B(LoadICSloppy), R(1), U8(0), U8(vector->GetIndex(slot2)), // 1513 B(LoadIC), R(1), U8(0), U8(vector->GetIndex(slot2)), //
1599 B(Star), R(0), // 1514 B(Star), R(0), //
1600 B(Call), R(0), R(1), U8(1), U8(vector->GetIndex(slot1)), // 1515 B(Call), R(0), R(1), U8(1), U8(vector->GetIndex(slot1)), //
1601 B(Return), // 1516 B(Return), //
1602 }, 1517 },
1603 1, 1518 1,
1604 {"func"}}, 1519 {"func"}},
1605 {"function f(a, b, c) { return a.func(b, c); }\nf(" FUNC_ARG ", 1, 2)", 1520 {"function f(a, b, c) { return a.func(b, c); }\nf(" FUNC_ARG ", 1, 2)",
1606 4 * kPointerSize, 1521 4 * kPointerSize,
1607 4, 1522 4,
1608 25, 1523 25,
1609 { 1524 {
1610 B(StackCheck), // 1525 B(StackCheck), //
1611 B(Ldar), A(1, 4), // 1526 B(Ldar), A(1, 4), //
1612 B(Star), R(1), // 1527 B(Star), R(1), //
1613 B(LoadICSloppy), R(1), U8(0), U8(vector->GetIndex(slot2)), // 1528 B(LoadIC), R(1), U8(0), U8(vector->GetIndex(slot2)), //
1614 B(Star), R(0), // 1529 B(Star), R(0), //
1615 B(Ldar), A(2, 4), // 1530 B(Ldar), A(2, 4), //
1616 B(Star), R(2), // 1531 B(Star), R(2), //
1617 B(Ldar), A(3, 4), // 1532 B(Ldar), A(3, 4), //
1618 B(Star), R(3), // 1533 B(Star), R(3), //
1619 B(Call), R(0), R(1), U8(3), U8(vector->GetIndex(slot1)), // 1534 B(Call), R(0), R(1), U8(3), U8(vector->GetIndex(slot1)), //
1620 B(Return) // 1535 B(Return) //
1621 }, 1536 },
1622 1, 1537 1,
1623 {"func"}}, 1538 {"func"}},
1624 {"function f(a, b) { return a.func(b + b, b); }\nf(" FUNC_ARG ", 1)", 1539 {"function f(a, b) { return a.func(b + b, b); }\nf(" FUNC_ARG ", 1)",
1625 4 * kPointerSize, 1540 4 * kPointerSize,
1626 3, 1541 3,
1627 31, 1542 31,
1628 { 1543 {
1629 B(StackCheck), // 1544 B(StackCheck), //
1630 B(Ldar), A(1, 3), // 1545 B(Ldar), A(1, 3), //
1631 B(Star), R(1), // 1546 B(Star), R(1), //
1632 B(LoadICSloppy), R(1), U8(0), U8(vector->GetIndex(slot2)), // 1547 B(LoadIC), R(1), U8(0), U8(vector->GetIndex(slot2)), //
1633 B(Star), R(0), // 1548 B(Star), R(0), //
1634 B(Ldar), A(2, 3), // 1549 B(Ldar), A(2, 3), //
1635 B(Star), R(3), // 1550 B(Star), R(3), //
1636 B(Ldar), A(2, 3), // 1551 B(Ldar), A(2, 3), //
1637 B(Add), R(3), // 1552 B(Add), R(3), //
1638 B(Star), R(2), // 1553 B(Star), R(2), //
1639 B(Ldar), A(2, 3), // 1554 B(Ldar), A(2, 3), //
1640 B(Star), R(3), // 1555 B(Star), R(3), //
1641 B(Call), R(0), R(1), U8(3), U8(vector->GetIndex(slot1)), // 1556 B(Call), R(0), R(1), U8(3), U8(vector->GetIndex(slot1)), //
1642 B(Return), // 1557 B(Return), //
1643 }, 1558 },
1644 1, 1559 1,
1645 {"func"}}, 1560 {"func"}},
1646 {"function f(a) {\n" 1561 {"function f(a) {\n"
1647 " a.func;\n" REPEAT_127( 1562 " a.func;\n" REPEAT_127(
1648 SPACE, " a.func;\n") " return a.func(); }\nf(" FUNC_ARG ")", 1563 SPACE, " a.func;\n") " return a.func(); }\nf(" FUNC_ARG ")",
1649 2 * kPointerSize, 1564 2 * kPointerSize,
1650 2, 1565 2,
1651 1047, 1566 1047,
1652 { 1567 {
1653 B(StackCheck), // 1568 B(StackCheck), //
1654 B(Ldar), A(1, 2), // 1569 B(Ldar), A(1, 2), //
1655 B(Star), R(0), // 1570 B(Star), R(0), //
1656 B(LoadICSloppy), R(0), U8(0), U8(wide_idx += 2), // 1571 B(LoadIC), R(0), U8(0), U8(wide_idx += 2), //
1657 REPEAT_127(COMMA, // 1572 REPEAT_127(COMMA, //
1658 B(Ldar), A(1, 2), // 1573 B(Ldar), A(1, 2), //
1659 B(Star), R(0), // 1574 B(Star), R(0), //
1660 B(LoadICSloppy), R(0), U8(0), U8((wide_idx += 2))), // 1575 B(LoadIC), R(0), U8(0), U8((wide_idx += 2))), //
1661 B(Ldar), A(1, 2), // 1576 B(Ldar), A(1, 2), //
1662 B(Star), R(1), // 1577 B(Star), R(1), //
1663 B(LoadICSloppyWide), R(1), U16(0), U16(wide_idx + 4), // 1578 B(LoadICWide), R(1), U16(0), U16(wide_idx + 4), //
1664 B(Star), R(0), // 1579 B(Star), R(0), //
1665 B(CallWide), R16(0), R16(1), U16(1), U16(wide_idx + 2), // 1580 B(CallWide), R16(0), R16(1), U16(1), U16(wide_idx + 2), //
1666 B(Return), // 1581 B(Return), //
1667 }, 1582 },
1668 1, 1583 1,
1669 {"func"}}, 1584 {"func"}},
1670 }; 1585 };
1671 // clang-format on 1586 // clang-format on
1672 1587
1673 for (size_t i = 0; i < arraysize(snippets); i++) { 1588 for (size_t i = 0; i < arraysize(snippets); i++) {
(...skipping 10 matching lines...) Expand all
1684 Zone zone; 1599 Zone zone;
1685 1600
1686 FeedbackVectorSpec feedback_spec(&zone); 1601 FeedbackVectorSpec feedback_spec(&zone);
1687 FeedbackVectorSlot slot = feedback_spec.AddLoadICSlot(); 1602 FeedbackVectorSlot slot = feedback_spec.AddLoadICSlot();
1688 1603
1689 Handle<i::TypeFeedbackVector> vector = 1604 Handle<i::TypeFeedbackVector> vector =
1690 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec); 1605 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec);
1691 1606
1692 // These are a hack used by the LdaGlobalXXXWide tests below. 1607 // These are a hack used by the LdaGlobalXXXWide tests below.
1693 int wide_idx_1 = vector->GetIndex(slot) - 2; 1608 int wide_idx_1 = vector->GetIndex(slot) - 2;
1694 int wide_idx_2 = vector->GetIndex(slot) - 2;
1695 1609
1696 // clang-format off 1610 // clang-format off
1697 ExpectedSnippet<const char*> snippets[] = { 1611 ExpectedSnippet<const char*> snippets[] = {
1698 {"var a = 1;\nfunction f() { return a; }\nf()", 1612 {"var a = 1;\nfunction f() { return a; }\nf()",
1699 0, 1613 0,
1700 1, 1614 1,
1701 5, 1615 5,
1702 { 1616 {
1703 B(StackCheck), // 1617 B(StackCheck), //
1704 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot)), // 1618 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
1705 B(Return) // 1619 B(Return) //
1706 }, 1620 },
1707 1, 1621 1,
1708 {"a"}}, 1622 {"a"}},
1709 {"function t() { }\nfunction f() { return t; }\nf()", 1623 {"function t() { }\nfunction f() { return t; }\nf()",
1710 0, 1624 0,
1711 1, 1625 1,
1712 5, 1626 5,
1713 { 1627 {
1714 B(StackCheck), // 1628 B(StackCheck), //
1715 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot)), // 1629 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
1716 B(Return) // 1630 B(Return) //
1717 }, 1631 },
1718 1, 1632 1,
1719 {"t"}}, 1633 {"t"}},
1720 {"'use strict'; var a = 1;\nfunction f() { return a; }\nf()",
1721 0,
1722 1,
1723 5,
1724 {
1725 B(StackCheck), //
1726 B(LdaGlobalStrict), U8(0), U8(vector->GetIndex(slot)), //
1727 B(Return) //
1728 },
1729 1,
1730 {"a"}},
1731 {"a = 1;\nfunction f() { return a; }\nf()", 1634 {"a = 1;\nfunction f() { return a; }\nf()",
1732 0, 1635 0,
1733 1, 1636 1,
1734 5, 1637 5,
1735 { 1638 {
1736 B(StackCheck), // 1639 B(StackCheck), //
1737 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot)), // 1640 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
1738 B(Return) // 1641 B(Return) //
1739 }, 1642 },
1740 1, 1643 1,
1741 {"a"}}, 1644 {"a"}},
1742 {"a = 1;" 1645 {"a = 1;"
1743 "function f(b) {\n" 1646 "function f(b) {\n"
1744 " b.name;\n" 1647 " b.name;\n"
1745 REPEAT_127(SPACE, "b.name; ") 1648 REPEAT_127(SPACE, "b.name; ")
1746 " return a;" 1649 " return a;"
1747 "}\nf({name: 1});", 1650 "}\nf({name: 1});",
1748 kPointerSize, 1651 kPointerSize,
1749 2, 1652 2,
1750 1031, 1653 1031,
1751 { 1654 {
1752 B(StackCheck), // 1655 B(StackCheck), //
1753 B(Ldar), A(1, 2), // 1656 B(Ldar), A(1, 2), //
1754 B(Star), R(0), // 1657 B(Star), R(0), //
1755 B(LoadICSloppy), R(0), U8(0), U8(wide_idx_1 += 2), // 1658 B(LoadIC), R(0), U8(0), U8(wide_idx_1 += 2), //
1756 REPEAT_127(COMMA, // 1659 REPEAT_127(COMMA, //
1757 B(Ldar), A(1, 2), // 1660 B(Ldar), A(1, 2), //
1758 B(Star), R(0), // 1661 B(Star), R(0), //
1759 B(LoadICSloppy), R(0), U8(0), U8(wide_idx_1 += 2)), // 1662 B(LoadIC), R(0), U8(0), U8(wide_idx_1 += 2)), //
1760 B(LdaGlobalSloppyWide), U16(1), U16(wide_idx_1 + 2), // 1663 B(LdaGlobalWide), U16(1), U16(wide_idx_1 + 2), //
1761 B(Return), // 1664 B(Return), //
1762 }, 1665 },
1763 2, 1666 2,
1764 {"name", "a"}},
1765 {"a = 1;"
1766 "function f(b) {\n"
1767 " 'use strict';\n"
1768 " b.name\n"
1769 REPEAT_127(SPACE, "b.name; ")
1770 " return a;"
1771 "}\nf({name: 1});",
1772 kPointerSize,
1773 2,
1774 1031,
1775 {
1776 B(StackCheck), //
1777 B(Ldar), A(1, 2), //
1778 B(Star), R(0), //
1779 B(LoadICStrict), R(0), U8(0), U8(wide_idx_2 += 2), //
1780 REPEAT_127(COMMA, //
1781 B(Ldar), A(1, 2), //
1782 B(Star), R(0), //
1783 B(LoadICStrict), R(0), U8(0), U8(wide_idx_2 += 2)), //
1784 B(LdaGlobalStrictWide), U16(1), U16(wide_idx_2 + 2), //
1785 B(Return), //
1786 },
1787 2,
1788 {"name", "a"}}, 1667 {"name", "a"}},
1789 }; 1668 };
1790 // clang-format on 1669 // clang-format on
1791 1670
1792 for (size_t i = 0; i < arraysize(snippets); i++) { 1671 for (size_t i = 0; i < arraysize(snippets); i++) {
1793 Handle<BytecodeArray> bytecode_array = 1672 Handle<BytecodeArray> bytecode_array =
1794 helper.MakeBytecode(snippets[i].code_snippet, "f"); 1673 helper.MakeBytecode(snippets[i].code_snippet, "f");
1795 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 1674 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
1796 } 1675 }
1797 } 1676 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 REPEAT_127(SPACE, "b.name; ") 1751 REPEAT_127(SPACE, "b.name; ")
1873 " a = 2; }\n" 1752 " a = 2; }\n"
1874 "f({name: 1});", 1753 "f({name: 1});",
1875 kPointerSize, 1754 kPointerSize,
1876 2, 1755 2,
1877 1034, 1756 1034,
1878 { 1757 {
1879 B(StackCheck), // 1758 B(StackCheck), //
1880 B(Ldar), A(1, 2), // 1759 B(Ldar), A(1, 2), //
1881 B(Star), R(0), // 1760 B(Star), R(0), //
1882 B(LoadICSloppy), R(0), U8(0), U8(wide_idx_1 += 2), // 1761 B(LoadIC), R(0), U8(0), U8(wide_idx_1 += 2), //
1883 REPEAT_127(COMMA, // 1762 REPEAT_127(COMMA, //
1884 B(Ldar), A(1, 2), // 1763 B(Ldar), A(1, 2), //
1885 B(Star), R(0), // 1764 B(Star), R(0), //
1886 B(LoadICSloppy), R(0), U8(0), U8(wide_idx_1 += 2)), // 1765 B(LoadIC), R(0), U8(0), U8(wide_idx_1 += 2)), //
1887 B(LdaSmi8), U8(2), // 1766 B(LdaSmi8), U8(2), //
1888 B(StaGlobalSloppyWide), U16(1), U16(wide_idx_1 + 2), // 1767 B(StaGlobalSloppyWide), U16(1), U16(wide_idx_1 + 2), //
1889 B(LdaUndefined), // 1768 B(LdaUndefined), //
1890 B(Return), // 1769 B(Return), //
1891 }, 1770 },
1892 2, 1771 2,
1893 {"name", "a"}}, 1772 {"name", "a"}},
1894 {"a = 1;" 1773 {"a = 1;"
1895 "function f(b) {\n" 1774 "function f(b) {\n"
1896 " 'use strict';\n" 1775 " 'use strict';\n"
1897 " b.name;\n" 1776 " b.name;\n"
1898 REPEAT_127(SPACE, "b.name; ") 1777 REPEAT_127(SPACE, "b.name; ")
1899 " a = 2; }\n" 1778 " a = 2; }\n"
1900 "f({name: 1});", 1779 "f({name: 1});",
1901 kPointerSize, 1780 kPointerSize,
1902 2, 1781 2,
1903 1034, 1782 1034,
1904 { 1783 {
1905 B(StackCheck), // 1784 B(StackCheck), //
1906 B(Ldar), A(1, 2), // 1785 B(Ldar), A(1, 2), //
1907 B(Star), R(0), // 1786 B(Star), R(0), //
1908 B(LoadICStrict), R(0), U8(0), U8(wide_idx_2 += 2), // 1787 B(LoadIC), R(0), U8(0), U8(wide_idx_2 += 2), //
1909 REPEAT_127(COMMA, // 1788 REPEAT_127(COMMA, //
1910 B(Ldar), A(1, 2), // 1789 B(Ldar), A(1, 2), //
1911 B(Star), R(0), // 1790 B(Star), R(0), //
1912 B(LoadICStrict), R(0), U8(0), U8(wide_idx_2 += 2)), // 1791 B(LoadIC), R(0), U8(0), U8(wide_idx_2 += 2)), //
1913 B(LdaSmi8), U8(2), // 1792 B(LdaSmi8), U8(2), //
1914 B(StaGlobalStrictWide), U16(1), U16(wide_idx_2 + 2), // 1793 B(StaGlobalStrictWide), U16(1), U16(wide_idx_2 + 2), //
1915 B(LdaUndefined), // 1794 B(LdaUndefined), //
1916 B(Return), // 1795 B(Return), //
1917 }, 1796 },
1918 2, 1797 2,
1919 {"name", "a"}}, 1798 {"name", "a"}},
1920 }; 1799 };
1921 // clang-format on 1800 // clang-format on
1922 1801
(...skipping 20 matching lines...) Expand all
1943 // clang-format off 1822 // clang-format off
1944 ExpectedSnippet<const char*> snippets[] = { 1823 ExpectedSnippet<const char*> snippets[] = {
1945 {"function t() { }\nfunction f() { return t(); }\nf()", 1824 {"function t() { }\nfunction f() { return t(); }\nf()",
1946 2 * kPointerSize, 1825 2 * kPointerSize,
1947 1, 1826 1,
1948 15, 1827 15,
1949 { 1828 {
1950 B(StackCheck), // 1829 B(StackCheck), //
1951 B(LdaUndefined), // 1830 B(LdaUndefined), //
1952 B(Star), R(1), // 1831 B(Star), R(1), //
1953 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 1832 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
1954 B(Star), R(0), // 1833 B(Star), R(0), //
1955 B(Call), R(0), R(1), U8(1), U8(vector->GetIndex(slot1)), // 1834 B(Call), R(0), R(1), U8(1), U8(vector->GetIndex(slot1)), //
1956 B(Return) // 1835 B(Return) //
1957 }, 1836 },
1958 1, 1837 1,
1959 {"t"}}, 1838 {"t"}},
1960 {"function t(a, b, c) { }\nfunction f() { return t(1, 2, 3); }\nf()", 1839 {"function t(a, b, c) { }\nfunction f() { return t(1, 2, 3); }\nf()",
1961 5 * kPointerSize, 1840 5 * kPointerSize,
1962 1, 1841 1,
1963 27, 1842 27,
1964 { 1843 {
1965 B(StackCheck), // 1844 B(StackCheck), //
1966 B(LdaUndefined), // 1845 B(LdaUndefined), //
1967 B(Star), R(1), // 1846 B(Star), R(1), //
1968 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 1847 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
1969 B(Star), R(0), // 1848 B(Star), R(0), //
1970 B(LdaSmi8), U8(1), // 1849 B(LdaSmi8), U8(1), //
1971 B(Star), R(2), // 1850 B(Star), R(2), //
1972 B(LdaSmi8), U8(2), // 1851 B(LdaSmi8), U8(2), //
1973 B(Star), R(3), // 1852 B(Star), R(3), //
1974 B(LdaSmi8), U8(3), // 1853 B(LdaSmi8), U8(3), //
1975 B(Star), R(4), // 1854 B(Star), R(4), //
1976 B(Call), R(0), R(1), U8(4), U8(vector->GetIndex(slot1)), // 1855 B(Call), R(0), R(1), U8(4), U8(vector->GetIndex(slot1)), //
1977 B(Return) // 1856 B(Return) //
1978 }, 1857 },
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 29, 2291 29,
2413 { 2292 {
2414 B(LdaConstant), U8(0), // 2293 B(LdaConstant), U8(0), //
2415 B(Star), R(1), // 2294 B(Star), R(1), //
2416 B(LdaZero), // 2295 B(LdaZero), //
2417 B(Star), R(2), // 2296 B(Star), R(2), //
2418 B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2), // 2297 B(CallRuntime), U16(Runtime::kDeclareGlobals), R(1), U8(2), //
2419 B(StackCheck), // 2298 B(StackCheck), //
2420 B(LdaUndefined), // 2299 B(LdaUndefined), //
2421 B(Star), R(2), // 2300 B(Star), R(2), //
2422 B(LdaGlobalSloppy), U8(1), // 2301 B(LdaGlobal), U8(1), U8(load_vector->GetIndex(load_slot_1)), //
2423 /* */ U8(load_vector->GetIndex(load_slot_1)), //
2424 B(Star), R(1), // 2302 B(Star), R(1), //
2425 B(Call), R(1), R(2), U8(1), // 2303 B(Call), R(1), R(2), U8(1), //
2426 /* */ U8(load_vector->GetIndex(call_slot_1)), // 2304 /* */ U8(load_vector->GetIndex(call_slot_1)), //
2427 B(Star), R(0), // 2305 B(Star), R(0), //
2428 B(Return) // 2306 B(Return) //
2429 }, 2307 },
2430 2, 2308 2,
2431 {InstanceType::FIXED_ARRAY_TYPE, 2309 {InstanceType::FIXED_ARRAY_TYPE,
2432 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 2310 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
2433 }; 2311 };
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
3652 B(Return), // 3530 B(Return), //
3653 }}, 3531 }},
3654 {"var x = 13;\n" 3532 {"var x = 13;\n"
3655 "function f() {\n" 3533 "function f() {\n"
3656 " return typeof(x);\n" 3534 " return typeof(x);\n"
3657 "}; f();", 3535 "}; f();",
3658 0, 3536 0,
3659 1, 3537 1,
3660 6, 3538 6,
3661 { 3539 {
3662 B(StackCheck), // 3540 B(StackCheck), //
3663 B(LdaGlobalInsideTypeofSloppy), U8(0), // 3541 B(LdaGlobalInsideTypeof), U8(0), U8(vector->GetIndex(slot)), //
3664 /* */ U8(vector->GetIndex(slot)), // 3542 B(TypeOf), //
3665 B(TypeOf), // 3543 B(Return), //
3666 B(Return), //
3667 }, 3544 },
3668 1, 3545 1,
3669 {"x"}}, 3546 {"x"}},
3670 {"var x = 13;\n"
3671 "function f() {\n"
3672 " 'use strict';\n"
3673 " return typeof(x);\n"
3674 "}; f();",
3675 0,
3676 1,
3677 6,
3678 {
3679 B(StackCheck), //
3680 B(LdaGlobalInsideTypeofStrict), U8(0), //
3681 /* */ U8(vector->GetIndex(slot)), //
3682 B(TypeOf), //
3683 B(Return), //
3684 },
3685 1,
3686 {"x"}},
3687 }; 3547 };
3688 // clang-format on 3548 // clang-format on
3689 3549
3690 for (size_t i = 0; i < arraysize(snippets); i++) { 3550 for (size_t i = 0; i < arraysize(snippets); i++) {
3691 Handle<BytecodeArray> bytecode_array = 3551 Handle<BytecodeArray> bytecode_array =
3692 helper.MakeBytecodeForFunction(snippets[i].code_snippet); 3552 helper.MakeBytecodeForFunction(snippets[i].code_snippet);
3693 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 3553 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
3694 } 3554 }
3695 } 3555 }
3696 3556
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
3818 Handle<i::TypeFeedbackVector> vector = 3678 Handle<i::TypeFeedbackVector> vector =
3819 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec); 3679 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec);
3820 3680
3821 // clang-format off 3681 // clang-format off
3822 ExpectedSnippet<InstanceType> snippets[] = { 3682 ExpectedSnippet<InstanceType> snippets[] = {
3823 {"var a = {x:13, y:14};\n function f() { return delete a.x; };\n f();", 3683 {"var a = {x:13, y:14};\n function f() { return delete a.x; };\n f();",
3824 1 * kPointerSize, 3684 1 * kPointerSize,
3825 1, 3685 1,
3826 11, 3686 11,
3827 {B(StackCheck), // 3687 {B(StackCheck), //
3828 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot)), // 3688 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
3829 B(Star), R(0), // 3689 B(Star), R(0), //
3830 B(LdaConstant), U8(1), // 3690 B(LdaConstant), U8(1), //
3831 B(DeletePropertySloppy), R(0), // 3691 B(DeletePropertySloppy), R(0), //
3832 B(Return)}, 3692 B(Return)},
3833 2, 3693 2,
3834 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 3694 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
3835 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 3695 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
3836 {"a = {1:13, 2:14};\n" 3696 {"a = {1:13, 2:14};\n"
3837 "function f() {'use strict'; return delete a[1];};\n f();", 3697 "function f() {'use strict'; return delete a[1];};\n f();",
3838 1 * kPointerSize, 3698 1 * kPointerSize,
3839 1, 3699 1,
3840 11, 3700 11,
3841 {B(StackCheck), // 3701 {B(StackCheck), //
3842 B(LdaGlobalStrict), U8(0), U8(vector->GetIndex(slot)), // 3702 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot)), //
3843 B(Star), R(0), // 3703 B(Star), R(0), //
3844 B(LdaSmi8), U8(1), // 3704 B(LdaSmi8), U8(1), //
3845 B(DeletePropertyStrict), R(0), // 3705 B(DeletePropertyStrict), R(0), //
3846 B(Return)}, 3706 B(Return)},
3847 1, 3707 1,
3848 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 3708 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
3849 {"var a = {x:13, y:14};\n function f() { return delete a; };\n f();", 3709 {"var a = {x:13, y:14};\n function f() { return delete a; };\n f();",
3850 2 * kPointerSize, 3710 2 * kPointerSize,
3851 1, 3711 1,
3852 16, 3712 16,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
3990 1, 3850 1,
3991 {"(\\w+)\\s(\\w+)"}}, 3851 {"(\\w+)\\s(\\w+)"}},
3992 {"return /ab+d/.exec('abdd');", 3852 {"return /ab+d/.exec('abdd');",
3993 3 * kPointerSize, 3853 3 * kPointerSize,
3994 1, 3854 1,
3995 23, 3855 23,
3996 { 3856 {
3997 B(StackCheck), // 3857 B(StackCheck), //
3998 B(CreateRegExpLiteral), U8(0), U8(0), U8(0), // 3858 B(CreateRegExpLiteral), U8(0), U8(0), U8(0), //
3999 B(Star), R(1), // 3859 B(Star), R(1), //
4000 B(LoadICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), // 3860 B(LoadIC), R(1), U8(1), U8(vector->GetIndex(slot2)), //
4001 B(Star), R(0), // 3861 B(Star), R(0), //
4002 B(LdaConstant), U8(2), // 3862 B(LdaConstant), U8(2), //
4003 B(Star), R(2), // 3863 B(Star), R(2), //
4004 B(Call), R(0), R(1), U8(2), U8(vector->GetIndex(slot1)), // 3864 B(Call), R(0), R(1), U8(2), U8(vector->GetIndex(slot1)), //
4005 B(Return), // 3865 B(Return), //
4006 }, 3866 },
4007 3, 3867 3,
4008 {"ab+d", "exec", "abdd"}}, 3868 {"ab+d", "exec", "abdd"}},
4009 }; 3869 };
4010 // clang-format on 3870 // clang-format on
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
5029 // clang-format off 4889 // clang-format off
5030 ExpectedSnippet<InstanceType> snippets[] = { 4890 ExpectedSnippet<InstanceType> snippets[] = {
5031 {"function bar() { this.value = 0; }\n" 4891 {"function bar() { this.value = 0; }\n"
5032 "function f() { return new bar(); }\n" 4892 "function f() { return new bar(); }\n"
5033 "f()", 4893 "f()",
5034 1 * kPointerSize, 4894 1 * kPointerSize,
5035 1, 4895 1,
5036 11, 4896 11,
5037 { 4897 {
5038 B(StackCheck), // 4898 B(StackCheck), //
5039 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 4899 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
5040 B(Star), R(0), // 4900 B(Star), R(0), //
5041 B(New), R(0), R(0), U8(0), // 4901 B(New), R(0), R(0), U8(0), //
5042 B(Return), // 4902 B(Return), //
5043 }, 4903 },
5044 1, 4904 1,
5045 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 4905 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
5046 {"function bar(x) { this.value = 18; this.x = x;}\n" 4906 {"function bar(x) { this.value = 18; this.x = x;}\n"
5047 "function f() { return new bar(3); }\n" 4907 "function f() { return new bar(3); }\n"
5048 "f()", 4908 "f()",
5049 2 * kPointerSize, 4909 2 * kPointerSize,
5050 1, 4910 1,
5051 17, 4911 17,
5052 { 4912 {
5053 B(StackCheck), // 4913 B(StackCheck), //
5054 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 4914 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
5055 B(Star), R(0), // 4915 B(Star), R(0), //
5056 B(LdaSmi8), U8(3), // 4916 B(LdaSmi8), U8(3), //
5057 B(Star), R(1), // 4917 B(Star), R(1), //
5058 B(Ldar), R(0), // 4918 B(Ldar), R(0), //
5059 B(New), R(0), R(1), U8(1), // 4919 B(New), R(0), R(1), U8(1), //
5060 B(Return), // 4920 B(Return), //
5061 }, 4921 },
5062 1, 4922 1,
5063 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 4923 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
5064 {"function bar(w, x, y, z) {\n" 4924 {"function bar(w, x, y, z) {\n"
5065 " this.value = 18;\n" 4925 " this.value = 18;\n"
5066 " this.x = x;\n" 4926 " this.x = x;\n"
5067 " this.y = y;\n" 4927 " this.y = y;\n"
5068 " this.z = z;\n" 4928 " this.z = z;\n"
5069 "}\n" 4929 "}\n"
5070 "function f() { return new bar(3, 4, 5); }\n" 4930 "function f() { return new bar(3, 4, 5); }\n"
5071 "f()", 4931 "f()",
5072 4 * kPointerSize, 4932 4 * kPointerSize,
5073 1, 4933 1,
5074 25, 4934 25,
5075 { 4935 {
5076 B(StackCheck), // 4936 B(StackCheck), //
5077 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 4937 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot2)), //
5078 B(Star), R(0), // 4938 B(Star), R(0), //
5079 B(LdaSmi8), U8(3), // 4939 B(LdaSmi8), U8(3), //
5080 B(Star), R(1), // 4940 B(Star), R(1), //
5081 B(LdaSmi8), U8(4), // 4941 B(LdaSmi8), U8(4), //
5082 B(Star), R(2), // 4942 B(Star), R(2), //
5083 B(LdaSmi8), U8(5), // 4943 B(LdaSmi8), U8(5), //
5084 B(Star), R(3), // 4944 B(Star), R(3), //
5085 B(Ldar), R(0), // 4945 B(Ldar), R(0), //
5086 B(New), R(0), R(1), U8(3), // 4946 B(New), R(0), R(1), U8(3), //
5087 B(Return), // 4947 B(Return), //
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
5237 B(CreateUnmappedArguments), // 5097 B(CreateUnmappedArguments), //
5238 B(StaContextSlot), R(context), U8(first_context_slot + 1), // 5098 B(StaContextSlot), R(context), U8(first_context_slot + 1), //
5239 B(Ldar), R(new_target), // 5099 B(Ldar), R(new_target), //
5240 B(StaContextSlot), R(context), U8(first_context_slot + 2), // 5100 B(StaContextSlot), R(context), U8(first_context_slot + 2), //
5241 B(StackCheck), // 5101 B(StackCheck), //
5242 REPEAT_249(COMMA, // 5102 REPEAT_249(COMMA, //
5243 B(LdaZero), // 5103 B(LdaZero), //
5244 B(StaContextSlot), R(context), U8(wide_slot++)), // 5104 B(StaContextSlot), R(context), U8(wide_slot++)), //
5245 B(LdaUndefined), // 5105 B(LdaUndefined), //
5246 B(Star), R(2), // 5106 B(Star), R(2), //
5247 B(LdaGlobalStrict), U8(0), U8(1), // 5107 B(LdaGlobal), U8(0), U8(1), //
5248 B(Star), R(1), // 5108 B(Star), R(1), //
5249 B(Call), R(1), R(2), U8(1), U8(0), // 5109 B(Call), R(1), R(2), U8(1), U8(0), //
5250 B(LdaSmi8), U8(100), // 5110 B(LdaSmi8), U8(100), //
5251 B(StaContextSlotWide), R(context), U16(256), // 5111 B(StaContextSlotWide), R(context), U16(256), //
5252 B(LdaContextSlotWide), R(context), U16(256), // 5112 B(LdaContextSlotWide), R(context), U16(256), //
5253 B(Return), // 5113 B(Return), //
5254 }, 5114 },
5255 1, 5115 1,
5256 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 5116 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
5257 }; 5117 };
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
5507 {"var a = { val: 1 }; return a.val++;", 5367 {"var a = { val: 1 }; return a.val++;",
5508 3 * kPointerSize, 5368 3 * kPointerSize,
5509 1, 5369 1,
5510 26, 5370 26,
5511 { 5371 {
5512 B(StackCheck), // 5372 B(StackCheck), //
5513 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), // 5373 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), //
5514 B(Star), R(1), // 5374 B(Star), R(1), //
5515 B(Star), R(0), // 5375 B(Star), R(0), //
5516 B(Star), R(1), // 5376 B(Star), R(1), //
5517 B(LoadICSloppy), R(1), U8(1), U8(vector->GetIndex(slot1)), // 5377 B(LoadIC), R(1), U8(1), U8(vector->GetIndex(slot1)), //
5518 B(ToNumber), // 5378 B(ToNumber), //
5519 B(Star), R(2), // 5379 B(Star), R(2), //
5520 B(Inc), // 5380 B(Inc), //
5521 B(StoreICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), // 5381 B(StoreICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), //
5522 B(Ldar), R(2), // 5382 B(Ldar), R(2), //
5523 B(Return), // 5383 B(Return), //
5524 }, 5384 },
5525 2, 5385 2,
5526 {InstanceType::FIXED_ARRAY_TYPE, 5386 {InstanceType::FIXED_ARRAY_TYPE,
5527 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 5387 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
5528 {"var a = { val: 1 }; return --a.val;", 5388 {"var a = { val: 1 }; return --a.val;",
5529 2 * kPointerSize, 5389 2 * kPointerSize,
5530 1, 5390 1,
5531 22, 5391 22,
5532 { 5392 {
5533 B(StackCheck), // 5393 B(StackCheck), //
5534 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), // 5394 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), //
5535 B(Star), R(1), // 5395 B(Star), R(1), //
5536 B(Star), R(0), // 5396 B(Star), R(0), //
5537 B(Star), R(1), // 5397 B(Star), R(1), //
5538 B(LoadICSloppy), R(1), U8(1), U8(vector->GetIndex(slot1)), // 5398 B(LoadIC), R(1), U8(1), U8(vector->GetIndex(slot1)), //
5539 B(ToNumber), // 5399 B(ToNumber), //
5540 B(Dec), // 5400 B(Dec), //
5541 B(StoreICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), // 5401 B(StoreICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), //
5542 B(Return), // 5402 B(Return), //
5543 }, 5403 },
5544 2, 5404 2,
5545 {InstanceType::FIXED_ARRAY_TYPE, 5405 {InstanceType::FIXED_ARRAY_TYPE,
5546 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 5406 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
5547 {"var name = 'var'; var a = { val: 1 }; return a[name]--;", 5407 {"var name = 'var'; var a = { val: 1 }; return a[name]--;",
5548 5 * kPointerSize, 5408 5 * kPointerSize,
5549 1, 5409 1,
5550 33, 5410 33,
5551 { 5411 {
5552 B(StackCheck), // 5412 B(StackCheck), //
5553 B(LdaConstant), U8(0), // 5413 B(LdaConstant), U8(0), //
5554 B(Star), R(0), // 5414 B(Star), R(0), //
5555 B(CreateObjectLiteral), U8(1), U8(0), U8(object_literal_flags), // 5415 B(CreateObjectLiteral), U8(1), U8(0), U8(object_literal_flags), //
5556 B(Star), R(2), // 5416 B(Star), R(2), //
5557 B(Star), R(1), // 5417 B(Star), R(1), //
5558 B(Star), R(2), // 5418 B(Star), R(2), //
5559 B(Ldar), R(0), // 5419 B(Ldar), R(0), //
5560 B(Star), R(3), // 5420 B(Star), R(3), //
5561 B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot1)), // 5421 B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot1)), //
5562 B(ToNumber), // 5422 B(ToNumber), //
5563 B(Star), R(4), // 5423 B(Star), R(4), //
5564 B(Dec), // 5424 B(Dec), //
5565 B(KeyedStoreICSloppy), R(2), R(3), U8(vector->GetIndex(slot2)), // 5425 B(KeyedStoreICSloppy), R(2), R(3), U8(vector->GetIndex(slot2)), //
5566 B(Ldar), R(4), // 5426 B(Ldar), R(4), //
5567 B(Return), // 5427 B(Return), //
5568 }, 5428 },
5569 2, 5429 2,
5570 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 5430 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
5571 InstanceType::FIXED_ARRAY_TYPE}}, 5431 InstanceType::FIXED_ARRAY_TYPE}},
5572 {"var name = 'var'; var a = { val: 1 }; return ++a[name];", 5432 {"var name = 'var'; var a = { val: 1 }; return ++a[name];",
5573 4 * kPointerSize, 5433 4 * kPointerSize,
5574 1, 5434 1,
5575 29, 5435 29,
5576 { 5436 {
5577 B(StackCheck), // 5437 B(StackCheck), //
5578 B(LdaConstant), U8(0), // 5438 B(LdaConstant), U8(0), //
5579 B(Star), R(0), // 5439 B(Star), R(0), //
5580 B(CreateObjectLiteral), U8(1), U8(0), U8(object_literal_flags), // 5440 B(CreateObjectLiteral), U8(1), U8(0), U8(object_literal_flags), //
5581 B(Star), R(2), // 5441 B(Star), R(2), //
5582 B(Star), R(1), // 5442 B(Star), R(1), //
5583 B(Star), R(2), // 5443 B(Star), R(2), //
5584 B(Ldar), R(0), // 5444 B(Ldar), R(0), //
5585 B(Star), R(3), // 5445 B(Star), R(3), //
5586 B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot1)), // 5446 B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot1)), //
5587 B(ToNumber), // 5447 B(ToNumber), //
5588 B(Inc), // 5448 B(Inc), //
5589 B(KeyedStoreICSloppy), R(2), R(3), U8(vector->GetIndex(slot2)), // 5449 B(KeyedStoreICSloppy), R(2), R(3), U8(vector->GetIndex(slot2)), //
5590 B(Return), // 5450 B(Return), //
5591 }, 5451 },
5592 2, 5452 2,
5593 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 5453 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
5594 InstanceType::FIXED_ARRAY_TYPE}}, 5454 InstanceType::FIXED_ARRAY_TYPE}},
5595 {"var a = 1; var b = function() { return a }; return ++a;", 5455 {"var a = 1; var b = function() { return a }; return ++a;",
5596 2 * kPointerSize, 5456 2 * kPointerSize,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
5683 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec); 5543 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec);
5684 5544
5685 // clang-format off 5545 // clang-format off
5686 ExpectedSnippet<const char*> snippets[] = { 5546 ExpectedSnippet<const char*> snippets[] = {
5687 {"var global = 1;\nfunction f() { return ++global; }\nf()", 5547 {"var global = 1;\nfunction f() { return ++global; }\nf()",
5688 0, 5548 0,
5689 1, 5549 1,
5690 10, 5550 10,
5691 { 5551 {
5692 B(StackCheck), // 5552 B(StackCheck), //
5693 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), // 5553 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
5694 B(ToNumber), // 5554 B(ToNumber), //
5695 B(Inc), // 5555 B(Inc), //
5696 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 5556 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
5697 B(Return), // 5557 B(Return), //
5698 }, 5558 },
5699 1, 5559 1,
5700 {"global"}}, 5560 {"global"}},
5701 {"var global = 1;\nfunction f() { return global--; }\nf()", 5561 {"var global = 1;\nfunction f() { return global--; }\nf()",
5702 1 * kPointerSize, 5562 1 * kPointerSize,
5703 1, 5563 1,
5704 14, 5564 14,
5705 { 5565 {
5706 B(StackCheck), // 5566 B(StackCheck), //
5707 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), // 5567 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
5708 B(ToNumber), // 5568 B(ToNumber), //
5709 B(Star), R(0), // 5569 B(Star), R(0), //
5710 B(Dec), // 5570 B(Dec), //
5711 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 5571 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
5712 B(Ldar), R(0), // 5572 B(Ldar), R(0), //
5713 B(Return), 5573 B(Return),
5714 }, 5574 },
5715 1, 5575 1,
5716 {"global"}}, 5576 {"global"}},
5717 {"unallocated = 1;\nfunction f() { 'use strict'; return --unallocated; }" 5577 {"unallocated = 1;\nfunction f() { 'use strict'; return --unallocated; }"
5718 "f()", 5578 "f()",
5719 0, 5579 0,
5720 1, 5580 1,
5721 10, 5581 10,
5722 { 5582 {
5723 B(StackCheck), // 5583 B(StackCheck), //
5724 B(LdaGlobalStrict), U8(0), U8(vector->GetIndex(slot1)), // 5584 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
5725 B(ToNumber), // 5585 B(ToNumber), //
5726 B(Dec), // 5586 B(Dec), //
5727 B(StaGlobalStrict), U8(0), U8(vector->GetIndex(slot2)), // 5587 B(StaGlobalStrict), U8(0), U8(vector->GetIndex(slot2)), //
5728 B(Return), // 5588 B(Return), //
5729 }, 5589 },
5730 1, 5590 1,
5731 {"unallocated"}}, 5591 {"unallocated"}},
5732 {"unallocated = 1;\nfunction f() { return unallocated++; }\nf()", 5592 {"unallocated = 1;\nfunction f() { return unallocated++; }\nf()",
5733 1 * kPointerSize, 5593 1 * kPointerSize,
5734 1, 5594 1,
5735 14, 5595 14,
5736 { 5596 {
5737 B(StackCheck), // 5597 B(StackCheck), //
5738 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), // 5598 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
5739 B(ToNumber), // 5599 B(ToNumber), //
5740 B(Star), R(0), // 5600 B(Star), R(0), //
5741 B(Inc), // 5601 B(Inc), //
5742 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 5602 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
5743 B(Ldar), R(0), // 5603 B(Ldar), R(0), //
5744 B(Return), 5604 B(Return),
5745 }, 5605 },
5746 1, 5606 1,
5747 {"unallocated"}}, 5607 {"unallocated"}},
5748 }; 5608 };
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
5810 {"var a = { val: 2 }; a.name *= 2;", 5670 {"var a = { val: 2 }; a.name *= 2;",
5811 3 * kPointerSize, 5671 3 * kPointerSize,
5812 1, 5672 1,
5813 27, 5673 27,
5814 { 5674 {
5815 B(StackCheck), // 5675 B(StackCheck), //
5816 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), // 5676 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), //
5817 B(Star), R(1), // 5677 B(Star), R(1), //
5818 B(Star), R(0), // 5678 B(Star), R(0), //
5819 B(Star), R(1), // 5679 B(Star), R(1), //
5820 B(LoadICSloppy), R(1), U8(1), U8(vector->GetIndex(slot1)), // 5680 B(LoadIC), R(1), U8(1), U8(vector->GetIndex(slot1)), //
5821 B(Star), R(2), // 5681 B(Star), R(2), //
5822 B(LdaSmi8), U8(2), // 5682 B(LdaSmi8), U8(2), //
5823 B(Mul), R(2), // 5683 B(Mul), R(2), //
5824 B(StoreICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), // 5684 B(StoreICSloppy), R(1), U8(1), U8(vector->GetIndex(slot2)), //
5825 B(LdaUndefined), // 5685 B(LdaUndefined), //
5826 B(Return), // 5686 B(Return), //
5827 }, 5687 },
5828 2, 5688 2,
5829 {InstanceType::FIXED_ARRAY_TYPE, 5689 {InstanceType::FIXED_ARRAY_TYPE,
5830 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 5690 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
5831 {"var a = { 1: 2 }; a[1] ^= 2;", 5691 {"var a = { 1: 2 }; a[1] ^= 2;",
5832 4 * kPointerSize, 5692 4 * kPointerSize,
5833 1, 5693 1,
5834 30, 5694 30,
5835 { 5695 {
5836 B(StackCheck), // 5696 B(StackCheck), //
5837 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), // 5697 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), //
5838 B(Star), R(1), // 5698 B(Star), R(1), //
5839 B(Star), R(0), // 5699 B(Star), R(0), //
5840 B(Star), R(1), // 5700 B(Star), R(1), //
5841 B(LdaSmi8), U8(1), // 5701 B(LdaSmi8), U8(1), //
5842 B(Star), R(2), // 5702 B(Star), R(2), //
5843 B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot1)), // 5703 B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot1)), //
5844 B(Star), R(3), // 5704 B(Star), R(3), //
5845 B(LdaSmi8), U8(2), // 5705 B(LdaSmi8), U8(2), //
5846 B(BitwiseXor), R(3), // 5706 B(BitwiseXor), R(3), //
5847 B(KeyedStoreICSloppy), R(1), R(2), U8(vector->GetIndex(slot2)), // 5707 B(KeyedStoreICSloppy), R(1), R(2), U8(vector->GetIndex(slot2)), //
5848 B(LdaUndefined), // 5708 B(LdaUndefined), //
5849 B(Return), // 5709 B(Return), //
5850 }, 5710 },
5851 1, 5711 1,
5852 {InstanceType::FIXED_ARRAY_TYPE}}, 5712 {InstanceType::FIXED_ARRAY_TYPE}},
5853 {"var a = 1; (function f() { return a; }); a |= 24;", 5713 {"var a = 1; (function f() { return a; }); a |= 24;",
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
5896 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec); 5756 i::NewTypeFeedbackVector(helper.isolate(), &feedback_spec);
5897 5757
5898 // clang-format off 5758 // clang-format off
5899 ExpectedSnippet<const char*> snippets[] = { 5759 ExpectedSnippet<const char*> snippets[] = {
5900 {"var global = 1;\nfunction f() { return global &= 1; }\nf()", 5760 {"var global = 1;\nfunction f() { return global &= 1; }\nf()",
5901 1 * kPointerSize, 5761 1 * kPointerSize,
5902 1, 5762 1,
5903 14, 5763 14,
5904 { 5764 {
5905 B(StackCheck), // 5765 B(StackCheck), //
5906 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), // 5766 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
5907 B(Star), R(0), // 5767 B(Star), R(0), //
5908 B(LdaSmi8), U8(1), // 5768 B(LdaSmi8), U8(1), //
5909 B(BitwiseAnd), R(0), // 5769 B(BitwiseAnd), R(0), //
5910 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 5770 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
5911 B(Return), // 5771 B(Return), //
5912 }, 5772 },
5913 1, 5773 1,
5914 {"global"}}, 5774 {"global"}},
5915 {"unallocated = 1;\nfunction f() { return unallocated += 1; }\nf()", 5775 {"unallocated = 1;\nfunction f() { return unallocated += 1; }\nf()",
5916 1 * kPointerSize, 5776 1 * kPointerSize,
5917 1, 5777 1,
5918 14, 5778 14,
5919 { 5779 {
5920 B(StackCheck), // 5780 B(StackCheck), //
5921 B(LdaGlobalSloppy), U8(0), U8(vector->GetIndex(slot1)), // 5781 B(LdaGlobal), U8(0), U8(vector->GetIndex(slot1)), //
5922 B(Star), R(0), // 5782 B(Star), R(0), //
5923 B(LdaSmi8), U8(1), // 5783 B(LdaSmi8), U8(1), //
5924 B(Add), R(0), // 5784 B(Add), R(0), //
5925 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), // 5785 B(StaGlobalSloppy), U8(0), U8(vector->GetIndex(slot2)), //
5926 B(Return), // 5786 B(Return), //
5927 }, 5787 },
5928 1, 5788 1,
5929 {"unallocated"}}, 5789 {"unallocated"}},
5930 }; 5790 };
5931 // clang-format on 5791 // clang-format on
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
5970 2 * kPointerSize, 5830 2 * kPointerSize,
5971 1, 5831 1,
5972 13, 5832 13,
5973 { 5833 {
5974 B(CreateMappedArguments), // 5834 B(CreateMappedArguments), //
5975 B(Star), R(0), // 5835 B(Star), R(0), //
5976 B(StackCheck), // 5836 B(StackCheck), //
5977 B(Ldar), R(0), // 5837 B(Ldar), R(0), //
5978 B(Star), R(1), // 5838 B(Star), R(1), //
5979 B(LdaZero), // 5839 B(LdaZero), //
5980 B(KeyedLoadICSloppy), R(1), U8(vector->GetIndex(slot)), // 5840 B(KeyedLoadIC), R(1), U8(vector->GetIndex(slot)), //
5981 B(Return), // 5841 B(Return), //
5982 }}, 5842 }},
5983 {"function f() { 'use strict'; return arguments; }", 5843 {"function f() { 'use strict'; return arguments; }",
5984 1 * kPointerSize, 5844 1 * kPointerSize,
5985 1, 5845 1,
5986 7, 5846 7,
5987 { 5847 {
5988 B(CreateUnmappedArguments), // 5848 B(CreateUnmappedArguments), //
5989 B(Star), R(0), // 5849 B(Star), R(0), //
5990 B(StackCheck), // 5850 B(StackCheck), //
5991 B(Ldar), R(0), // 5851 B(Ldar), R(0), //
5992 B(Return), // 5852 B(Return), //
5993 }}, 5853 }},
5994 {"function f(a) { return arguments[0]; }", 5854 {"function f(a) { return arguments[0]; }",
5995 3 * kPointerSize, 5855 3 * kPointerSize,
5996 2, 5856 2,
5997 25, 5857 25,
5998 { 5858 {
5999 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), // 5859 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), //
6000 /* */ U8(1), // 5860 /* */ U8(1), //
6001 B(PushContext), R(1), // 5861 B(PushContext), R(1), //
6002 B(Ldar), R(BytecodeGeneratorHelper::kLastParamIndex), // 5862 B(Ldar), R(BytecodeGeneratorHelper::kLastParamIndex), //
6003 B(StaContextSlot), R(context), U8(first_context_slot), // 5863 B(StaContextSlot), R(context), U8(first_context_slot), //
6004 B(CreateMappedArguments), // 5864 B(CreateMappedArguments), //
6005 B(Star), R(0), // 5865 B(Star), R(0), //
6006 B(StackCheck), // 5866 B(StackCheck), //
6007 B(Ldar), R(0), // 5867 B(Ldar), R(0), //
6008 B(Star), R(2), // 5868 B(Star), R(2), //
6009 B(LdaZero), // 5869 B(LdaZero), //
6010 B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot)), // 5870 B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot)), //
6011 B(Return), // 5871 B(Return), //
6012 }}, 5872 }},
6013 {"function f(a, b, c) { return arguments; }", 5873 {"function f(a, b, c) { return arguments; }",
6014 2 * kPointerSize, 5874 2 * kPointerSize,
6015 4, 5875 4,
6016 29, 5876 29,
6017 { 5877 {
6018 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), // 5878 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), //
6019 /* */ U8(1), // 5879 /* */ U8(1), //
6020 B(PushContext), R(1), // 5880 B(PushContext), R(1), //
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
6103 B(CreateRestParameter), // 5963 B(CreateRestParameter), //
6104 B(Star), R(0), // 5964 B(Star), R(0), //
6105 B(LdaTheHole), // 5965 B(LdaTheHole), //
6106 B(Star), R(1), // 5966 B(Star), R(1), //
6107 B(StackCheck), // 5967 B(StackCheck), //
6108 B(Ldar), A(1, 2), // 5968 B(Ldar), A(1, 2), //
6109 B(Star), R(1), // 5969 B(Star), R(1), //
6110 B(Ldar), R(0), // 5970 B(Ldar), R(0), //
6111 B(Star), R(2), // 5971 B(Star), R(2), //
6112 B(LdaZero), // 5972 B(LdaZero), //
6113 B(KeyedLoadICSloppy), R(2), U8(vector->GetIndex(slot)), // 5973 B(KeyedLoadIC), R(2), U8(vector->GetIndex(slot)), //
6114 B(Return), // 5974 B(Return), //
6115 }, 5975 },
6116 0, 5976 0,
6117 {}}, 5977 {}},
6118 {"function f(a, ...restArgs) { return restArgs[0] + arguments[0]; }", 5978 {"function f(a, ...restArgs) { return restArgs[0] + arguments[0]; }",
6119 5 * kPointerSize, 5979 5 * kPointerSize,
6120 2, 5980 2,
6121 35, 5981 35,
6122 { 5982 {
6123 B(CreateUnmappedArguments), // 5983 B(CreateUnmappedArguments), //
6124 B(Star), R(0), // 5984 B(Star), R(0), //
6125 B(CreateRestParameter), // 5985 B(CreateRestParameter), //
6126 B(Star), R(1), // 5986 B(Star), R(1), //
6127 B(LdaTheHole), // 5987 B(LdaTheHole), //
6128 B(Star), R(2), // 5988 B(Star), R(2), //
6129 B(StackCheck), // 5989 B(StackCheck), //
6130 B(Ldar), A(1, 2), // 5990 B(Ldar), A(1, 2), //
6131 B(Star), R(2), // 5991 B(Star), R(2), //
6132 B(Ldar), R(1), // 5992 B(Ldar), R(1), //
6133 B(Star), R(3), // 5993 B(Star), R(3), //
6134 B(LdaZero), // 5994 B(LdaZero), //
6135 B(KeyedLoadICSloppy), R(3), U8(vector->GetIndex(slot)), // 5995 B(KeyedLoadIC), R(3), U8(vector->GetIndex(slot)), //
6136 B(Star), R(4), // 5996 B(Star), R(4), //
6137 B(Ldar), R(0), // 5997 B(Ldar), R(0), //
6138 B(Star), R(3), // 5998 B(Star), R(3), //
6139 B(LdaZero), // 5999 B(LdaZero), //
6140 B(KeyedLoadICSloppy), R(3), U8(vector->GetIndex(slot1)), // 6000 B(KeyedLoadIC), R(3), U8(vector->GetIndex(slot1)), //
6141 B(Add), R(4), // 6001 B(Add), R(4), //
6142 B(Return), // 6002 B(Return), //
6143 }, 6003 },
6144 0, 6004 0,
6145 {}}, 6005 {}},
6146 }; 6006 };
6147 // clang-format on 6007 // clang-format on
6148 6008
6149 for (size_t i = 0; i < arraysize(snippets); i++) { 6009 for (size_t i = 0; i < arraysize(snippets); i++) {
6150 Handle<BytecodeArray> bytecode_array = 6010 Handle<BytecodeArray> bytecode_array =
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
6343 B(ForInNext), R(1), R(5), R(2), // 6203 B(ForInNext), R(1), R(5), R(2), //
6344 B(JumpIfUndefined), U8(51), // 6204 B(JumpIfUndefined), U8(51), //
6345 B(Star), R(6), // 6205 B(Star), R(6), //
6346 B(Ldar), R(0), // 6206 B(Ldar), R(0), //
6347 B(Star), R(7), // 6207 B(Star), R(7), //
6348 B(Ldar), R(6), // 6208 B(Ldar), R(6), //
6349 B(StoreICSloppy), R(7), U8(2), U8(vector->GetIndex(slot4)), // 6209 B(StoreICSloppy), R(7), U8(2), U8(vector->GetIndex(slot4)), //
6350 B(StackCheck), // 6210 B(StackCheck), //
6351 B(Ldar), R(0), // 6211 B(Ldar), R(0), //
6352 B(Star), R(6), // 6212 B(Star), R(6), //
6353 B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot2)), // 6213 B(LoadIC), R(6), U8(2), U8(vector->GetIndex(slot2)), //
6354 B(Star), R(7), // 6214 B(Star), R(7), //
6355 B(LdaSmi8), U8(10), // 6215 B(LdaSmi8), U8(10), //
6356 B(TestEqual), R(7), // 6216 B(TestEqual), R(7), //
6357 B(JumpIfFalse), U8(4), // 6217 B(JumpIfFalse), U8(4), //
6358 B(Jump), U8(20), // 6218 B(Jump), U8(20), //
6359 B(Ldar), R(0), // 6219 B(Ldar), R(0), //
6360 B(Star), R(6), // 6220 B(Star), R(6), //
6361 B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot3)), // 6221 B(LoadIC), R(6), U8(2), U8(vector->GetIndex(slot3)), //
6362 B(Star), R(7), // 6222 B(Star), R(7), //
6363 B(LdaSmi8), U8(20), // 6223 B(LdaSmi8), U8(20), //
6364 B(TestEqual), R(7), // 6224 B(TestEqual), R(7), //
6365 B(JumpIfFalse), U8(4), // 6225 B(JumpIfFalse), U8(4), //
6366 B(Jump), U8(8), // 6226 B(Jump), U8(8), //
6367 B(ForInStep), R(5), // 6227 B(ForInStep), R(5), //
6368 B(Star), R(5), // 6228 B(Star), R(5), //
6369 B(Jump), U8(-64), // 6229 B(Jump), U8(-64), //
6370 B(LdaUndefined), // 6230 B(LdaUndefined), //
6371 B(Return), // 6231 B(Return), //
(...skipping 27 matching lines...) Expand all
6399 B(Ldar), R(0), // 6259 B(Ldar), R(0), //
6400 B(Star), R(7), // 6260 B(Star), R(7), //
6401 B(LdaZero), // 6261 B(LdaZero), //
6402 B(Star), R(8), // 6262 B(Star), R(8), //
6403 B(Ldar), R(6), // 6263 B(Ldar), R(6), //
6404 B(KeyedStoreICSloppy), R(7), R(8), U8(vector->GetIndex(slot3)), // 6264 B(KeyedStoreICSloppy), R(7), R(8), U8(vector->GetIndex(slot3)), //
6405 B(StackCheck), // 6265 B(StackCheck), //
6406 B(Ldar), R(0), // 6266 B(Ldar), R(0), //
6407 B(Star), R(6), // 6267 B(Star), R(6), //
6408 B(LdaSmi8), U8(3), // 6268 B(LdaSmi8), U8(3), //
6409 B(KeyedLoadICSloppy), R(6), U8(vector->GetIndex(slot2)), // 6269 B(KeyedLoadIC), R(6), U8(vector->GetIndex(slot2)), //
6410 B(Return), // 6270 B(Return), //
6411 B(ForInStep), R(5), // 6271 B(ForInStep), R(5), //
6412 B(Star), R(5), // 6272 B(Star), R(5), //
6413 B(Jump), U8(-41), // 6273 B(Jump), U8(-41), //
6414 B(LdaUndefined), // 6274 B(LdaUndefined), //
6415 B(Return), // 6275 B(Return), //
6416 }, 6276 },
6417 2, 6277 2,
6418 {InstanceType::FIXED_ARRAY_TYPE, InstanceType::FIXED_ARRAY_TYPE}}, 6278 {InstanceType::FIXED_ARRAY_TYPE, InstanceType::FIXED_ARRAY_TYPE}},
6419 }; 6279 };
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
6453 ExpectedSnippet<InstanceType, 8> snippets[] = { 6313 ExpectedSnippet<InstanceType, 8> snippets[] = {
6454 {"for (var p of [0, 1, 2]) {}", 6314 {"for (var p of [0, 1, 2]) {}",
6455 7 * kPointerSize, 6315 7 * kPointerSize,
6456 1, 6316 1,
6457 86, 6317 86,
6458 { 6318 {
6459 B(StackCheck), // 6319 B(StackCheck), //
6460 B(CreateArrayLiteral), U8(0), U8(0), U8(array_literal_flags), // 6320 B(CreateArrayLiteral), U8(0), U8(0), U8(array_literal_flags), //
6461 B(Star), R(5), // 6321 B(Star), R(5), //
6462 B(LdaConstant), U8(1), // 6322 B(LdaConstant), U8(1), //
6463 B(KeyedLoadICSloppy), R(5), U8(vector->GetIndex(slot2)), // 6323 B(KeyedLoadIC), R(5), U8(vector->GetIndex(slot2)), //
6464 B(Star), R(4), // 6324 B(Star), R(4), //
6465 B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot1)), // 6325 B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot1)), //
6466 B(Star), R(1), // 6326 B(Star), R(1), //
6467 B(Ldar), R(1), // 6327 B(Ldar), R(1), //
6468 B(Star), R(6), // 6328 B(Star), R(6), //
6469 B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot4)), // 6329 B(LoadIC), R(6), U8(2), U8(vector->GetIndex(slot4)), //
6470 B(Star), R(5), // 6330 B(Star), R(5), //
6471 B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot3)), // 6331 B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot3)), //
6472 B(Star), R(2), // 6332 B(Star), R(2), //
6473 B(Star), R(4), // 6333 B(Star), R(4), //
6474 B(CallRuntime), U16(Runtime::kInlineIsJSReceiver), R(4), U8(1), // 6334 B(CallRuntime), U16(Runtime::kInlineIsJSReceiver), R(4), U8(1), //
6475 B(LogicalNot), // 6335 B(LogicalNot), //
6476 B(JumpIfFalse), U8(11), // 6336 B(JumpIfFalse), U8(11), //
6477 B(Ldar), R(2), // 6337 B(Ldar), R(2), //
6478 B(Star), R(4), // 6338 B(Star), R(4), //
6479 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), // 6339 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), //
6480 /* */ R(4), U8(1), // 6340 /* */ R(4), U8(1), //
6481 B(Ldar), R(2), // 6341 B(Ldar), R(2), //
6482 B(Star), R(4), // 6342 B(Star), R(4), //
6483 B(LoadICSloppy), R(4), U8(3), U8(vector->GetIndex(slot5)), // 6343 B(LoadIC), R(4), U8(3), U8(vector->GetIndex(slot5)), //
6484 B(JumpIfToBooleanTrue), U8(19), // 6344 B(JumpIfToBooleanTrue), U8(19), //
6485 B(Ldar), R(2), // 6345 B(Ldar), R(2), //
6486 B(Star), R(4), // 6346 B(Star), R(4), //
6487 B(LoadICSloppy), R(4), U8(4), U8(vector->GetIndex(slot6)), // 6347 B(LoadIC), R(4), U8(4), U8(vector->GetIndex(slot6)), //
6488 B(Star), R(0), // 6348 B(Star), R(0), //
6489 B(StackCheck), // 6349 B(StackCheck), //
6490 B(Ldar), R(0), // 6350 B(Ldar), R(0), //
6491 B(Star), R(3), // 6351 B(Star), R(3), //
6492 B(Jump), U8(-61), // 6352 B(Jump), U8(-61), //
6493 B(LdaUndefined), // 6353 B(LdaUndefined), //
6494 B(Return), // 6354 B(Return), //
6495 }, 6355 },
6496 5, 6356 5,
6497 {InstanceType::FIXED_ARRAY_TYPE, InstanceType::SYMBOL_TYPE, 6357 {InstanceType::FIXED_ARRAY_TYPE, InstanceType::SYMBOL_TYPE,
6498 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 6358 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
6499 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 6359 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
6500 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 6360 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
6501 {"var x = 'potatoes';\n" 6361 {"var x = 'potatoes';\n"
6502 "for (var p of x) { return p; }", 6362 "for (var p of x) { return p; }",
6503 8 * kPointerSize, 6363 8 * kPointerSize,
6504 1, 6364 1,
6505 85, 6365 85,
6506 { 6366 {
6507 B(StackCheck), // 6367 B(StackCheck), //
6508 B(LdaConstant), U8(0), // 6368 B(LdaConstant), U8(0), //
6509 B(Star), R(3), // 6369 B(Star), R(3), //
6510 B(Star), R(6), // 6370 B(Star), R(6), //
6511 B(LdaConstant), U8(1), // 6371 B(LdaConstant), U8(1), //
6512 B(KeyedLoadICSloppy), R(6), U8(vector->GetIndex(slot2)), // 6372 B(KeyedLoadIC), R(6), U8(vector->GetIndex(slot2)), //
6513 B(Star), R(5), // 6373 B(Star), R(5), //
6514 B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot1)), // 6374 B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot1)), //
6515 B(Star), R(1), // 6375 B(Star), R(1), //
6516 B(Ldar), R(1), // 6376 B(Ldar), R(1), //
6517 B(Star), R(7), // 6377 B(Star), R(7), //
6518 B(LoadICSloppy), R(7), U8(2), U8(vector->GetIndex(slot4)), // 6378 B(LoadIC), R(7), U8(2), U8(vector->GetIndex(slot4)), //
6519 B(Star), R(6), // 6379 B(Star), R(6), //
6520 B(Call), R(6), R(7), U8(1), U8(vector->GetIndex(slot3)), // 6380 B(Call), R(6), R(7), U8(1), U8(vector->GetIndex(slot3)), //
6521 B(Star), R(2), // 6381 B(Star), R(2), //
6522 B(Star), R(5), // 6382 B(Star), R(5), //
6523 B(CallRuntime), U16(Runtime::kInlineIsJSReceiver), R(5), U8(1), // 6383 B(CallRuntime), U16(Runtime::kInlineIsJSReceiver), R(5), U8(1), //
6524 B(LogicalNot), // 6384 B(LogicalNot), //
6525 B(JumpIfFalse), U8(11), // 6385 B(JumpIfFalse), U8(11), //
6526 B(Ldar), R(2), // 6386 B(Ldar), R(2), //
6527 B(Star), R(5), // 6387 B(Star), R(5), //
6528 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), // 6388 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), //
6529 /* */ R(5), U8(1), // 6389 /* */ R(5), U8(1), //
6530 B(Ldar), R(2), // 6390 B(Ldar), R(2), //
6531 B(Star), R(5), // 6391 B(Star), R(5), //
6532 B(LoadICSloppy), R(5), U8(3), U8(vector->GetIndex(slot5)), // 6392 B(LoadIC), R(5), U8(3), U8(vector->GetIndex(slot5)), //
6533 B(JumpIfToBooleanTrue), U8(18), // 6393 B(JumpIfToBooleanTrue), U8(18), //
6534 B(Ldar), R(2), // 6394 B(Ldar), R(2), //
6535 B(Star), R(5), // 6395 B(Star), R(5), //
6536 B(LoadICSloppy), R(5), U8(4), U8(vector->GetIndex(slot6)), // 6396 B(LoadIC), R(5), U8(4), U8(vector->GetIndex(slot6)), //
6537 B(Star), R(0), // 6397 B(Star), R(0), //
6538 B(StackCheck), // 6398 B(StackCheck), //
6539 B(Ldar), R(0), // 6399 B(Ldar), R(0), //
6540 B(Star), R(4), // 6400 B(Star), R(4), //
6541 B(Return), // 6401 B(Return), //
6542 B(LdaUndefined), // 6402 B(LdaUndefined), //
6543 B(Return), // 6403 B(Return), //
6544 }, 6404 },
6545 5, 6405 5,
6546 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 6406 {InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
6547 InstanceType::SYMBOL_TYPE, 6407 InstanceType::SYMBOL_TYPE,
6548 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 6408 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
6549 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 6409 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
6550 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}}, 6410 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE}},
6551 {"for (var x of [10, 20, 30]) {\n" 6411 {"for (var x of [10, 20, 30]) {\n"
6552 " if (x == 10) continue;\n" 6412 " if (x == 10) continue;\n"
6553 " if (x == 20) break;\n" 6413 " if (x == 20) break;\n"
6554 "}", 6414 "}",
6555 7 * kPointerSize, 6415 7 * kPointerSize,
6556 1, 6416 1,
6557 108, 6417 108,
6558 { 6418 {
6559 B(StackCheck), // 6419 B(StackCheck), //
6560 B(CreateArrayLiteral), U8(0), U8(0), U8(array_literal_flags), // 6420 B(CreateArrayLiteral), U8(0), U8(0), U8(array_literal_flags), //
6561 B(Star), R(5), // 6421 B(Star), R(5), //
6562 B(LdaConstant), U8(1), // 6422 B(LdaConstant), U8(1), //
6563 B(KeyedLoadICSloppy), R(5), U8(vector->GetIndex(slot2)), // 6423 B(KeyedLoadIC), R(5), U8(vector->GetIndex(slot2)), //
6564 B(Star), R(4), // 6424 B(Star), R(4), //
6565 B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot1)), // 6425 B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot1)), //
6566 B(Star), R(1), // 6426 B(Star), R(1), //
6567 B(Ldar), R(1), // 6427 B(Ldar), R(1), //
6568 B(Star), R(6), // 6428 B(Star), R(6), //
6569 B(LoadICSloppy), R(6), U8(2), U8(vector->GetIndex(slot4)), // 6429 B(LoadIC), R(6), U8(2), U8(vector->GetIndex(slot4)), //
6570 B(Star), R(5), // 6430 B(Star), R(5), //
6571 B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot3)), // 6431 B(Call), R(5), R(6), U8(1), U8(vector->GetIndex(slot3)), //
6572 B(Star), R(2), // 6432 B(Star), R(2), //
6573 B(Star), R(4), // 6433 B(Star), R(4), //
6574 B(CallRuntime), U16(Runtime::kInlineIsJSReceiver), R(4), U8(1), // 6434 B(CallRuntime), U16(Runtime::kInlineIsJSReceiver), R(4), U8(1), //
6575 B(LogicalNot), // 6435 B(LogicalNot), //
6576 B(JumpIfFalse), U8(11), // 6436 B(JumpIfFalse), U8(11), //
6577 B(Ldar), R(2), // 6437 B(Ldar), R(2), //
6578 B(Star), R(4), // 6438 B(Star), R(4), //
6579 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), // 6439 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), //
6580 /* */ R(4), U8(1), // 6440 /* */ R(4), U8(1), //
6581 B(Ldar), R(2), // 6441 B(Ldar), R(2), //
6582 B(Star), R(4), // 6442 B(Star), R(4), //
6583 B(LoadICSloppy), R(4), U8(3), U8(vector->GetIndex(slot5)), // 6443 B(LoadIC), R(4), U8(3), U8(vector->GetIndex(slot5)), //
6584 B(JumpIfToBooleanTrue), U8(41), // 6444 B(JumpIfToBooleanTrue), U8(41), //
6585 B(Ldar), R(2), // 6445 B(Ldar), R(2), //
6586 B(Star), R(4), // 6446 B(Star), R(4), //
6587 B(LoadICSloppy), R(4), U8(4), U8(vector->GetIndex(slot6)), // 6447 B(LoadIC), R(4), U8(4), U8(vector->GetIndex(slot6)), //
6588 B(Star), R(0), // 6448 B(Star), R(0), //
6589 B(StackCheck), // 6449 B(StackCheck), //
6590 B(Ldar), R(0), // 6450 B(Ldar), R(0), //
6591 B(Star), R(3), // 6451 B(Star), R(3), //
6592 B(Star), R(4), // 6452 B(Star), R(4), //
6593 B(LdaSmi8), U8(10), // 6453 B(LdaSmi8), U8(10), //
6594 B(TestEqual), R(4), // 6454 B(TestEqual), R(4), //
6595 B(JumpIfFalse), U8(4), // 6455 B(JumpIfFalse), U8(4), //
6596 B(Jump), U8(-69), // 6456 B(Jump), U8(-69), //
6597 B(Ldar), R(3), // 6457 B(Ldar), R(3), //
(...skipping 17 matching lines...) Expand all
6615 1, 6475 1,
6616 103, 6476 103,
6617 { 6477 {
6618 B(StackCheck), // 6478 B(StackCheck), //
6619 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), // 6479 B(CreateObjectLiteral), U8(0), U8(0), U8(object_literal_flags), //
6620 B(Star), R(3), // 6480 B(Star), R(3), //
6621 B(Star), R(2), // 6481 B(Star), R(2), //
6622 B(CreateArrayLiteral), U8(1), U8(1), U8(array_literal_flags), // 6482 B(CreateArrayLiteral), U8(1), U8(1), U8(array_literal_flags), //
6623 B(Star), R(4), // 6483 B(Star), R(4), //
6624 B(LdaConstant), U8(2), // 6484 B(LdaConstant), U8(2), //
6625 B(KeyedLoadICSloppy), R(4), U8(vector->GetIndex(slot2)), // 6485 B(KeyedLoadIC), R(4), U8(vector->GetIndex(slot2)), //
6626 B(Star), R(3), // 6486 B(Star), R(3), //
6627 B(Call), R(3), R(4), U8(1), U8(vector->GetIndex(slot1)), // 6487 B(Call), R(3), R(4), U8(1), U8(vector->GetIndex(slot1)), //
6628 B(Star), R(0), // 6488 B(Star), R(0), //
6629 B(Ldar), R(0), // 6489 B(Ldar), R(0), //
6630 B(Star), R(5), // 6490 B(Star), R(5), //
6631 B(LoadICSloppy), R(5), U8(3), U8(vector->GetIndex(slot4)), // 6491 B(LoadIC), R(5), U8(3), U8(vector->GetIndex(slot4)), //
6632 B(Star), R(4), // 6492 B(Star), R(4), //
6633 B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot3)), // 6493 B(Call), R(4), R(5), U8(1), U8(vector->GetIndex(slot3)), //
6634 B(Star), R(1), // 6494 B(Star), R(1), //
6635 B(Star), R(3), // 6495 B(Star), R(3), //
6636 B(CallRuntime), U16(Runtime::kInlineIsJSReceiver), R(3), U8(1), // 6496 B(CallRuntime), U16(Runtime::kInlineIsJSReceiver), R(3), U8(1), //
6637 B(LogicalNot), // 6497 B(LogicalNot), //
6638 B(JumpIfFalse), U8(11), // 6498 B(JumpIfFalse), U8(11), //
6639 B(Ldar), R(1), // 6499 B(Ldar), R(1), //
6640 B(Star), R(3), // 6500 B(Star), R(3), //
6641 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), // 6501 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), //
6642 /* */ R(3), U8(1), // 6502 /* */ R(3), U8(1), //
6643 B(Ldar), R(1), // 6503 B(Ldar), R(1), //
6644 B(Star), R(3), // 6504 B(Star), R(3), //
6645 B(LoadICSloppy), R(3), U8(4), U8(vector->GetIndex(slot5)), // 6505 B(LoadIC), R(3), U8(4), U8(vector->GetIndex(slot5)), //
6646 B(JumpIfToBooleanTrue), U8(28), // 6506 B(JumpIfToBooleanTrue), U8(28), //
6647 B(Ldar), R(2), // 6507 B(Ldar), R(2), //
6648 B(Star), R(3), // 6508 B(Star), R(3), //
6649 B(Ldar), R(1), // 6509 B(Ldar), R(1), //
6650 B(Star), R(4), // 6510 B(Star), R(4), //
6651 B(LoadICSloppy), R(4), U8(5), U8(vector->GetIndex(slot6)), // 6511 B(LoadIC), R(4), U8(5), U8(vector->GetIndex(slot6)), //
6652 B(StoreICSloppy), R(3), U8(6), U8(vector->GetIndex(slot7)), // 6512 B(StoreICSloppy), R(3), U8(6), U8(vector->GetIndex(slot7)), //
6653 B(StackCheck), // 6513 B(StackCheck), //
6654 B(Ldar), R(2), // 6514 B(Ldar), R(2), //
6655 B(Star), R(3), // 6515 B(Star), R(3), //
6656 B(LoadICSloppy), R(3), U8(6), U8(vector->GetIndex(slot8)), // 6516 B(LoadIC), R(3), U8(6), U8(vector->GetIndex(slot8)), //
6657 B(Return), // 6517 B(Return), //
6658 B(LdaUndefined), // 6518 B(LdaUndefined), //
6659 B(Return), // 6519 B(Return), //
6660 }, 6520 },
6661 7, 6521 7,
6662 {InstanceType::FIXED_ARRAY_TYPE, 6522 {InstanceType::FIXED_ARRAY_TYPE,
6663 InstanceType::FIXED_ARRAY_TYPE, 6523 InstanceType::FIXED_ARRAY_TYPE,
6664 InstanceType::SYMBOL_TYPE, 6524 InstanceType::SYMBOL_TYPE,
6665 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 6525 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
6666 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 6526 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
(...skipping 2366 matching lines...) Expand 10 before | Expand all | Expand 10 after
9033 B(LdaTheHole), // 8893 B(LdaTheHole), //
9034 B(Star), R(2), // 8894 B(Star), R(2), //
9035 B(CreateClosure), U8(0), U8(0), // 8895 B(CreateClosure), U8(0), U8(0), //
9036 B(Star), R(3), // 8896 B(Star), R(3), //
9037 B(LdaSmi8), U8(15), // 8897 B(LdaSmi8), U8(15), //
9038 B(Star), R(4), // 8898 B(Star), R(4), //
9039 B(LdaConstant), U8(1), // 8899 B(LdaConstant), U8(1), //
9040 B(Star), R(5), // 8900 B(Star), R(5), //
9041 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), // 8901 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), //
9042 B(Star), R(2), // 8902 B(Star), R(2), //
9043 B(LoadICSloppy), R(2), U8(2), U8(1), // 8903 B(LoadIC), R(2), U8(2), U8(1), //
9044 B(Star), R(3), // 8904 B(Star), R(3), //
9045 B(Mov), R(3), R(4), // 8905 B(Mov), R(3), R(4), //
9046 B(LdaConstant), U8(3), // 8906 B(LdaConstant), U8(3), //
9047 B(Star), R(5), // 8907 B(Star), R(5), //
9048 B(CreateClosure), U8(4), U8(0), // 8908 B(CreateClosure), U8(4), U8(0), //
9049 B(Star), R(6), // 8909 B(Star), R(6), //
9050 B(LdaSmi8), U8(2), // 8910 B(LdaSmi8), U8(2), //
9051 B(Star), R(7), // 8911 B(Star), R(7), //
9052 B(LdaZero), // 8912 B(LdaZero), //
9053 B(Star), R(8), // 8913 B(Star), R(8), //
(...skipping 25 matching lines...) Expand all
9079 B(LdaTheHole), // 8939 B(LdaTheHole), //
9080 B(Star), R(2), // 8940 B(Star), R(2), //
9081 B(CreateClosure), U8(0), U8(0), // 8941 B(CreateClosure), U8(0), U8(0), //
9082 B(Star), R(3), // 8942 B(Star), R(3), //
9083 B(LdaSmi8), U8(15), // 8943 B(LdaSmi8), U8(15), //
9084 B(Star), R(4), // 8944 B(Star), R(4), //
9085 B(LdaConstant), U8(1), // 8945 B(LdaConstant), U8(1), //
9086 B(Star), R(5), // 8946 B(Star), R(5), //
9087 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), // 8947 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), //
9088 B(Star), R(2), // 8948 B(Star), R(2), //
9089 B(LoadICSloppy), R(2), U8(2), U8(1), // 8949 B(LoadIC), R(2), U8(2), U8(1), //
9090 B(Star), R(3), // 8950 B(Star), R(3), //
9091 B(Mov), R(3), R(4), // 8951 B(Mov), R(3), R(4), //
9092 B(LdaConstant), U8(3), // 8952 B(LdaConstant), U8(3), //
9093 B(Star), R(5), // 8953 B(Star), R(5), //
9094 B(CreateClosure), U8(4), U8(0), // 8954 B(CreateClosure), U8(4), U8(0), //
9095 B(Star), R(6), // 8955 B(Star), R(6), //
9096 B(LdaSmi8), U8(2), // 8956 B(LdaSmi8), U8(2), //
9097 B(Star), R(7), // 8957 B(Star), R(7), //
9098 B(LdaZero), // 8958 B(LdaZero), //
9099 B(Star), R(8), // 8959 B(Star), R(8), //
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
9134 B(LdaTheHole), // 8994 B(LdaTheHole), //
9135 B(Star), R(3), // 8995 B(Star), R(3), //
9136 B(CreateClosure), U8(2), U8(0), // 8996 B(CreateClosure), U8(2), U8(0), //
9137 B(Star), R(4), // 8997 B(Star), R(4), //
9138 B(LdaSmi8), U8(41), // 8998 B(LdaSmi8), U8(41), //
9139 B(Star), R(5), // 8999 B(Star), R(5), //
9140 B(LdaSmi8), U8(107), // 9000 B(LdaSmi8), U8(107), //
9141 B(Star), R(6), // 9001 B(Star), R(6), //
9142 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), // 9002 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), //
9143 B(Star), R(3), // 9003 B(Star), R(3), //
9144 B(LoadICSloppy), R(3), U8(3), U8(1), // 9004 B(LoadIC), R(3), U8(3), U8(1), //
9145 B(Star), R(4), // 9005 B(Star), R(4), //
9146 B(Mov), R(4), R(5), // 9006 B(Mov), R(4), R(5), //
9147 B(LdaContextSlot), R(context), U8(4), // 9007 B(LdaContextSlot), R(context), U8(4), //
9148 B(ToName), // 9008 B(ToName), //
9149 B(Star), R(6), // 9009 B(Star), R(6), //
9150 B(CreateClosure), U8(4), U8(0), // 9010 B(CreateClosure), U8(4), U8(0), //
9151 B(Star), R(7), // 9011 B(Star), R(7), //
9152 B(LdaSmi8), U8(2), // 9012 B(LdaSmi8), U8(2), //
9153 B(Star), R(8), // 9013 B(Star), R(8), //
9154 B(LdaSmi8), U8(1), // 9014 B(LdaSmi8), U8(1), //
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
9200 B(LdaTheHole), // 9060 B(LdaTheHole), //
9201 B(Star), R(3), // 9061 B(Star), R(3), //
9202 B(CreateClosure), U8(0), U8(0), // 9062 B(CreateClosure), U8(0), U8(0), //
9203 B(Star), R(4), // 9063 B(Star), R(4), //
9204 B(LdaSmi8), U8(30), // 9064 B(LdaSmi8), U8(30), //
9205 B(Star), R(5), // 9065 B(Star), R(5), //
9206 B(LdaSmi8), U8(67), // 9066 B(LdaSmi8), U8(67), //
9207 B(Star), R(6), // 9067 B(Star), R(6), //
9208 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), // 9068 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), //
9209 B(Star), R(3), // 9069 B(Star), R(3), //
9210 B(LoadICSloppy), R(3), U8(1), U8(1), // 9070 B(LoadIC), R(3), U8(1), U8(1), //
9211 B(Star), R(4), // 9071 B(Star), R(4), //
9212 B(CallRuntime), U16(Runtime::kFinalizeClassDefinition), R(3), U8(2), // 9072 B(CallRuntime), U16(Runtime::kFinalizeClassDefinition), R(3), U8(2), //
9213 B(Star), R(0), // 9073 B(Star), R(0), //
9214 B(Star), R(1), // 9074 B(Star), R(1), //
9215 B(JumpIfNotHole), U8(11), // 9075 B(JumpIfNotHole), U8(11), //
9216 B(LdaConstant), U8(2), // 9076 B(LdaConstant), U8(2), //
9217 B(Star), R(4), // 9077 B(Star), R(4), //
9218 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), // 9078 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), //
9219 B(Star), R(3), // 9079 B(Star), R(3), //
9220 B(New), R(3), R(0), U8(0), // 9080 B(New), R(3), R(0), U8(0), //
(...skipping 11 matching lines...) Expand all
9232 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet); 9092 helper.MakeBytecodeForFunctionBody(snippets[i].code_snippet);
9233 CheckBytecodeArrayEqual(snippets[i], bytecode_array); 9093 CheckBytecodeArrayEqual(snippets[i], bytecode_array);
9234 } 9094 }
9235 } 9095 }
9236 9096
9237 // TODO(oth): Add tests for super keyword. 9097 // TODO(oth): Add tests for super keyword.
9238 9098
9239 } // namespace interpreter 9099 } // namespace interpreter
9240 } // namespace internal 9100 } // namespace internal
9241 } // namespace v8 9101 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/interpreter/test-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698