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

Unified Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 2707873002: Collect type profile for DevTools. (Closed)
Patch Set: Use constructor name if available. Created 3 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 side-by-side diff with in-line comments
Download patch
Index: test/unittests/interpreter/bytecode-array-builder-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index 9f8a2d4dbea75c2ecb02e017bdb7cce069ba31b8..5a9bbf04a8df0f00208d9717add9911892bff9c2 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -339,6 +339,8 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
builder.StoreDataPropertyInLiteral(reg, reg,
DataPropertyInLiteralFlag::kNoFlags, 0);
+ builder.CollectTypeProfile(reg, reg, 0);
+
// Emit wide context operations.
builder.LoadContextSlot(reg, 1024, 0, BytecodeArrayBuilder::kMutableSlot)
.StoreContextSlot(reg, 1024, 0);
@@ -441,6 +443,12 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
scorecard[Bytecodes::ToByte(Bytecode::kTestNull)] = 1;
}
+ if (!FLAG_type_profile) {
+ // Insert entry for bytecodes only emitted when
+ // Type Information for DevTools is turned on.
+ scorecard[Bytecodes::ToByte(Bytecode::kCollectTypeProfile)] = 1;
+ }
+
// Check return occurs at the end and only once in the BytecodeArray.
CHECK_EQ(final_bytecode, Bytecode::kReturn);
CHECK_EQ(scorecard[Bytecodes::ToByte(final_bytecode)], 1);
« src/runtime/runtime-object.cc ('K') | « test/mjsunit/debug-collect-type-profile.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698