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

Unified Diff: src/liveedit.cc

Issue 7945009: Merge experimental/gc branch to the bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lithium-allocator.cc ('k') | src/liveobjectlist.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.cc
===================================================================
--- src/liveedit.cc (revision 9327)
+++ src/liveedit.cc (working copy)
@@ -1000,6 +1000,7 @@
static void ReplaceCodeObject(Code* original, Code* substitution) {
ASSERT(!HEAP->InNewSpace(substitution));
+ HeapIterator iterator;
AssertNoAllocation no_allocations_please;
// A zone scope for ReferenceCollectorVisitor.
@@ -1016,7 +1017,6 @@
// Now iterate over all pointers of all objects, including code_target
// implicit pointers.
- HeapIterator iterator;
for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
obj->Iterate(&visitor);
}
@@ -1101,6 +1101,8 @@
Handle<SharedFunctionInfo> shared_info = shared_info_wrapper.GetInfo();
+ HEAP->EnsureHeapIsIterable();
+
if (IsJSFunctionCode(shared_info->code())) {
Handle<Code> code = compile_info_wrapper.GetFunctionCode();
ReplaceCodeObject(shared_info->code(), *code);
@@ -1271,7 +1273,8 @@
// Patch positions in code (changes relocation info section) and possibly
// returns new instance of code.
-static Handle<Code> PatchPositionsInCode(Handle<Code> code,
+static Handle<Code> PatchPositionsInCode(
+ Handle<Code> code,
Handle<JSArray> position_change_array) {
RelocInfoBuffer buffer_writer(code->relocation_size(),
@@ -1286,7 +1289,7 @@
int new_position = TranslatePosition(position,
position_change_array);
if (position != new_position) {
- RelocInfo info_copy(rinfo->pc(), rinfo->rmode(), new_position);
+ RelocInfo info_copy(rinfo->pc(), rinfo->rmode(), new_position, NULL);
buffer_writer.Write(&info_copy);
continue;
}
@@ -1333,6 +1336,8 @@
info->set_end_position(new_function_end);
info->set_function_token_position(new_function_token_pos);
+ HEAP->EnsureHeapIsIterable();
+
if (IsJSFunctionCode(info->code())) {
// Patch relocation info section of the code.
Handle<Code> patched_code = PatchPositionsInCode(Handle<Code>(info->code()),
« no previous file with comments | « src/lithium-allocator.cc ('k') | src/liveobjectlist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698