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

Unified Diff: test/mjsunit/transition-elements-kind.js

Issue 148153010: Synchronize with r15701. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « test/mjsunit/regress/regress-mul-canoverflowb.js ('k') | tools/blink_tests/TestExpectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/transition-elements-kind.js
diff --git a/test/mjsunit/regress/regress-polymorphic-store.js b/test/mjsunit/transition-elements-kind.js
similarity index 78%
copy from test/mjsunit/regress/regress-polymorphic-store.js
copy to test/mjsunit/transition-elements-kind.js
index 4723a7f4343bb79daf5283325ee5c1082abefa79..ba05c950d98a1f0a490e2f3c1a123060e2f8fb50 100644
--- a/test/mjsunit/regress/regress-polymorphic-store.js
+++ b/test/mjsunit/transition-elements-kind.js
@@ -25,24 +25,24 @@
// (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: --allow-natives-syntax --compiled-transitions
+// Flags: --track-allocation-sites
-var o1 = {};
-o1.f1 = function() { return 10; };
-o1.x = 5;
-o1.y = 2;
-var o2 = {};
-o2.x = 5;
-o2.y = 5;
-
-function store(o, v) {
- o.y = v;
+// Allocation site for empty double arrays.
+function foo() {
+ return new Array();
}
+var a = foo();
+a[0] = 1.1;
-store(o2, 0);
-store(o1, 0);
-store(o2, 0);
+// Emit a TransitionElementsKindStub which transitions from double to object.
+function store(a,x) {
+ a[0] = x;
+}
+store([1.1], 'a');
+store([1.1], 1.1);
%OptimizeFunctionOnNextCall(store);
-store(o1, 10);
-assertEquals(5, o1.x);
-assertEquals(10, o1.y);
+
+// Use the TransitionElementsKindStub to transition from double to object.
+var b = foo();
+store(b, 'a');
« no previous file with comments | « test/mjsunit/regress/regress-mul-canoverflowb.js ('k') | tools/blink_tests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698