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

Side by Side Diff: test/mjsunit/constant-fold-control-instructions.js

Issue 1479293002: Rename %_IsSpecObject to %_IsJSReceiver. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years 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
« no previous file with comments | « test/cctest/compiler/test-run-jscalls.cc ('k') | test/mjsunit/regress/regress-995.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --allow-natives-syntax --fold-constants 5 // Flags: --allow-natives-syntax --fold-constants
6 6
7 function test() { 7 function test() {
8 assertEquals("string", typeof ""); 8 assertEquals("string", typeof "");
9 assertEquals("number", typeof 1.1); 9 assertEquals("number", typeof 1.1);
10 assertEquals("number", typeof 1); 10 assertEquals("number", typeof 1);
11 assertEquals("boolean", typeof true); 11 assertEquals("boolean", typeof true);
12 assertEquals("function", typeof function() {}); 12 assertEquals("function", typeof function() {});
13 assertEquals("object", typeof null); 13 assertEquals("object", typeof null);
14 assertEquals("object", typeof {}); 14 assertEquals("object", typeof {});
15 assertEquals("object", typeof /regex/); 15 assertEquals("object", typeof /regex/);
16 16
17 assertTrue(%_IsSmi(1)); 17 assertTrue(%_IsSmi(1));
18 assertFalse(%_IsSmi(1.1)); 18 assertFalse(%_IsSmi(1.1));
19 assertFalse(%_IsSmi({})); 19 assertFalse(%_IsSmi({}));
20 20
21 assertTrue(%_IsRegExp(/regexp/)); 21 assertTrue(%_IsRegExp(/regexp/));
22 assertFalse(%_IsRegExp({})); 22 assertFalse(%_IsRegExp({}));
23 23
24 assertTrue(%_IsArray([1])); 24 assertTrue(%_IsArray([1]));
25 assertFalse(%_IsArray(function() {})); 25 assertFalse(%_IsArray(function() {}));
26 26
27 assertTrue(%_IsFunction(function() {})); 27 assertTrue(%_IsFunction(function() {}));
28 assertFalse(%_IsFunction(null)); 28 assertFalse(%_IsFunction(null));
29 29
30 assertTrue(%_IsSpecObject(new Date())); 30 assertTrue(%_IsJSReceiver(new Date()));
31 assertFalse(%_IsSpecObject(1)); 31 assertFalse(%_IsJSReceiver(1));
32 32
33 assertTrue(%_IsMinusZero(-0.0)); 33 assertTrue(%_IsMinusZero(-0.0));
34 assertFalse(%_IsMinusZero(1)); 34 assertFalse(%_IsMinusZero(1));
35 assertFalse(%_IsMinusZero("")); 35 assertFalse(%_IsMinusZero(""));
36 } 36 }
37 37
38 38
39 test(); 39 test();
40 test(); 40 test();
41 %OptimizeFunctionOnNextCall(test); 41 %OptimizeFunctionOnNextCall(test);
42 test(); 42 test();
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-jscalls.cc ('k') | test/mjsunit/regress/regress-995.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698