| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/double.h" | 8 #include "src/double.h" |
| 9 #include "src/factory.h" | 9 #include "src/factory.h" |
| 10 #include "src/hydrogen-infer-representation.h" | 10 #include "src/hydrogen-infer-representation.h" |
| (...skipping 3566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3577 << ElementsAccessor::ForKind(from_kind)->name() << "] -> " | 3577 << ElementsAccessor::ForKind(from_kind)->name() << "] -> " |
| 3578 << *transitioned_map().handle() << " [" | 3578 << *transitioned_map().handle() << " [" |
| 3579 << ElementsAccessor::ForKind(to_kind)->name() << "]"; | 3579 << ElementsAccessor::ForKind(to_kind)->name() << "]"; |
| 3580 if (IsSimpleMapChangeTransition(from_kind, to_kind)) os << " (simple)"; | 3580 if (IsSimpleMapChangeTransition(from_kind, to_kind)) os << " (simple)"; |
| 3581 return os; | 3581 return os; |
| 3582 } | 3582 } |
| 3583 | 3583 |
| 3584 | 3584 |
| 3585 OStream& HLoadGlobalCell::PrintDataTo(OStream& os) const { // NOLINT | 3585 OStream& HLoadGlobalCell::PrintDataTo(OStream& os) const { // NOLINT |
| 3586 os << "[" << *cell().handle() << "]"; | 3586 os << "[" << *cell().handle() << "]"; |
| 3587 if (!details_.IsDontDelete()) os << " (deleteable)"; | 3587 if (details_.IsConfigurable()) os << " (configurable)"; |
| 3588 if (details_.IsReadOnly()) os << " (read-only)"; | 3588 if (details_.IsReadOnly()) os << " (read-only)"; |
| 3589 return os; | 3589 return os; |
| 3590 } | 3590 } |
| 3591 | 3591 |
| 3592 | 3592 |
| 3593 bool HLoadGlobalCell::RequiresHoleCheck() const { | 3593 bool HLoadGlobalCell::RequiresHoleCheck() const { |
| 3594 if (details_.IsDontDelete() && !details_.IsReadOnly()) return false; | 3594 if (!details_.IsConfigurable()) return false; |
| 3595 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { | 3595 for (HUseIterator it(uses()); !it.Done(); it.Advance()) { |
| 3596 HValue* use = it.value(); | 3596 HValue* use = it.value(); |
| 3597 if (!use->IsChange()) return true; | 3597 if (!use->IsChange()) return true; |
| 3598 } | 3598 } |
| 3599 return false; | 3599 return false; |
| 3600 } | 3600 } |
| 3601 | 3601 |
| 3602 | 3602 |
| 3603 OStream& HLoadGlobalGeneric::PrintDataTo(OStream& os) const { // NOLINT | 3603 OStream& HLoadGlobalGeneric::PrintDataTo(OStream& os) const { // NOLINT |
| 3604 return os << name()->ToCString().get() << " "; | 3604 return os << name()->ToCString().get() << " "; |
| 3605 } | 3605 } |
| 3606 | 3606 |
| 3607 | 3607 |
| 3608 OStream& HInnerAllocatedObject::PrintDataTo(OStream& os) const { // NOLINT | 3608 OStream& HInnerAllocatedObject::PrintDataTo(OStream& os) const { // NOLINT |
| 3609 os << NameOf(base_object()) << " offset "; | 3609 os << NameOf(base_object()) << " offset "; |
| 3610 return offset()->PrintTo(os); | 3610 return offset()->PrintTo(os); |
| 3611 } | 3611 } |
| 3612 | 3612 |
| 3613 | 3613 |
| 3614 OStream& HStoreGlobalCell::PrintDataTo(OStream& os) const { // NOLINT | 3614 OStream& HStoreGlobalCell::PrintDataTo(OStream& os) const { // NOLINT |
| 3615 os << "[" << *cell().handle() << "] = " << NameOf(value()); | 3615 os << "[" << *cell().handle() << "] = " << NameOf(value()); |
| 3616 if (!details_.IsDontDelete()) os << " (deleteable)"; | 3616 if (details_.IsConfigurable()) os << " (configurable)"; |
| 3617 if (details_.IsReadOnly()) os << " (read-only)"; | 3617 if (details_.IsReadOnly()) os << " (read-only)"; |
| 3618 return os; | 3618 return os; |
| 3619 } | 3619 } |
| 3620 | 3620 |
| 3621 | 3621 |
| 3622 OStream& HLoadContextSlot::PrintDataTo(OStream& os) const { // NOLINT | 3622 OStream& HLoadContextSlot::PrintDataTo(OStream& os) const { // NOLINT |
| 3623 return os << NameOf(value()) << "[" << slot_index() << "]"; | 3623 return os << NameOf(value()) << "[" << slot_index() << "]"; |
| 3624 } | 3624 } |
| 3625 | 3625 |
| 3626 | 3626 |
| (...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4767 break; | 4767 break; |
| 4768 case HObjectAccess::kExternalMemory: | 4768 case HObjectAccess::kExternalMemory: |
| 4769 os << "[external-memory]"; | 4769 os << "[external-memory]"; |
| 4770 break; | 4770 break; |
| 4771 } | 4771 } |
| 4772 | 4772 |
| 4773 return os << "@" << access.offset(); | 4773 return os << "@" << access.offset(); |
| 4774 } | 4774 } |
| 4775 | 4775 |
| 4776 } } // namespace v8::internal | 4776 } } // namespace v8::internal |
| OLD | NEW |