fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 1 | /* |
| 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.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 27 | |
| 28 | #if ENABLE(DFG_JIT) |
| 29 | |
fpizlo@apple.com | b426f86 | 2014-02-10 02:51:13 +0000 | [diff] [blame] | 30 | #include "DFGUseKind.h" |
| 31 | |
fpizlo@apple.com | fb7eff2 | 2014-02-11 01:45:50 +0000 | [diff] [blame^] | 32 | #include "JSCInlines.h" |
fpizlo@apple.com | b426f86 | 2014-02-10 02:51:13 +0000 | [diff] [blame] | 33 | |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 34 | namespace WTF { |
| 35 | |
| 36 | using namespace JSC::DFG; |
| 37 | |
| 38 | void 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.com | 6921b29 | 2013-09-18 17:14:02 +0000 | [diff] [blame] | 50 | case MachineIntUse: |
| 51 | out.print("MachineInt"); |
| 52 | break; |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 53 | 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.com | 0fa8386 | 2013-09-06 19:01:21 +0000 | [diff] [blame] | 74 | case FinalObjectUse: |
| 75 | out.print("FinalObject"); |
| 76 | break; |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 77 | case ObjectOrOtherUse: |
| 78 | out.print("ObjectOrOther"); |
| 79 | break; |
oliver@apple.com | bd15be8 | 2013-07-25 04:03:42 +0000 | [diff] [blame] | 80 | case StringIdentUse: |
| 81 | out.print("StringIdent"); |
| 82 | break; |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 83 | case StringUse: |
| 84 | out.print("String"); |
| 85 | break; |
fpizlo@apple.com | 0e6e154 | 2013-03-18 18:09:22 +0000 | [diff] [blame] | 86 | 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.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 95 | 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 | |