dab61bc310
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/553843002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
// Copyright 2014 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "src/property.h"
|
|
|
|
#include "src/handles-inl.h"
|
|
#include "src/ostreams.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
void LookupResult::Iterate(ObjectVisitor* visitor) {
|
|
LookupResult* current = this; // Could be NULL.
|
|
while (current != NULL) {
|
|
visitor->VisitPointer(bit_cast<Object**>(¤t->holder_));
|
|
visitor->VisitPointer(bit_cast<Object**>(¤t->transition_));
|
|
current = current->next_;
|
|
}
|
|
}
|
|
|
|
|
|
OStream& operator<<(OStream& os, const LookupResult& r) {
|
|
if (!r.IsFound()) return os << "Not Found\n";
|
|
|
|
os << "LookupResult:\n";
|
|
if (r.IsTransition()) {
|
|
os << " -transition target:\n" << Brief(r.GetTransitionTarget()) << "\n";
|
|
}
|
|
return os;
|
|
}
|
|
|
|
|
|
OStream& operator<<(OStream& os, const Descriptor& d) {
|
|
return os << "Descriptor " << Brief(*d.GetKey()) << " @ "
|
|
<< Brief(*d.GetValue());
|
|
}
|
|
|
|
} } // namespace v8::internal
|