| 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 "src/profiler/heap-snapshot-generator.h" | 5 #include "src/profiler/heap-snapshot-generator.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/conversions.h" | 8 #include "src/conversions.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/objects-body-descriptors.h" | 10 #include "src/objects-body-descriptors.h" |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 ExtractPropertyReferences(js_obj, entry); | 1082 ExtractPropertyReferences(js_obj, entry); |
| 1083 ExtractElementReferences(js_obj, entry); | 1083 ExtractElementReferences(js_obj, entry); |
| 1084 ExtractInternalReferences(js_obj, entry); | 1084 ExtractInternalReferences(js_obj, entry); |
| 1085 PrototypeIterator iter(heap_->isolate(), js_obj); | 1085 PrototypeIterator iter(heap_->isolate(), js_obj); |
| 1086 SetPropertyReference(obj, entry, heap_->proto_string(), iter.GetCurrent()); | 1086 SetPropertyReference(obj, entry, heap_->proto_string(), iter.GetCurrent()); |
| 1087 if (obj->IsJSBoundFunction()) { | 1087 if (obj->IsJSBoundFunction()) { |
| 1088 JSBoundFunction* js_fun = JSBoundFunction::cast(obj); | 1088 JSBoundFunction* js_fun = JSBoundFunction::cast(obj); |
| 1089 TagObject(js_fun->bound_arguments(), "(bound arguments)"); | 1089 TagObject(js_fun->bound_arguments(), "(bound arguments)"); |
| 1090 SetInternalReference(js_fun, entry, "bindings", js_fun->bound_arguments(), | 1090 SetInternalReference(js_fun, entry, "bindings", js_fun->bound_arguments(), |
| 1091 JSBoundFunction::kBoundArgumentsOffset); | 1091 JSBoundFunction::kBoundArgumentsOffset); |
| 1092 SetNativeBindReference(js_obj, entry, "bound_this", js_fun->bound_this()); | 1092 SetInternalReference(js_obj, entry, "bound_this", js_fun->bound_this(), |
| 1093 SetNativeBindReference(js_obj, entry, "bound_function", | 1093 JSBoundFunction::kBoundThisOffset); |
| 1094 js_fun->bound_target_function()); | 1094 SetInternalReference(js_obj, entry, "bound_function", |
| 1095 js_fun->bound_target_function(), |
| 1096 JSBoundFunction::kBoundTargetFunctionOffset); |
| 1095 FixedArray* bindings = js_fun->bound_arguments(); | 1097 FixedArray* bindings = js_fun->bound_arguments(); |
| 1096 for (int i = 0; i < bindings->length(); i++) { | 1098 for (int i = 0; i < bindings->length(); i++) { |
| 1097 const char* reference_name = names_->GetFormatted("bound_argument_%d", i); | 1099 const char* reference_name = names_->GetFormatted("bound_argument_%d", i); |
| 1098 SetNativeBindReference(js_obj, entry, reference_name, bindings->get(i)); | 1100 SetNativeBindReference(js_obj, entry, reference_name, bindings->get(i)); |
| 1099 } | 1101 } |
| 1100 } else if (obj->IsJSFunction()) { | 1102 } else if (obj->IsJSFunction()) { |
| 1101 JSFunction* js_fun = JSFunction::cast(js_obj); | 1103 JSFunction* js_fun = JSFunction::cast(js_obj); |
| 1102 Object* proto_or_map = js_fun->prototype_or_initial_map(); | 1104 Object* proto_or_map = js_fun->prototype_or_initial_map(); |
| 1103 if (!proto_or_map->IsTheHole(heap_->isolate())) { | 1105 if (!proto_or_map->IsTheHole(heap_->isolate())) { |
| 1104 if (!proto_or_map->IsMap()) { | 1106 if (!proto_or_map->IsMap()) { |
| (...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3108 for (int i = 1; i < sorted_strings.length(); ++i) { | 3110 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 3109 writer_->AddCharacter(','); | 3111 writer_->AddCharacter(','); |
| 3110 SerializeString(sorted_strings[i]); | 3112 SerializeString(sorted_strings[i]); |
| 3111 if (writer_->aborted()) return; | 3113 if (writer_->aborted()) return; |
| 3112 } | 3114 } |
| 3113 } | 3115 } |
| 3114 | 3116 |
| 3115 | 3117 |
| 3116 } // namespace internal | 3118 } // namespace internal |
| 3117 } // namespace v8 | 3119 } // namespace v8 |
| OLD | NEW |