| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/debug/debug-coverage.h" | 9 #include "src/debug/debug-coverage.h" |
| 10 #include "src/debug/debug-evaluate.h" | 10 #include "src/debug/debug-evaluate.h" |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 | 725 |
| 726 // Add locals name and value from the temporary copy from the function frame. | 726 // Add locals name and value from the temporary copy from the function frame. |
| 727 for (const auto& local : locals) details->set(details_index++, *local); | 727 for (const auto& local : locals) details->set(details_index++, *local); |
| 728 | 728 |
| 729 // Add the value being returned. | 729 // Add the value being returned. |
| 730 if (at_return) { | 730 if (at_return) { |
| 731 details->set(details_index++, *return_value); | 731 details->set(details_index++, *return_value); |
| 732 } | 732 } |
| 733 | 733 |
| 734 // Add the receiver (same as in function frame). | 734 // Add the receiver (same as in function frame). |
| 735 Handle<Object> receiver(it.frame()->receiver(), isolate); | 735 Handle<Object> receiver = frame_inspector.summary().receiver(); |
| 736 DCHECK(function->shared()->IsUserJavaScript()); | 736 DCHECK(function->shared()->IsUserJavaScript()); |
| 737 DCHECK_IMPLIES(is_sloppy(shared->language_mode()), receiver->IsJSReceiver()); | 737 // Optimized frames only restore the receiver as best-effort (see |
| 738 // OptimizedFrame::Summarize). |
| 739 DCHECK_IMPLIES(!is_optimized && is_sloppy(shared->language_mode()), |
| 740 receiver->IsJSReceiver()); |
| 738 details->set(kFrameDetailsReceiverIndex, *receiver); | 741 details->set(kFrameDetailsReceiverIndex, *receiver); |
| 739 | 742 |
| 740 DCHECK_EQ(details_size, details_index); | 743 DCHECK_EQ(details_size, details_index); |
| 741 return *isolate->factory()->NewJSArrayWithElements(details); | 744 return *isolate->factory()->NewJSArrayWithElements(details); |
| 742 } | 745 } |
| 743 | 746 |
| 744 | 747 |
| 745 RUNTIME_FUNCTION(Runtime_GetScopeCount) { | 748 RUNTIME_FUNCTION(Runtime_GetScopeCount) { |
| 746 HandleScope scope(isolate); | 749 HandleScope scope(isolate); |
| 747 DCHECK_EQ(2, args.length()); | 750 DCHECK_EQ(2, args.length()); |
| (...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1972 if (enable) { | 1975 if (enable) { |
| 1973 Coverage::EnablePrecise(isolate); | 1976 Coverage::EnablePrecise(isolate); |
| 1974 } else { | 1977 } else { |
| 1975 Coverage::DisablePrecise(isolate); | 1978 Coverage::DisablePrecise(isolate); |
| 1976 } | 1979 } |
| 1977 return isolate->heap()->undefined_value(); | 1980 return isolate->heap()->undefined_value(); |
| 1978 } | 1981 } |
| 1979 | 1982 |
| 1980 } // namespace internal | 1983 } // namespace internal |
| 1981 } // namespace v8 | 1984 } // namespace v8 |
| OLD | NEW |