blob: 4c9661d01580a761d8760879180b32c3d0dce7d4 [file] [log] [blame]
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +00001/*
fpizlo@apple.come079bb52014-03-05 07:41:03 +00002 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +00003 *
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"
ossy@webkit.orgbeb0de42014-02-17 19:00:03 +000027#include "DFGUseKind.h"
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000028
29#if ENABLE(DFG_JIT)
30
fpizlo@apple.comfb7eff22014-02-11 01:45:50 +000031#include "JSCInlines.h"
fpizlo@apple.comb426f862014-02-10 02:51:13 +000032
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000033namespace WTF {
34
35using namespace JSC::DFG;
36
37void printInternal(PrintStream& out, UseKind useKind)
38{
39 switch (useKind) {
40 case UntypedUse:
41 out.print("Untyped");
42 break;
43 case Int32Use:
44 out.print("Int32");
45 break;
46 case KnownInt32Use:
47 out.print("KnownInt32");
48 break;
fpizlo@apple.com7b33e0c2014-04-15 20:26:16 +000049 case Int52RepUse:
50 out.print("Int52Rep");
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000051 break;
52 case NumberUse:
53 out.print("Number");
54 break;
fpizlo@apple.com7b33e0c2014-04-15 20:26:16 +000055 case DoubleRepUse:
56 out.print("DoubleRep");
57 break;
58 case DoubleRepRealUse:
59 out.print("DoubleRepReal");
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000060 break;
61 case BooleanUse:
62 out.print("Boolean");
63 break;
64 case CellUse:
65 out.print("Cell");
66 break;
67 case KnownCellUse:
68 out.print("KnownCell");
69 break;
70 case ObjectUse:
71 out.print("Object");
72 break;
fpizlo@apple.com0fa83862013-09-06 19:01:21 +000073 case FinalObjectUse:
74 out.print("FinalObject");
75 break;
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000076 case ObjectOrOtherUse:
77 out.print("ObjectOrOther");
78 break;
oliver@apple.combd15be82013-07-25 04:03:42 +000079 case StringIdentUse:
80 out.print("StringIdent");
81 break;
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000082 case StringUse:
83 out.print("String");
84 break;
fpizlo@apple.com0e6e1542013-03-18 18:09:22 +000085 case KnownStringUse:
86 out.print("KnownString");
87 break;
88 case StringObjectUse:
89 out.print("StringObject");
90 break;
91 case StringOrStringObjectUse:
92 out.print("StringOrStringObject");
93 break;
fpizlo@apple.com385a33a2014-03-18 20:53:07 +000094 case NotStringVarUse:
95 out.print("NotStringVar");
96 break;
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +000097 case NotCellUse:
98 out.print("NotCell");
99 break;
100 case OtherUse:
101 out.print("Other");
102 break;
fpizlo@apple.come079bb52014-03-05 07:41:03 +0000103 case MiscUse:
104 out.print("Misc");
105 break;
fpizlo@apple.com7a1964c2013-02-21 22:59:02 +0000106 default:
107 RELEASE_ASSERT_NOT_REACHED();
108 break;
109 }
110}
111
112} // namespace WTF
113
114#endif // ENABLE(DFG_JIT)
115