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

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

Issue 214683002: NativeContext::map_cache reference should be strong in heap snapshots (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | 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 // 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 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 VariableMode mode; 1271 VariableMode mode;
1272 int idx = scope_info->FunctionContextSlotIndex(name, &mode); 1272 int idx = scope_info->FunctionContextSlotIndex(name, &mode);
1273 if (idx >= 0) { 1273 if (idx >= 0) {
1274 SetContextReference(context, entry, name, context->get(idx), 1274 SetContextReference(context, entry, name, context->get(idx),
1275 Context::OffsetOfElementAt(idx)); 1275 Context::OffsetOfElementAt(idx));
1276 } 1276 }
1277 } 1277 }
1278 } 1278 }
1279 1279
1280 #define EXTRACT_CONTEXT_FIELD(index, type, name) \ 1280 #define EXTRACT_CONTEXT_FIELD(index, type, name) \
1281 if (Context::index < Context::FIRST_WEAK_SLOT) { \ 1281 if (Context::index < Context::FIRST_WEAK_SLOT || \
1282 Context::index == Context::MAP_CACHE_INDEX) { \
1282 SetInternalReference(context, entry, #name, context->get(Context::index), \ 1283 SetInternalReference(context, entry, #name, context->get(Context::index), \
1283 FixedArray::OffsetOfElementAt(Context::index)); \ 1284 FixedArray::OffsetOfElementAt(Context::index)); \
1284 } else { \ 1285 } else { \
1285 SetWeakReference(context, entry, #name, context->get(Context::index), \ 1286 SetWeakReference(context, entry, #name, context->get(Context::index), \
1286 FixedArray::OffsetOfElementAt(Context::index)); \ 1287 FixedArray::OffsetOfElementAt(Context::index)); \
1287 } 1288 }
1288 EXTRACT_CONTEXT_FIELD(CLOSURE_INDEX, JSFunction, closure); 1289 EXTRACT_CONTEXT_FIELD(CLOSURE_INDEX, JSFunction, closure);
1289 EXTRACT_CONTEXT_FIELD(PREVIOUS_INDEX, Context, previous); 1290 EXTRACT_CONTEXT_FIELD(PREVIOUS_INDEX, Context, previous);
1290 EXTRACT_CONTEXT_FIELD(EXTENSION_INDEX, Object, extension); 1291 EXTRACT_CONTEXT_FIELD(EXTENSION_INDEX, Object, extension);
1291 EXTRACT_CONTEXT_FIELD(GLOBAL_OBJECT_INDEX, GlobalObject, global); 1292 EXTRACT_CONTEXT_FIELD(GLOBAL_OBJECT_INDEX, GlobalObject, global);
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after
3075 writer_->AddString("\"<dummy>\""); 3076 writer_->AddString("\"<dummy>\"");
3076 for (int i = 1; i < sorted_strings.length(); ++i) { 3077 for (int i = 1; i < sorted_strings.length(); ++i) {
3077 writer_->AddCharacter(','); 3078 writer_->AddCharacter(',');
3078 SerializeString(sorted_strings[i]); 3079 SerializeString(sorted_strings[i]);
3079 if (writer_->aborted()) return; 3080 if (writer_->aborted()) return;
3080 } 3081 }
3081 } 3082 }
3082 3083
3083 3084
3084 } } // namespace v8::internal 3085 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698