| 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 17 matching lines...) Expand all Loading... |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 namespace v8 { | 30 namespace v8 { |
| 31 namespace internal { | 31 namespace internal { |
| 32 | 32 |
| 33 | 33 |
| 34 void LookupResult::Iterate(ObjectVisitor* visitor) { | 34 void LookupResult::Iterate(ObjectVisitor* visitor) { |
| 35 LookupResult* current = this; // Could be NULL. | 35 LookupResult* current = this; // Could be NULL. |
| 36 while (current != NULL) { | 36 while (current != NULL) { |
| 37 visitor->VisitPointer(BitCast<Object**>(¤t->holder_)); | 37 visitor->VisitPointer(BitCast<Object**>(¤t->holder_)); |
| 38 visitor->VisitPointer(BitCast<Object**>(¤t->transition_)); |
| 38 current = current->next_; | 39 current = current->next_; |
| 39 } | 40 } |
| 40 } | 41 } |
| 41 | 42 |
| 42 | 43 |
| 43 #ifdef OBJECT_PRINT | 44 #ifdef OBJECT_PRINT |
| 44 void LookupResult::Print(FILE* out) { | 45 void LookupResult::Print(FILE* out) { |
| 45 if (!IsFound()) { | 46 if (!IsFound()) { |
| 46 PrintF(out, "Not Found\n"); | 47 PrintF(out, "Not Found\n"); |
| 47 return; | 48 return; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 75 PrintF(out, " -type = lookup proxy\n"); | 76 PrintF(out, " -type = lookup proxy\n"); |
| 76 break; | 77 break; |
| 77 case INTERCEPTOR: | 78 case INTERCEPTOR: |
| 78 PrintF(out, " -type = lookup interceptor\n"); | 79 PrintF(out, " -type = lookup interceptor\n"); |
| 79 break; | 80 break; |
| 80 case TRANSITION: | 81 case TRANSITION: |
| 81 switch (GetTransitionDetails().type()) { | 82 switch (GetTransitionDetails().type()) { |
| 82 case FIELD: | 83 case FIELD: |
| 83 PrintF(out, " -type = map transition\n"); | 84 PrintF(out, " -type = map transition\n"); |
| 84 PrintF(out, " -map:\n"); | 85 PrintF(out, " -map:\n"); |
| 85 GetTransitionMap()->Print(out); | 86 GetTransitionTarget()->Print(out); |
| 86 PrintF(out, "\n"); | 87 PrintF(out, "\n"); |
| 87 return; | 88 return; |
| 88 case CONSTANT: | 89 case CONSTANT: |
| 89 PrintF(out, " -type = constant property transition\n"); | 90 PrintF(out, " -type = constant property transition\n"); |
| 90 PrintF(out, " -map:\n"); | 91 PrintF(out, " -map:\n"); |
| 91 GetTransitionMap()->Print(out); | 92 GetTransitionTarget()->Print(out); |
| 92 PrintF(out, "\n"); | 93 PrintF(out, "\n"); |
| 93 return; | 94 return; |
| 94 case CALLBACKS: | 95 case CALLBACKS: |
| 95 PrintF(out, " -type = callbacks transition\n"); | 96 PrintF(out, " -type = callbacks transition\n"); |
| 96 PrintF(out, " -callback object:\n"); | 97 PrintF(out, " -callback object:\n"); |
| 97 GetCallbackObject()->Print(out); | 98 GetCallbackObject()->Print(out); |
| 98 return; | 99 return; |
| 99 default: | 100 default: |
| 100 UNREACHABLE(); | 101 UNREACHABLE(); |
| 101 return; | 102 return; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 112 GetKey()->ShortPrint(out); | 113 GetKey()->ShortPrint(out); |
| 113 PrintF(out, " @ "); | 114 PrintF(out, " @ "); |
| 114 GetValue()->ShortPrint(out); | 115 GetValue()->ShortPrint(out); |
| 115 } | 116 } |
| 116 | 117 |
| 117 | 118 |
| 118 #endif | 119 #endif |
| 119 | 120 |
| 120 | 121 |
| 121 } } // namespace v8::internal | 122 } } // namespace v8::internal |
| OLD | NEW |