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

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

Issue 390323002: Remove JSReceiver::GetPrototype and replace it with PrototypeIterator calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.cc ('k') | src/hydrogen.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/heap-snapshot-generator-inl.h" 7 #include "src/heap-snapshot-generator-inl.h"
8 8
9 #include "src/allocation-tracker.h" 9 #include "src/allocation-tracker.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 } 1157 }
1158 1158
1159 1159
1160 void V8HeapExplorer::ExtractJSObjectReferences( 1160 void V8HeapExplorer::ExtractJSObjectReferences(
1161 int entry, JSObject* js_obj) { 1161 int entry, JSObject* js_obj) {
1162 HeapObject* obj = js_obj; 1162 HeapObject* obj = js_obj;
1163 ExtractClosureReferences(js_obj, entry); 1163 ExtractClosureReferences(js_obj, entry);
1164 ExtractPropertyReferences(js_obj, entry); 1164 ExtractPropertyReferences(js_obj, entry);
1165 ExtractElementReferences(js_obj, entry); 1165 ExtractElementReferences(js_obj, entry);
1166 ExtractInternalReferences(js_obj, entry); 1166 ExtractInternalReferences(js_obj, entry);
1167 SetPropertyReference( 1167 PrototypeIterator iter(heap_->isolate(), js_obj);
1168 obj, entry, heap_->proto_string(), js_obj->GetPrototype()); 1168 SetPropertyReference(obj, entry, heap_->proto_string(), iter.GetCurrent());
1169 if (obj->IsJSFunction()) { 1169 if (obj->IsJSFunction()) {
1170 JSFunction* js_fun = JSFunction::cast(js_obj); 1170 JSFunction* js_fun = JSFunction::cast(js_obj);
1171 Object* proto_or_map = js_fun->prototype_or_initial_map(); 1171 Object* proto_or_map = js_fun->prototype_or_initial_map();
1172 if (!proto_or_map->IsTheHole()) { 1172 if (!proto_or_map->IsTheHole()) {
1173 if (!proto_or_map->IsMap()) { 1173 if (!proto_or_map->IsMap()) {
1174 SetPropertyReference( 1174 SetPropertyReference(
1175 obj, entry, 1175 obj, entry,
1176 heap_->prototype_string(), proto_or_map, 1176 heap_->prototype_string(), proto_or_map,
1177 NULL, 1177 NULL,
1178 JSFunction::kPrototypeOrInitialMapOffset); 1178 JSFunction::kPrototypeOrInitialMapOffset);
(...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after
3184 writer_->AddString("\"<dummy>\""); 3184 writer_->AddString("\"<dummy>\"");
3185 for (int i = 1; i < sorted_strings.length(); ++i) { 3185 for (int i = 1; i < sorted_strings.length(); ++i) {
3186 writer_->AddCharacter(','); 3186 writer_->AddCharacter(',');
3187 SerializeString(sorted_strings[i]); 3187 SerializeString(sorted_strings[i]);
3188 if (writer_->aborted()) return; 3188 if (writer_->aborted()) return;
3189 } 3189 }
3190 } 3190 }
3191 3191
3192 3192
3193 } } // namespace v8::internal 3193 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698