1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "src/property.h"
7 #include "src/handles-inl.h"
12 void LookupResult::Iterate(ObjectVisitor* visitor) {
13 LookupResult* current = this; // Could be NULL.
14 while (current != NULL) {
15 visitor->VisitPointer(BitCast<Object**>(¤t->holder_));
16 visitor->VisitPointer(BitCast<Object**>(¤t->transition_));
17 current = current->next_;
23 void LookupResult::Print(FILE* out) {
25 PrintF(out, "Not Found\n");
29 PrintF(out, "LookupResult:\n");
30 PrintF(out, " -cacheable = %s\n", IsCacheable() ? "true" : "false");
31 PrintF(out, " -attributes = %x\n", GetAttributes());
33 PrintF(out, " -transition target:\n");
34 GetTransitionTarget()->Print(out);
39 PrintF(out, " -type = normal\n");
40 PrintF(out, " -entry = %d", GetDictionaryEntry());
43 PrintF(out, " -type = constant\n");
44 PrintF(out, " -value:\n");
45 GetConstant()->Print(out);
49 PrintF(out, " -type = field\n");
50 PrintF(out, " -index = %d\n",
51 GetFieldIndex().property_index());
52 PrintF(out, " -field type:\n");
53 GetFieldType()->TypePrint(out);
56 PrintF(out, " -type = call backs\n");
57 PrintF(out, " -callback object:\n");
58 GetCallbackObject()->Print(out);
61 PrintF(out, " -type = lookup proxy\n");
64 PrintF(out, " -type = lookup interceptor\n");
73 void Descriptor::Print(FILE* out) {
74 PrintF(out, "Descriptor ");
75 GetKey()->ShortPrint(out);
77 GetValue()->ShortPrint(out);
81 } } // namespace v8::internal