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

Side by Side Diff: src/mark-compact.cc

Issue 16955008: Enable weak embedded maps in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
OLDNEW
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 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 string_table->IteratePrefix(&marker); 2048 string_table->IteratePrefix(&marker);
2049 ProcessMarkingDeque(); 2049 ProcessMarkingDeque();
2050 } 2050 }
2051 2051
2052 2052
2053 void MarkCompactCollector::MarkRoots(RootMarkingVisitor* visitor) { 2053 void MarkCompactCollector::MarkRoots(RootMarkingVisitor* visitor) {
2054 // Mark the heap roots including global variables, stack variables, 2054 // Mark the heap roots including global variables, stack variables,
2055 // etc., and all objects reachable from them. 2055 // etc., and all objects reachable from them.
2056 heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG); 2056 heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG);
2057 2057
2058 // If the call-site of the top optimized code was not prepared for
2059 // deoptimization, then treat the maps in the code as strong pointers,
2060 // otherwise a map can die and deoptimize the code.
Michael Starzinger 2013/07/02 14:20:54 Can we move this into MarkCompactCollector::MarkLi
ulan 2013/07/02 14:45:41 Done.
2061 StackFrame* frame = isolate()->TopOptimizedFrame();
2062 if (frame) {
2063 Code* code = frame->LookupCode();
2064 if (!code->CanDeoptAt(frame->pc())) {
2065 code->CodeIterateBody(visitor);
2066 }
2067 }
2068
2058 // Handle the string table specially. 2069 // Handle the string table specially.
2059 MarkStringTable(); 2070 MarkStringTable();
2060 2071
2061 // There may be overflowed objects in the heap. Visit them now. 2072 // There may be overflowed objects in the heap. Visit them now.
2062 while (marking_deque_.overflowed()) { 2073 while (marking_deque_.overflowed()) {
2063 RefillMarkingDeque(); 2074 RefillMarkingDeque();
2064 EmptyMarkingDeque(); 2075 EmptyMarkingDeque();
2065 } 2076 }
2066 } 2077 }
2067 2078
(...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after
4317 while (buffer != NULL) { 4328 while (buffer != NULL) {
4318 SlotsBuffer* next_buffer = buffer->next(); 4329 SlotsBuffer* next_buffer = buffer->next();
4319 DeallocateBuffer(buffer); 4330 DeallocateBuffer(buffer);
4320 buffer = next_buffer; 4331 buffer = next_buffer;
4321 } 4332 }
4322 *buffer_address = NULL; 4333 *buffer_address = NULL;
4323 } 4334 }
4324 4335
4325 4336
4326 } } // namespace v8::internal 4337 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698