OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 return "Stack manipulations are not supported in this architecture."; | 1389 return "Stack manipulations are not supported in this architecture."; |
1390 } | 1390 } |
1391 | 1391 |
1392 StackFrame* pre_top_frame = frames[top_frame_index - 1]; | 1392 StackFrame* pre_top_frame = frames[top_frame_index - 1]; |
1393 StackFrame* top_frame = frames[top_frame_index]; | 1393 StackFrame* top_frame = frames[top_frame_index]; |
1394 StackFrame* bottom_js_frame = frames[bottom_js_frame_index]; | 1394 StackFrame* bottom_js_frame = frames[bottom_js_frame_index]; |
1395 | 1395 |
1396 ASSERT(bottom_js_frame->is_java_script()); | 1396 ASSERT(bottom_js_frame->is_java_script()); |
1397 | 1397 |
1398 // Check the nature of the top frame. | 1398 // Check the nature of the top frame. |
1399 Code* pre_top_frame_code = pre_top_frame->LookupCode(Isolate::Current()); | 1399 Isolate* isolate = Isolate::Current(); |
| 1400 Code* pre_top_frame_code = pre_top_frame->LookupCode(); |
1400 if (pre_top_frame_code->is_inline_cache_stub() && | 1401 if (pre_top_frame_code->is_inline_cache_stub() && |
1401 pre_top_frame_code->ic_state() == DEBUG_BREAK) { | 1402 pre_top_frame_code->ic_state() == DEBUG_BREAK) { |
1402 // OK, we can drop inline cache calls. | 1403 // OK, we can drop inline cache calls. |
1403 *mode = Debug::FRAME_DROPPED_IN_IC_CALL; | 1404 *mode = Debug::FRAME_DROPPED_IN_IC_CALL; |
1404 } else if (pre_top_frame_code == | 1405 } else if (pre_top_frame_code == |
1405 Isolate::Current()->debug()->debug_break_slot()) { | 1406 isolate->debug()->debug_break_slot()) { |
1406 // OK, we can drop debug break slot. | 1407 // OK, we can drop debug break slot. |
1407 *mode = Debug::FRAME_DROPPED_IN_DEBUG_SLOT_CALL; | 1408 *mode = Debug::FRAME_DROPPED_IN_DEBUG_SLOT_CALL; |
1408 } else if (pre_top_frame_code == | 1409 } else if (pre_top_frame_code == |
1409 Isolate::Current()->builtins()->builtin( | 1410 isolate->builtins()->builtin( |
1410 Builtins::kFrameDropper_LiveEdit)) { | 1411 Builtins::kFrameDropper_LiveEdit)) { |
1411 // OK, we can drop our own code. | 1412 // OK, we can drop our own code. |
1412 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; | 1413 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; |
1413 } else if (pre_top_frame_code->kind() == Code::STUB && | 1414 } else if (pre_top_frame_code->kind() == Code::STUB && |
1414 pre_top_frame_code->major_key()) { | 1415 pre_top_frame_code->major_key()) { |
1415 // Entry from our unit tests, it's fine, we support this case. | 1416 // Entry from our unit tests, it's fine, we support this case. |
1416 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; | 1417 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; |
1417 } else { | 1418 } else { |
1418 return "Unknown structure of stack above changing function"; | 1419 return "Unknown structure of stack above changing function"; |
1419 } | 1420 } |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1563 } | 1564 } |
1564 | 1565 |
1565 | 1566 |
1566 class InactiveThreadActivationsChecker : public ThreadVisitor { | 1567 class InactiveThreadActivationsChecker : public ThreadVisitor { |
1567 public: | 1568 public: |
1568 InactiveThreadActivationsChecker(Handle<JSArray> shared_info_array, | 1569 InactiveThreadActivationsChecker(Handle<JSArray> shared_info_array, |
1569 Handle<JSArray> result) | 1570 Handle<JSArray> result) |
1570 : shared_info_array_(shared_info_array), result_(result), | 1571 : shared_info_array_(shared_info_array), result_(result), |
1571 has_blocked_functions_(false) { | 1572 has_blocked_functions_(false) { |
1572 } | 1573 } |
1573 void VisitThread(ThreadLocalTop* top) { | 1574 void VisitThread(Isolate* isolate, ThreadLocalTop* top) { |
1574 for (StackFrameIterator it(top); !it.done(); it.Advance()) { | 1575 for (StackFrameIterator it(isolate, top); !it.done(); it.Advance()) { |
1575 has_blocked_functions_ |= CheckActivation( | 1576 has_blocked_functions_ |= CheckActivation( |
1576 shared_info_array_, result_, it.frame(), | 1577 shared_info_array_, result_, it.frame(), |
1577 LiveEdit::FUNCTION_BLOCKED_ON_OTHER_STACK); | 1578 LiveEdit::FUNCTION_BLOCKED_ON_OTHER_STACK); |
1578 } | 1579 } |
1579 } | 1580 } |
1580 bool HasBlockedFunctions() { | 1581 bool HasBlockedFunctions() { |
1581 return has_blocked_functions_; | 1582 return has_blocked_functions_; |
1582 } | 1583 } |
1583 | 1584 |
1584 private: | 1585 private: |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 | 1684 |
1684 bool LiveEditFunctionTracker::IsActive() { | 1685 bool LiveEditFunctionTracker::IsActive() { |
1685 return false; | 1686 return false; |
1686 } | 1687 } |
1687 | 1688 |
1688 #endif // ENABLE_DEBUGGER_SUPPORT | 1689 #endif // ENABLE_DEBUGGER_SUPPORT |
1689 | 1690 |
1690 | 1691 |
1691 | 1692 |
1692 } } // namespace v8::internal | 1693 } } // namespace v8::internal |
OLD | NEW |