| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 case NORMAL: | 54 case NORMAL: |
| 55 PrintF(out, " -type = normal\n"); | 55 PrintF(out, " -type = normal\n"); |
| 56 PrintF(out, " -entry = %d", GetDictionaryEntry()); | 56 PrintF(out, " -entry = %d", GetDictionaryEntry()); |
| 57 break; | 57 break; |
| 58 case MAP_TRANSITION: | 58 case MAP_TRANSITION: |
| 59 PrintF(out, " -type = map transition\n"); | 59 PrintF(out, " -type = map transition\n"); |
| 60 PrintF(out, " -map:\n"); | 60 PrintF(out, " -map:\n"); |
| 61 GetTransitionMap()->Print(out); | 61 GetTransitionMap()->Print(out); |
| 62 PrintF(out, "\n"); | 62 PrintF(out, "\n"); |
| 63 break; | 63 break; |
| 64 case ELEMENTS_TRANSITION: | |
| 65 PrintF(out, " -type = elements transition\n"); | |
| 66 PrintF(out, " -map:\n"); | |
| 67 GetTransitionMap()->Print(out); | |
| 68 PrintF(out, "\n"); | |
| 69 break; | |
| 70 case CONSTANT_FUNCTION: | 64 case CONSTANT_FUNCTION: |
| 71 PrintF(out, " -type = constant function\n"); | 65 PrintF(out, " -type = constant function\n"); |
| 72 PrintF(out, " -function:\n"); | 66 PrintF(out, " -function:\n"); |
| 73 GetConstantFunction()->Print(out); | 67 GetConstantFunction()->Print(out); |
| 74 PrintF(out, "\n"); | 68 PrintF(out, "\n"); |
| 75 break; | 69 break; |
| 76 case FIELD: | 70 case FIELD: |
| 77 PrintF(out, " -type = field\n"); | 71 PrintF(out, " -type = field\n"); |
| 78 PrintF(out, " -index = %d", GetFieldIndex()); | 72 PrintF(out, " -index = %d", GetFieldIndex()); |
| 79 PrintF(out, "\n"); | 73 PrintF(out, "\n"); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 } | 105 } |
| 112 | 106 |
| 113 | 107 |
| 114 #endif | 108 #endif |
| 115 | 109 |
| 116 | 110 |
| 117 bool Descriptor::ContainsTransition() { | 111 bool Descriptor::ContainsTransition() { |
| 118 switch (details_.type()) { | 112 switch (details_.type()) { |
| 119 case MAP_TRANSITION: | 113 case MAP_TRANSITION: |
| 120 case CONSTANT_TRANSITION: | 114 case CONSTANT_TRANSITION: |
| 121 case ELEMENTS_TRANSITION: | |
| 122 return true; | 115 return true; |
| 123 case CALLBACKS: { | 116 case CALLBACKS: { |
| 124 if (!value_->IsAccessorPair()) return false; | 117 if (!value_->IsAccessorPair()) return false; |
| 125 AccessorPair* accessors = AccessorPair::cast(value_); | 118 AccessorPair* accessors = AccessorPair::cast(value_); |
| 126 return accessors->getter()->IsMap() || accessors->setter()->IsMap(); | 119 return accessors->getter()->IsMap() || accessors->setter()->IsMap(); |
| 127 } | 120 } |
| 128 case NORMAL: | 121 case NORMAL: |
| 129 case FIELD: | 122 case FIELD: |
| 130 case CONSTANT_FUNCTION: | 123 case CONSTANT_FUNCTION: |
| 131 case HANDLER: | 124 case HANDLER: |
| 132 case INTERCEPTOR: | 125 case INTERCEPTOR: |
| 133 case NULL_DESCRIPTOR: | 126 case NULL_DESCRIPTOR: |
| 134 return false; | 127 return false; |
| 135 } | 128 } |
| 136 UNREACHABLE(); // Keep the compiler happy. | 129 UNREACHABLE(); // Keep the compiler happy. |
| 137 return false; | 130 return false; |
| 138 } | 131 } |
| 139 | 132 |
| 140 | 133 |
| 141 } } // namespace v8::internal | 134 } } // namespace v8::internal |
| OLD | NEW |