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

Unified Diff: test/mjsunit/parallel-invalidate-transition-map.js

Issue 15896038: Fix parallel recompilation wrt transition maps dependency. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/parallel-invalidate-transition-map.js
diff --git a/test/mjsunit/compiler/parallel-proto-change.js b/test/mjsunit/parallel-invalidate-transition-map.js
similarity index 73%
copy from test/mjsunit/compiler/parallel-proto-change.js
copy to test/mjsunit/parallel-invalidate-transition-map.js
index aa1ac6de90952c3a0f5e2e3ea28c4f1d1dcdd9f1..42a266f556e6ea0f75a83ad453a6d96ce11c81f0 100644
--- a/test/mjsunit/compiler/parallel-proto-change.js
+++ b/test/mjsunit/parallel-invalidate-transition-map.js
@@ -25,26 +25,32 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
+// Flags: --track-fields --track-double-fields --allow-natives-syntax
// Flags: --parallel-recompilation --parallel-recompilation-delay=50
function assertUnoptimized(fun) {
assertTrue(%GetOptimizationStatus(fun) != 1);
}
-function f(foo) { return foo.bar(); }
+function new_object() {
+ var o = {};
+ o.a = 1;
+ o.b = 2;
+ return o;
+}
+
+function add_field(obj) {
+ obj.c = 3;
+}
-var o = {};
-o.__proto__ = { __proto__: { bar: function() { return 1; } } };
+add_field(new_object());
+add_field(new_object());
+%OptimizeFunctionOnNextCall(add_field, "parallel");
-assertEquals(1, f(o));
-assertEquals(1, f(o));
+var o = new_object();
+add_field(o); // Trigger optimization.
+assertUnoptimized(add_field); // Not yet optimized.
+o.c = 2.2; // Invalidate transition map.
+%CompleteOptimization(add_field); // Conclude optimization with...
+assertUnoptimized(add_field); // ... bailing out due to map dependency.
-%OptimizeFunctionOnNextCall(f, "parallel");
-assertEquals(1, f(o)); // Trigger optimization.
-assertUnoptimized(f); // Optimization not yet done.
-// Change the prototype chain during optimization to trigger map invalidation.
-o.__proto__.__proto__ = { bar: function() { return 2; } };
-%CompleteOptimization(f); // Conclude optimization with...
-assertUnoptimized(f); // ... bailing out due to map dependency.
-assertEquals(2, f(o));
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698