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/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 | 747 |
748 Code* JavaScriptFrame::unchecked_code() const { | 748 Code* JavaScriptFrame::unchecked_code() const { |
749 return function()->code(); | 749 return function()->code(); |
750 } | 750 } |
751 | 751 |
752 | 752 |
753 int JavaScriptFrame::GetNumberOfIncomingArguments() const { | 753 int JavaScriptFrame::GetNumberOfIncomingArguments() const { |
754 DCHECK(can_access_heap_objects() && | 754 DCHECK(can_access_heap_objects() && |
755 isolate()->heap()->gc_state() == Heap::NOT_IN_GC); | 755 isolate()->heap()->gc_state() == Heap::NOT_IN_GC); |
756 | 756 |
757 return function()->shared()->internal_formal_parameter_count(); | 757 return function()->shared()->formal_parameter_count(); |
758 } | 758 } |
759 | 759 |
760 | 760 |
761 Address JavaScriptFrame::GetCallerStackPointer() const { | 761 Address JavaScriptFrame::GetCallerStackPointer() const { |
762 return fp() + StandardFrameConstants::kCallerSPOffset; | 762 return fp() + StandardFrameConstants::kCallerSPOffset; |
763 } | 763 } |
764 | 764 |
765 | 765 |
766 void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) { | 766 void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) { |
767 DCHECK(functions->length() == 0); | 767 DCHECK(functions->length() == 0); |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 accumulator->Add("}\n\n"); | 1303 accumulator->Add("}\n\n"); |
1304 } | 1304 } |
1305 | 1305 |
1306 | 1306 |
1307 void ArgumentsAdaptorFrame::Print(StringStream* accumulator, | 1307 void ArgumentsAdaptorFrame::Print(StringStream* accumulator, |
1308 PrintMode mode, | 1308 PrintMode mode, |
1309 int index) const { | 1309 int index) const { |
1310 int actual = ComputeParametersCount(); | 1310 int actual = ComputeParametersCount(); |
1311 int expected = -1; | 1311 int expected = -1; |
1312 JSFunction* function = this->function(); | 1312 JSFunction* function = this->function(); |
1313 expected = function->shared()->internal_formal_parameter_count(); | 1313 expected = function->shared()->formal_parameter_count(); |
1314 | 1314 |
1315 PrintIndex(accumulator, mode, index); | 1315 PrintIndex(accumulator, mode, index); |
1316 accumulator->Add("arguments adaptor frame: %d->%d", actual, expected); | 1316 accumulator->Add("arguments adaptor frame: %d->%d", actual, expected); |
1317 if (mode == OVERVIEW) { | 1317 if (mode == OVERVIEW) { |
1318 accumulator->Add("\n"); | 1318 accumulator->Add("\n"); |
1319 return; | 1319 return; |
1320 } | 1320 } |
1321 accumulator->Add(" {\n"); | 1321 accumulator->Add(" {\n"); |
1322 | 1322 |
1323 // Print actual arguments. | 1323 // Print actual arguments. |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1639 ZoneList<StackFrame*> list(10, zone); | 1639 ZoneList<StackFrame*> list(10, zone); |
1640 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { | 1640 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { |
1641 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); | 1641 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); |
1642 list.Add(frame, zone); | 1642 list.Add(frame, zone); |
1643 } | 1643 } |
1644 return list.ToVector(); | 1644 return list.ToVector(); |
1645 } | 1645 } |
1646 | 1646 |
1647 | 1647 |
1648 } } // namespace v8::internal | 1648 } } // namespace v8::internal |
OLD | NEW |