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

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

Issue 174863002: Implement KnownSuccessor method to some control instructions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« src/hydrogen-instructions.cc ('K') | « src/objects-inl.h ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax --fold-constants
6
7 function test() {
8 assertEquals("string", typeof "");
9 assertEquals("number", typeof 1.1);
10 assertEquals("number", typeof 1);
11 assertEquals("boolean", typeof true);
12 assertEquals("function", typeof function() {});
13 assertEquals("object", typeof null);
14 assertEquals("object", typeof {});
15
16 assertTrue(%_IsObject({}));
17 assertTrue(%_IsObject(null));
18 assertTrue(%_IsObject(/regex/));
19 assertFalse(%_IsObject(0));
20 assertFalse(%_IsObject(""));
21
22 assertTrue(%_IsSmi(1));
23 assertFalse(%_IsSmi(1.1));
24 assertFalse(%_IsSmi({}));
25
26 assertTrue(%_IsRegExp(/regexp/));
27 assertFalse(%_IsRegExp({}));
28
29 assertTrue(%_IsArray([1]));
30 assertFalse(%_IsArray(function() {}));
31
32 assertTrue(%_IsFunction(function() {}));
33 assertFalse(%_IsFunction(null));
34
35 assertTrue(%_IsSpecObject(new Date()));
36 assertFalse(%_IsSpecObject(1));
37 }
38
39
40 test();
41 test();
42 %OptimizeFunctionOnNextCall(test);
43 test();
OLDNEW
« src/hydrogen-instructions.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698