Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/frames.h" | 5 #include "src/frames.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 859 | 859 |
| 860 void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) const { | 860 void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) const { |
| 861 DCHECK(functions->length() == 0); | 861 DCHECK(functions->length() == 0); |
| 862 functions->Add(function()); | 862 functions->Add(function()); |
| 863 } | 863 } |
| 864 | 864 |
| 865 void JavaScriptFrame::Summarize(List<FrameSummary>* functions, | 865 void JavaScriptFrame::Summarize(List<FrameSummary>* functions, |
| 866 FrameSummary::Mode mode) const { | 866 FrameSummary::Mode mode) const { |
| 867 DCHECK(functions->length() == 0); | 867 DCHECK(functions->length() == 0); |
| 868 Code* code = LookupCode(); | 868 Code* code = LookupCode(); |
| 869 | |
|
Dan Ehrenberg
2016/05/04 22:52:36
Nit: No need for the stray newline
| |
| 869 int offset = static_cast<int>(pc() - code->instruction_start()); | 870 int offset = static_cast<int>(pc() - code->instruction_start()); |
| 870 AbstractCode* abstract_code = AbstractCode::cast(code); | 871 AbstractCode* abstract_code = AbstractCode::cast(code); |
| 871 FrameSummary summary(receiver(), function(), abstract_code, offset, | 872 FrameSummary summary(receiver(), function(), abstract_code, offset, |
| 872 IsConstructor(), mode); | 873 IsConstructor(), mode); |
| 873 functions->Add(summary); | 874 functions->Add(summary); |
| 874 } | 875 } |
| 875 | 876 |
| 876 JSFunction* JavaScriptFrame::function() const { | 877 JSFunction* JavaScriptFrame::function() const { |
| 877 return JSFunction::cast(function_slot_object()); | 878 return JSFunction::cast(function_slot_object()); |
| 878 } | 879 } |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1799 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1800 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
| 1800 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1801 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
| 1801 list.Add(frame, zone); | 1802 list.Add(frame, zone); |
| 1802 } | 1803 } |
| 1803 return list.ToVector(); | 1804 return list.ToVector(); |
| 1804 } | 1805 } |
| 1805 | 1806 |
| 1806 | 1807 |
| 1807 } // namespace internal | 1808 } // namespace internal |
| 1808 } // namespace v8 | 1809 } // namespace v8 |
| OLD | NEW |