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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 void LiveEdit::WrapSharedFunctionInfos(Handle<JSArray> array) { | 732 void LiveEdit::WrapSharedFunctionInfos(Handle<JSArray> array) { |
733 HandleScope scope; | 733 HandleScope scope; |
734 int len = Smi::cast(array->length())->value(); | 734 int len = Smi::cast(array->length())->value(); |
735 for (int i = 0; i < len; i++) { | 735 for (int i = 0; i < len; i++) { |
736 Handle<SharedFunctionInfo> info( | 736 Handle<SharedFunctionInfo> info( |
737 SharedFunctionInfo::cast(array->GetElement(i))); | 737 SharedFunctionInfo::cast(array->GetElement(i))); |
738 SharedInfoWrapper info_wrapper = SharedInfoWrapper::Create(); | 738 SharedInfoWrapper info_wrapper = SharedInfoWrapper::Create(); |
739 Handle<String> name_handle(String::cast(info->name())); | 739 Handle<String> name_handle(String::cast(info->name())); |
740 info_wrapper.SetProperties(name_handle, info->start_position(), | 740 info_wrapper.SetProperties(name_handle, info->start_position(), |
741 info->end_position(), info); | 741 info->end_position(), info); |
742 array->SetElement(i, *(info_wrapper.GetJSArray())); | 742 SetElement(array, i, info_wrapper.GetJSArray()); |
743 } | 743 } |
744 } | 744 } |
745 | 745 |
746 | 746 |
747 // Visitor that collects all references to a particular code object, | 747 // Visitor that collects all references to a particular code object, |
748 // including "CODE_TARGET" references in other code objects. | 748 // including "CODE_TARGET" references in other code objects. |
749 // It works in context of ZoneScope. | 749 // It works in context of ZoneScope. |
750 class ReferenceCollectorVisitor : public ObjectVisitor { | 750 class ReferenceCollectorVisitor : public ObjectVisitor { |
751 public: | 751 public: |
752 explicit ReferenceCollectorVisitor(Code* original) | 752 explicit ReferenceCollectorVisitor(Code* original) |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 break; | 1377 break; |
1378 } | 1378 } |
1379 } | 1379 } |
1380 Debug::FramesHaveBeenDropped(new_id, drop_mode, | 1380 Debug::FramesHaveBeenDropped(new_id, drop_mode, |
1381 restarter_frame_function_pointer); | 1381 restarter_frame_function_pointer); |
1382 | 1382 |
1383 // Replace "blocked on active" with "replaced on active" status. | 1383 // Replace "blocked on active" with "replaced on active" status. |
1384 for (int i = 0; i < array_len; i++) { | 1384 for (int i = 0; i < array_len; i++) { |
1385 if (result->GetElement(i) == | 1385 if (result->GetElement(i) == |
1386 Smi::FromInt(LiveEdit::FUNCTION_BLOCKED_ON_ACTIVE_STACK)) { | 1386 Smi::FromInt(LiveEdit::FUNCTION_BLOCKED_ON_ACTIVE_STACK)) { |
1387 result->SetElement(i, Smi::FromInt( | 1387 Handle<Object> replaced( |
1388 LiveEdit::FUNCTION_REPLACED_ON_ACTIVE_STACK)); | 1388 Smi::FromInt(LiveEdit::FUNCTION_REPLACED_ON_ACTIVE_STACK)); |
| 1389 SetElement(result, i, replaced); |
1389 } | 1390 } |
1390 } | 1391 } |
1391 return NULL; | 1392 return NULL; |
1392 } | 1393 } |
1393 | 1394 |
1394 | 1395 |
1395 class InactiveThreadActivationsChecker : public ThreadVisitor { | 1396 class InactiveThreadActivationsChecker : public ThreadVisitor { |
1396 public: | 1397 public: |
1397 InactiveThreadActivationsChecker(Handle<JSArray> shared_info_array, | 1398 InactiveThreadActivationsChecker(Handle<JSArray> shared_info_array, |
1398 Handle<JSArray> result) | 1399 Handle<JSArray> result) |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 | 1507 |
1507 bool LiveEditFunctionTracker::IsActive() { | 1508 bool LiveEditFunctionTracker::IsActive() { |
1508 return false; | 1509 return false; |
1509 } | 1510 } |
1510 | 1511 |
1511 #endif // ENABLE_DEBUGGER_SUPPORT | 1512 #endif // ENABLE_DEBUGGER_SUPPORT |
1512 | 1513 |
1513 | 1514 |
1514 | 1515 |
1515 } } // namespace v8::internal | 1516 } } // namespace v8::internal |
OLD | NEW |