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/debug.cc

Issue 10532066: Reimplement dynamic frame alignment for frames that are compiled via OSR or have more than 2 double… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: don't align frames of recursive functions Created 8 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
« no previous file with comments | « no previous file | src/deoptimizer.h » ('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 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 !call_function_stub.is_null() || is_at_restarted_function) 1444 !call_function_stub.is_null() || is_at_restarted_function)
1445 || step_action == StepNext || step_action == StepMin) { 1445 || step_action == StepNext || step_action == StepMin) {
1446 // Step next or step min. 1446 // Step next or step min.
1447 1447
1448 // Fill the current function with one-shot break points. 1448 // Fill the current function with one-shot break points.
1449 FloodWithOneShot(shared); 1449 FloodWithOneShot(shared);
1450 1450
1451 // Remember source position and frame to handle step next. 1451 // Remember source position and frame to handle step next.
1452 thread_local_.last_statement_position_ = 1452 thread_local_.last_statement_position_ =
1453 debug_info->code()->SourceStatementPosition(frame->pc()); 1453 debug_info->code()->SourceStatementPosition(frame->pc());
1454 thread_local_.last_fp_ = frame->fp(); 1454 thread_local_.last_fp_ = frame->UnpaddedFP();
1455 } else { 1455 } else {
1456 // If there's restarter frame on top of the stack, just get the pointer 1456 // If there's restarter frame on top of the stack, just get the pointer
1457 // to function which is going to be restarted. 1457 // to function which is going to be restarted.
1458 if (is_at_restarted_function) { 1458 if (is_at_restarted_function) {
1459 Handle<JSFunction> restarted_function( 1459 Handle<JSFunction> restarted_function(
1460 JSFunction::cast(*thread_local_.restarter_frame_function_pointer_)); 1460 JSFunction::cast(*thread_local_.restarter_frame_function_pointer_));
1461 Handle<SharedFunctionInfo> restarted_shared( 1461 Handle<SharedFunctionInfo> restarted_shared(
1462 restarted_function->shared()); 1462 restarted_function->shared());
1463 FloodWithOneShot(restarted_shared); 1463 FloodWithOneShot(restarted_shared);
1464 } else if (!call_function_stub.is_null()) { 1464 } else if (!call_function_stub.is_null()) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 // getters/setters. 1513 // getters/setters.
1514 FloodWithOneShot(shared); 1514 FloodWithOneShot(shared);
1515 1515
1516 if (is_load_or_store) { 1516 if (is_load_or_store) {
1517 // Remember source position and frame to handle step in getter/setter. If 1517 // Remember source position and frame to handle step in getter/setter. If
1518 // there is a custom getter/setter it will be handled in 1518 // there is a custom getter/setter it will be handled in
1519 // Object::Get/SetPropertyWithCallback, otherwise the step action will be 1519 // Object::Get/SetPropertyWithCallback, otherwise the step action will be
1520 // propagated on the next Debug::Break. 1520 // propagated on the next Debug::Break.
1521 thread_local_.last_statement_position_ = 1521 thread_local_.last_statement_position_ =
1522 debug_info->code()->SourceStatementPosition(frame->pc()); 1522 debug_info->code()->SourceStatementPosition(frame->pc());
1523 thread_local_.last_fp_ = frame->fp(); 1523 thread_local_.last_fp_ = frame->UnpaddedFP();
1524 } 1524 }
1525 1525
1526 // Step in or Step in min 1526 // Step in or Step in min
1527 it.PrepareStepIn(); 1527 it.PrepareStepIn();
1528 ActivateStepIn(frame); 1528 ActivateStepIn(frame);
1529 } 1529 }
1530 } 1530 }
1531 1531
1532 1532
1533 // Check whether the current debug break should be reported to the debugger. It 1533 // Check whether the current debug break should be reported to the debugger. It
(...skipping 14 matching lines...) Expand all
1548 // If the step last action was step next or step in make sure that a new 1548 // If the step last action was step next or step in make sure that a new
1549 // statement is hit. 1549 // statement is hit.
1550 if (thread_local_.last_step_action_ == StepNext || 1550 if (thread_local_.last_step_action_ == StepNext ||
1551 thread_local_.last_step_action_ == StepIn) { 1551 thread_local_.last_step_action_ == StepIn) {
1552 // Never continue if returning from function. 1552 // Never continue if returning from function.
1553 if (break_location_iterator->IsExit()) return false; 1553 if (break_location_iterator->IsExit()) return false;
1554 1554
1555 // Continue if we are still on the same frame and in the same statement. 1555 // Continue if we are still on the same frame and in the same statement.
1556 int current_statement_position = 1556 int current_statement_position =
1557 break_location_iterator->code()->SourceStatementPosition(frame->pc()); 1557 break_location_iterator->code()->SourceStatementPosition(frame->pc());
1558 return thread_local_.last_fp_ == frame->fp() && 1558 return thread_local_.last_fp_ == frame->UnpaddedFP() &&
1559 thread_local_.last_statement_position_ == current_statement_position; 1559 thread_local_.last_statement_position_ == current_statement_position;
1560 } 1560 }
1561 1561
1562 // No step next action - don't continue. 1562 // No step next action - don't continue.
1563 return false; 1563 return false;
1564 } 1564 }
1565 1565
1566 1566
1567 // Check whether the code object at the specified address is a debug break code 1567 // Check whether the code object at the specified address is a debug break code
1568 // object. 1568 // object.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 it.ClearOneShot(); 1749 it.ClearOneShot();
1750 it.Next(); 1750 it.Next();
1751 } 1751 }
1752 node = node->next(); 1752 node = node->next();
1753 } 1753 }
1754 } 1754 }
1755 1755
1756 1756
1757 void Debug::ActivateStepIn(StackFrame* frame) { 1757 void Debug::ActivateStepIn(StackFrame* frame) {
1758 ASSERT(!StepOutActive()); 1758 ASSERT(!StepOutActive());
1759 thread_local_.step_into_fp_ = frame->fp(); 1759 thread_local_.step_into_fp_ = frame->UnpaddedFP();
1760 } 1760 }
1761 1761
1762 1762
1763 void Debug::ClearStepIn() { 1763 void Debug::ClearStepIn() {
1764 thread_local_.step_into_fp_ = 0; 1764 thread_local_.step_into_fp_ = 0;
1765 } 1765 }
1766 1766
1767 1767
1768 void Debug::ActivateStepOut(StackFrame* frame) { 1768 void Debug::ActivateStepOut(StackFrame* frame) {
1769 ASSERT(!StepInActive()); 1769 ASSERT(!StepInActive());
1770 thread_local_.step_out_fp_ = frame->fp(); 1770 thread_local_.step_out_fp_ = frame->UnpaddedFP();
1771 } 1771 }
1772 1772
1773 1773
1774 void Debug::ClearStepOut() { 1774 void Debug::ClearStepOut() {
1775 thread_local_.step_out_fp_ = 0; 1775 thread_local_.step_out_fp_ = 0;
1776 } 1776 }
1777 1777
1778 1778
1779 void Debug::ClearStepNext() { 1779 void Debug::ClearStepNext() {
1780 thread_local_.last_step_action_ = StepNone; 1780 thread_local_.last_step_action_ = StepNone;
(...skipping 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 { 3621 {
3622 Locker locker; 3622 Locker locker;
3623 Isolate::Current()->debugger()->CallMessageDispatchHandler(); 3623 Isolate::Current()->debugger()->CallMessageDispatchHandler();
3624 } 3624 }
3625 } 3625 }
3626 } 3626 }
3627 3627
3628 #endif // ENABLE_DEBUGGER_SUPPORT 3628 #endif // ENABLE_DEBUGGER_SUPPORT
3629 3629
3630 } } // namespace v8::internal 3630 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698