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

Side by Side Diff: test/mjsunit/elements-kind.js

Issue 10615002: Track allocation info (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Diff with b_e Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/type-info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 } 159 }
160 var smi_only = new Array(1, 2, 3); 160 var smi_only = new Array(1, 2, 3);
161 assertKind(elements_kind.fast_smi_only, smi_only); 161 assertKind(elements_kind.fast_smi_only, smi_only);
162 for (var i = 0; i < 3; i++) monomorphic(smi_only); 162 for (var i = 0; i < 3; i++) monomorphic(smi_only);
163 %OptimizeFunctionOnNextCall(monomorphic); 163 %OptimizeFunctionOnNextCall(monomorphic);
164 monomorphic(smi_only); 164 monomorphic(smi_only);
165 165
166 if (support_smi_only_arrays) { 166 if (support_smi_only_arrays) {
167 function construct_smis() { 167 function construct_smis() {
168 var a = [0, 0, 0]; 168 var a = new Array(0, 0, 0);
169 a[0] = 0; // Send the COW array map to the steak house. 169 a[0] = 0; // Send the COW array map to the steak house.
170 assertKind(elements_kind.fast_smi_only, a); 170 assertKind(elements_kind.fast_smi_only, a);
171 return a; 171 return a;
172 } 172 }
173 function construct_doubles() { 173 function construct_doubles() {
174 var a = construct_smis(); 174 var a = construct_smis();
175 a[0] = 1.5; 175 a[0] = 1.5;
176 assertKind(elements_kind.fast_double, a); 176 assertKind(elements_kind.fast_double, a);
177 return a; 177 return a;
178 } 178 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 var a = ["foo", "bar"]; 339 var a = ["foo", "bar"];
340 assertKind(elements_kind.fast, a); 340 assertKind(elements_kind.fast, a);
341 var b = a.splice(0, 1); 341 var b = a.splice(0, 1);
342 assertKind(elements_kind.fast, b); 342 assertKind(elements_kind.fast, b);
343 var c = a.slice(0, 1); 343 var c = a.slice(0, 1);
344 assertKind(elements_kind.fast, c); 344 assertKind(elements_kind.fast, c);
345 } 345 }
346 346
347 // Throw away type information in the ICs for next stress run. 347 // Throw away type information in the ICs for next stress run.
348 gc(); 348 gc();
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698