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

Unified Diff: test/message/type-profile/collect-type-profile.js

Issue 2707873002: Collect type profile for DevTools. (Closed)
Patch Set: Explain why throw is needed in message test. Created 3 years, 9 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
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/message/type-profile/collect-type-profile.out » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/message/type-profile/collect-type-profile.js
diff --git a/test/message/type-profile/collect-type-profile.js b/test/message/type-profile/collect-type-profile.js
new file mode 100644
index 0000000000000000000000000000000000000000..45572af20c3d3ee3988942804d572871b87069d1
--- /dev/null
+++ b/test/message/type-profile/collect-type-profile.js
@@ -0,0 +1,34 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --type-profile --turbo
+
+function test(param) {
+ var my_var1 = param;
+ var my_var2 = 17;
+}
+
+test({});
+test(123);
+test('hello');
+test(123);
+test(undefined);
+test('hello');
+test({x: 12});
+test({x: 12});
+
+class MyClass {
+ constructor() {}
+}
+
+
+function testConstructorNames(param) {
+ var my_var = param;
+}
+
+testConstructorNames(new MyClass());
+testConstructorNames({});
+testConstructorNames(2);
+
+throw "throw otherwise test fails with --stress-opt";
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/message/type-profile/collect-type-profile.out » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698