fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 1 | /* |
fpizlo@apple.com | e079bb5 | 2014-03-05 07:41:03 +0000 | [diff] [blame] | 2 | * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 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" |
ossy@webkit.org | beb0de4 | 2014-02-17 19:00:03 +0000 | [diff] [blame] | 27 | #include "DFGUseKind.h" |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 28 | |
| 29 | #if ENABLE(DFG_JIT) |
| 30 | |
fpizlo@apple.com | fb7eff2 | 2014-02-11 01:45:50 +0000 | [diff] [blame] | 31 | #include "JSCInlines.h" |
fpizlo@apple.com | b426f86 | 2014-02-10 02:51:13 +0000 | [diff] [blame] | 32 | |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 33 | namespace WTF { |
| 34 | |
| 35 | using namespace JSC::DFG; |
| 36 | |
| 37 | void 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.com | 7b33e0c | 2014-04-15 20:26:16 +0000 | [diff] [blame^] | 49 | case Int52RepUse: |
| 50 | out.print("Int52Rep"); |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 51 | break; |
| 52 | case NumberUse: |
| 53 | out.print("Number"); |
| 54 | break; |
fpizlo@apple.com | 7b33e0c | 2014-04-15 20:26:16 +0000 | [diff] [blame^] | 55 | case DoubleRepUse: |
| 56 | out.print("DoubleRep"); |
| 57 | break; |
| 58 | case DoubleRepRealUse: |
| 59 | out.print("DoubleRepReal"); |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 60 | 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.com | 0fa8386 | 2013-09-06 19:01:21 +0000 | [diff] [blame] | 73 | case FinalObjectUse: |
| 74 | out.print("FinalObject"); |
| 75 | break; |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 76 | case ObjectOrOtherUse: |
| 77 | out.print("ObjectOrOther"); |
| 78 | break; |
oliver@apple.com | bd15be8 | 2013-07-25 04:03:42 +0000 | [diff] [blame] | 79 | case StringIdentUse: |
| 80 | out.print("StringIdent"); |
| 81 | break; |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 82 | case StringUse: |
| 83 | out.print("String"); |
| 84 | break; |
fpizlo@apple.com | 0e6e154 | 2013-03-18 18:09:22 +0000 | [diff] [blame] | 85 | 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.com | 385a33a | 2014-03-18 20:53:07 +0000 | [diff] [blame] | 94 | case NotStringVarUse: |
| 95 | out.print("NotStringVar"); |
| 96 | break; |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 97 | case NotCellUse: |
| 98 | out.print("NotCell"); |
| 99 | break; |
| 100 | case OtherUse: |
| 101 | out.print("Other"); |
| 102 | break; |
fpizlo@apple.com | e079bb5 | 2014-03-05 07:41:03 +0000 | [diff] [blame] | 103 | case MiscUse: |
| 104 | out.print("Misc"); |
| 105 | break; |
fpizlo@apple.com | 7a1964c | 2013-02-21 22:59:02 +0000 | [diff] [blame] | 106 | default: |
| 107 | RELEASE_ASSERT_NOT_REACHED(); |
| 108 | break; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | } // namespace WTF |
| 113 | |
| 114 | #endif // ENABLE(DFG_JIT) |
| 115 | |