Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: src/profiler/heap-snapshot-generator.cc

Issue 1590273002: [runtime] No need to carry around the creation context for JSBoundFunctions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debug. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 ExtractPropertyReferences(js_obj, entry); 1102 ExtractPropertyReferences(js_obj, entry);
1103 ExtractElementReferences(js_obj, entry); 1103 ExtractElementReferences(js_obj, entry);
1104 ExtractInternalReferences(js_obj, entry); 1104 ExtractInternalReferences(js_obj, entry);
1105 PrototypeIterator iter(heap_->isolate(), js_obj); 1105 PrototypeIterator iter(heap_->isolate(), js_obj);
1106 SetPropertyReference(obj, entry, heap_->proto_string(), iter.GetCurrent()); 1106 SetPropertyReference(obj, entry, heap_->proto_string(), iter.GetCurrent());
1107 if (obj->IsJSBoundFunction()) { 1107 if (obj->IsJSBoundFunction()) {
1108 JSBoundFunction* js_fun = JSBoundFunction::cast(obj); 1108 JSBoundFunction* js_fun = JSBoundFunction::cast(obj);
1109 TagObject(js_fun->bound_arguments(), "(bound arguments)"); 1109 TagObject(js_fun->bound_arguments(), "(bound arguments)");
1110 SetInternalReference(js_fun, entry, "bindings", js_fun->bound_arguments(), 1110 SetInternalReference(js_fun, entry, "bindings", js_fun->bound_arguments(),
1111 JSBoundFunction::kBoundArgumentsOffset); 1111 JSBoundFunction::kBoundArgumentsOffset);
1112 TagObject(js_fun->creation_context(), "(creation context)");
1113 SetInternalReference(js_fun, entry, "creation_context",
1114 js_fun->creation_context(),
1115 JSBoundFunction::kCreationContextOffset);
1116 SetNativeBindReference(js_obj, entry, "bound_this", js_fun->bound_this()); 1112 SetNativeBindReference(js_obj, entry, "bound_this", js_fun->bound_this());
1117 SetNativeBindReference(js_obj, entry, "bound_function", 1113 SetNativeBindReference(js_obj, entry, "bound_function",
1118 js_fun->bound_target_function()); 1114 js_fun->bound_target_function());
1119 FixedArray* bindings = js_fun->bound_arguments(); 1115 FixedArray* bindings = js_fun->bound_arguments();
1120 for (int i = 0; i < bindings->length(); i++) { 1116 for (int i = 0; i < bindings->length(); i++) {
1121 const char* reference_name = names_->GetFormatted("bound_argument_%d", i); 1117 const char* reference_name = names_->GetFormatted("bound_argument_%d", i);
1122 SetNativeBindReference(js_obj, entry, reference_name, bindings->get(i)); 1118 SetNativeBindReference(js_obj, entry, reference_name, bindings->get(i));
1123 } 1119 }
1124 } else if (obj->IsJSFunction()) { 1120 } else if (obj->IsJSFunction()) {
1125 JSFunction* js_fun = JSFunction::cast(js_obj); 1121 JSFunction* js_fun = JSFunction::cast(js_obj);
(...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after
3161 for (int i = 1; i < sorted_strings.length(); ++i) { 3157 for (int i = 1; i < sorted_strings.length(); ++i) {
3162 writer_->AddCharacter(','); 3158 writer_->AddCharacter(',');
3163 SerializeString(sorted_strings[i]); 3159 SerializeString(sorted_strings[i]);
3164 if (writer_->aborted()) return; 3160 if (writer_->aborted()) return;
3165 } 3161 }
3166 } 3162 }
3167 3163
3168 3164
3169 } // namespace internal 3165 } // namespace internal
3170 } // namespace v8 3166 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698