Index: test/mjsunit/track-fields.js |
diff --git a/test/mjsunit/track-fields.js b/test/mjsunit/track-fields.js |
index 74389d908ade8ff6324555dfd20ae3a0eca47b77..ced006c4fbe31d702ca43bc7c35ec7a6ea7a01a5 100644 |
--- a/test/mjsunit/track-fields.js |
+++ b/test/mjsunit/track-fields.js |
@@ -306,3 +306,22 @@ test_fic(ftest3); |
test_fic(ftest4); |
assertTrue(%HaveSameMap(ftest1, ftest3)); |
assertTrue(%HaveSameMap(ftest3, ftest4)); |
+ |
+// Test representations and transition conversions. |
+function read_first_double(o) { |
+ return o.first_double; |
+} |
+var df1 = {}; |
+df1.first_double=1.6; |
+read_first_double(df1); |
+read_first_double(df1); |
+function some_function1() { return 10; } |
+var df2 = {}; |
+df2.first_double = 1.7; |
+df2.second_function = some_function1; |
+function some_function2() { return 20; } |
+var df3 = {}; |
+df3.first_double = 1.7; |
+df3.second_function = some_function2; |
+df1.first_double = 10; |
+read_first_double(df1); |