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

Side by Side Diff: test/cctest/heap/test-heap.cc

Issue 2169463002: [debugger] use absolute source positions for break locations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comment Created 4 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
« no previous file with comments | « src/debug/debug.js ('k') | test/cctest/test-debug.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 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 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 function->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2)); 1532 function->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2));
1533 } 1533 }
1534 1534
1535 // Simulate incremental marking so that the function is enqueued as 1535 // Simulate incremental marking so that the function is enqueued as
1536 // code flushing candidate. 1536 // code flushing candidate.
1537 heap::SimulateIncrementalMarking(heap); 1537 heap::SimulateIncrementalMarking(heap);
1538 1538
1539 // Enable the debugger and add a breakpoint while incremental marking 1539 // Enable the debugger and add a breakpoint while incremental marking
1540 // is running so that incremental marking aborts and code flushing is 1540 // is running so that incremental marking aborts and code flushing is
1541 // disabled. 1541 // disabled.
1542 int position = 0; 1542 int position = function->shared()->start_position();
1543 Handle<Object> breakpoint_object(Smi::FromInt(0), isolate); 1543 Handle<Object> breakpoint_object(Smi::FromInt(0), isolate);
1544 EnableDebugger(CcTest::isolate()); 1544 EnableDebugger(CcTest::isolate());
1545 isolate->debug()->SetBreakPoint(function, breakpoint_object, &position); 1545 isolate->debug()->SetBreakPoint(function, breakpoint_object, &position);
1546 isolate->debug()->ClearAllBreakPoints(); 1546 isolate->debug()->ClearAllBreakPoints();
1547 DisableDebugger(CcTest::isolate()); 1547 DisableDebugger(CcTest::isolate());
1548 1548
1549 // Force optimization now that code flushing is disabled. 1549 // Force optimization now that code flushing is disabled.
1550 { v8::HandleScope scope(CcTest::isolate()); 1550 { v8::HandleScope scope(CcTest::isolate());
1551 CompileRun("%OptimizeFunctionOnNextCall(foo); foo();"); 1551 CompileRun("%OptimizeFunctionOnNextCall(foo); foo();");
1552 } 1552 }
(...skipping 5332 matching lines...) Expand 10 before | Expand all | Expand 10 after
6885 chunk, chunk->area_end() - kPointerSize, chunk->area_end()); 6885 chunk, chunk->area_end() - kPointerSize, chunk->area_end());
6886 slots[chunk->area_end() - kPointerSize] = false; 6886 slots[chunk->area_end() - kPointerSize] = false;
6887 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { 6887 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) {
6888 CHECK(slots[addr]); 6888 CHECK(slots[addr]);
6889 return KEEP_SLOT; 6889 return KEEP_SLOT;
6890 }); 6890 });
6891 } 6891 }
6892 6892
6893 } // namespace internal 6893 } // namespace internal
6894 } // namespace v8 6894 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.js ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698