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 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2030 JSFunction::kSharedFunctionInfoOffset); | 2030 JSFunction::kSharedFunctionInfoOffset); |
2031 TagObject(js_fun->unchecked_context(), "(context)"); | 2031 TagObject(js_fun->unchecked_context(), "(context)"); |
2032 SetInternalReference(js_fun, entry, | 2032 SetInternalReference(js_fun, entry, |
2033 "context", js_fun->unchecked_context(), | 2033 "context", js_fun->unchecked_context(), |
2034 JSFunction::kContextOffset); | 2034 JSFunction::kContextOffset); |
2035 for (int i = JSFunction::kNonWeakFieldsEndOffset; | 2035 for (int i = JSFunction::kNonWeakFieldsEndOffset; |
2036 i < JSFunction::kSize; | 2036 i < JSFunction::kSize; |
2037 i += kPointerSize) { | 2037 i += kPointerSize) { |
2038 SetWeakReference(js_fun, entry, i, *HeapObject::RawField(js_fun, i), i); | 2038 SetWeakReference(js_fun, entry, i, *HeapObject::RawField(js_fun, i), i); |
2039 } | 2039 } |
2040 } else if (obj->IsGlobalObject()) { | |
2041 GlobalObject* global_obj = GlobalObject::cast(obj); | |
2042 SetInternalReference(global_obj, entry, | |
2043 "builtins", global_obj->builtins(), | |
2044 GlobalObject::kBuiltinsOffset); | |
2045 SetInternalReference(global_obj, entry, | |
2046 "global_context", global_obj->global_context(), | |
2047 GlobalObject::kGlobalContextOffset); | |
2048 SetInternalReference(global_obj, entry, | |
yurys
2012/04/23 05:36:18
Is it possible to merge such objects into the glob
alexeif
2012/04/23 15:23:43
Could you please elaborate?
yurys
2012/04/24 08:38:50
I meant that it may be hard to explain to the user
| |
2049 "global_receiver", global_obj->global_receiver(), | |
2050 GlobalObject::kGlobalReceiverOffset); | |
2040 } | 2051 } |
2041 TagObject(js_obj->properties(), "(object properties)"); | 2052 TagObject(js_obj->properties(), "(object properties)"); |
2042 SetInternalReference(obj, entry, | 2053 SetInternalReference(obj, entry, |
2043 "properties", js_obj->properties(), | 2054 "properties", js_obj->properties(), |
2044 JSObject::kPropertiesOffset); | 2055 JSObject::kPropertiesOffset); |
2045 TagObject(js_obj->elements(), "(object elements)"); | 2056 TagObject(js_obj->elements(), "(object elements)"); |
2046 SetInternalReference(obj, entry, | 2057 SetInternalReference(obj, entry, |
2047 "elements", js_obj->elements(), | 2058 "elements", js_obj->elements(), |
2048 JSObject::kElementsOffset); | 2059 JSObject::kElementsOffset); |
2049 } else if (obj->IsString()) { | 2060 } else if (obj->IsString()) { |
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3954 | 3965 |
3955 | 3966 |
3956 void HeapSnapshotJSONSerializer::SortHashMap( | 3967 void HeapSnapshotJSONSerializer::SortHashMap( |
3957 HashMap* map, List<HashMap::Entry*>* sorted_entries) { | 3968 HashMap* map, List<HashMap::Entry*>* sorted_entries) { |
3958 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) | 3969 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) |
3959 sorted_entries->Add(p); | 3970 sorted_entries->Add(p); |
3960 sorted_entries->Sort(SortUsingEntryValue); | 3971 sorted_entries->Sort(SortUsingEntryValue); |
3961 } | 3972 } |
3962 | 3973 |
3963 } } // namespace v8::internal | 3974 } } // namespace v8::internal |
OLD | NEW |