blob: 00843822116e08251fa53e82d2c40d0e07eb3108 [file] [log] [blame]
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +00001/*
2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include "config.h"
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000027
28#if ENABLE(DFG_JIT)
29
fpizlo@apple.comb426f862014-02-10 02:51:13 +000030#include "DFGUseKind.h"
31
fpizlo@apple.comfb7eff22014-02-11 01:45:50 +000032#include "JSCInlines.h"
fpizlo@apple.comb426f862014-02-10 02:51:13 +000033
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000034namespace WTF {
35
36using namespace JSC::DFG;
37
38void printInternal(PrintStream& out, UseKind useKind)
39{
40 switch (useKind) {
41 case UntypedUse:
42 out.print("Untyped");
43 break;
44 case Int32Use:
45 out.print("Int32");
46 break;
47 case KnownInt32Use:
48 out.print("KnownInt32");
49 break;
fpizlo@apple.com6921b292013-09-18 17:14:02 +000050 case MachineIntUse:
51 out.print("MachineInt");
52 break;
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000053 case RealNumberUse:
54 out.print("RealNumber");
55 break;
56 case NumberUse:
57 out.print("Number");
58 break;
59 case KnownNumberUse:
60 out.print("KnownNumber");
61 break;
62 case BooleanUse:
63 out.print("Boolean");
64 break;
65 case CellUse:
66 out.print("Cell");
67 break;
68 case KnownCellUse:
69 out.print("KnownCell");
70 break;
71 case ObjectUse:
72 out.print("Object");
73 break;
fpizlo@apple.com0fa83862013-09-06 19:01:21 +000074 case FinalObjectUse:
75 out.print("FinalObject");
76 break;
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000077 case ObjectOrOtherUse:
78 out.print("ObjectOrOther");
79 break;
oliver@apple.combd15be82013-07-25 04:03:42 +000080 case StringIdentUse:
81 out.print("StringIdent");
82 break;
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000083 case StringUse:
84 out.print("String");
85 break;
fpizlo@apple.com0e6e1542013-03-18 18:09:22 +000086 case KnownStringUse:
87 out.print("KnownString");
88 break;
89 case StringObjectUse:
90 out.print("StringObject");
91 break;
92 case StringOrStringObjectUse:
93 out.print("StringOrStringObject");
94 break;
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000095 case NotCellUse:
96 out.print("NotCell");
97 break;
98 case OtherUse:
99 out.print("Other");
100 break;
101 default:
102 RELEASE_ASSERT_NOT_REACHED();
103 break;
104 }
105}
106
107} // namespace WTF
108
109#endif // ENABLE(DFG_JIT)
110