| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 | 41 |
| 42 StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId( | 42 StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId( |
| 43 int instance_type, | 43 int instance_type, |
| 44 int instance_size) { | 44 int instance_size) { |
| 45 if (instance_type < FIRST_NONSTRING_TYPE) { | 45 if (instance_type < FIRST_NONSTRING_TYPE) { |
| 46 switch (instance_type & kStringRepresentationMask) { | 46 switch (instance_type & kStringRepresentationMask) { |
| 47 case kSeqStringTag: | 47 case kSeqStringTag: |
| 48 if ((instance_type & kStringEncodingMask) == kOneByteStringTag) { | 48 if ((instance_type & kStringEncodingMask) == kOneByteStringTag) { |
| 49 return kVisitSeqAsciiString; | 49 return kVisitSeqOneByteString; |
| 50 } else { | 50 } else { |
| 51 return kVisitSeqTwoByteString; | 51 return kVisitSeqTwoByteString; |
| 52 } | 52 } |
| 53 | 53 |
| 54 case kConsStringTag: | 54 case kConsStringTag: |
| 55 if (IsShortcutCandidate(instance_type)) { | 55 if (IsShortcutCandidate(instance_type)) { |
| 56 return kVisitShortcutCandidate; | 56 return kVisitShortcutCandidate; |
| 57 } else { | 57 } else { |
| 58 return kVisitConsString; | 58 return kVisitConsString; |
| 59 } | 59 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 kVisitStructGeneric, | 170 kVisitStructGeneric, |
| 171 instance_size); | 171 instance_size); |
| 172 | 172 |
| 173 default: | 173 default: |
| 174 UNREACHABLE(); | 174 UNREACHABLE(); |
| 175 return kVisitorIdCount; | 175 return kVisitorIdCount; |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 } } // namespace v8::internal | 179 } } // namespace v8::internal |
| OLD | NEW |