OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <sstream> | 5 #include <sstream> |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/allocation-site-scopes.h" | 10 #include "src/allocation-site-scopes.h" |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 } | 976 } |
977 | 977 |
978 | 978 |
979 void Object::ShortPrint(StringStream* accumulator) { | 979 void Object::ShortPrint(StringStream* accumulator) { |
980 std::ostringstream os; | 980 std::ostringstream os; |
981 os << Brief(this); | 981 os << Brief(this); |
982 accumulator->Add(os.str().c_str()); | 982 accumulator->Add(os.str().c_str()); |
983 } | 983 } |
984 | 984 |
985 | 985 |
| 986 void Object::ShortPrint(std::ostream& os) { os << Brief(this); } |
| 987 |
| 988 |
986 std::ostream& operator<<(std::ostream& os, const Brief& v) { | 989 std::ostream& operator<<(std::ostream& os, const Brief& v) { |
987 if (v.value->IsSmi()) { | 990 if (v.value->IsSmi()) { |
988 Smi::cast(v.value)->SmiPrint(os); | 991 Smi::cast(v.value)->SmiPrint(os); |
989 } else { | 992 } else { |
990 // TODO(svenpanne) Const-correct HeapObjectShortPrint! | 993 // TODO(svenpanne) Const-correct HeapObjectShortPrint! |
991 HeapObject* obj = const_cast<HeapObject*>(HeapObject::cast(v.value)); | 994 HeapObject* obj = const_cast<HeapObject*>(HeapObject::cast(v.value)); |
992 obj->HeapObjectShortPrint(os); | 995 obj->HeapObjectShortPrint(os); |
993 } | 996 } |
994 return os; | 997 return os; |
995 } | 998 } |
(...skipping 15895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16891 Handle<DependentCode> codes = | 16894 Handle<DependentCode> codes = |
16892 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), | 16895 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), |
16893 DependentCode::kPropertyCellChangedGroup, | 16896 DependentCode::kPropertyCellChangedGroup, |
16894 info->object_wrapper()); | 16897 info->object_wrapper()); |
16895 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 16898 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
16896 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 16899 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
16897 cell, info->zone()); | 16900 cell, info->zone()); |
16898 } | 16901 } |
16899 | 16902 |
16900 } } // namespace v8::internal | 16903 } } // namespace v8::internal |
OLD | NEW |