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

Unified Diff: test/mjsunit/string-externalize.js

Issue 2720713003: Adjust some tests to prepare enabling Ignition+TurboFan (Closed)
Patch Set: Turn off flag in this CL. 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 | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/string-externalize.js
diff --git a/test/mjsunit/string-externalize.js b/test/mjsunit/string-externalize.js
index 39cc124914cdece4cbc9b30f0bed66a78cc46e82..dd861e8816366e4f4377aced1ad716c6c5ff5d53 100644
--- a/test/mjsunit/string-externalize.js
+++ b/test/mjsunit/string-externalize.js
@@ -25,10 +25,16 @@
// (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: --expose-externalize-string --expose-gc
+// Flags: --expose-externalize-string --expose-gc --allow-natives-syntax
var size = 1024;
+function dont_inline() { return "A"; }
+%NeverOptimizeFunction(dont_inline);
+
+function dont_inline2() { return "\u1234"; }
+%NeverOptimizeFunction(dont_inline2);
+
function test() {
var str = "";
@@ -39,12 +45,12 @@ function test() {
assertTrue(isOneByteString(str));
var twoByteExternalWithOneByteData =
- "AA" + (function() { return "A"; })();
+ "AA" + dont_inline();
externalizeString(twoByteExternalWithOneByteData, true /* force two-byte */);
assertFalse(isOneByteString(twoByteExternalWithOneByteData));
var realTwoByteExternalString =
- "\u1234\u1234\u1234\u1234" + (function() { return "\u1234"; })();
+ "\u1234\u1234\u1234\u1234" + dont_inline2();
externalizeString(realTwoByteExternalString);
assertFalse(isOneByteString(realTwoByteExternalString));
« no previous file with comments | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698