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/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 int frames_seen = 0; | 380 int frames_seen = 0; |
381 int sloppy_frames = 0; | 381 int sloppy_frames = 0; |
382 bool encountered_strict_function = false; | 382 bool encountered_strict_function = false; |
383 for (StackFrameIterator iter(this); !iter.done() && frames_seen < limit; | 383 for (StackFrameIterator iter(this); !iter.done() && frames_seen < limit; |
384 iter.Advance()) { | 384 iter.Advance()) { |
385 StackFrame* frame = iter.frame(); | 385 StackFrame* frame = iter.frame(); |
386 | 386 |
387 switch (frame->type()) { | 387 switch (frame->type()) { |
388 case StackFrame::JAVA_SCRIPT: | 388 case StackFrame::JAVA_SCRIPT: |
389 case StackFrame::OPTIMIZED: | 389 case StackFrame::OPTIMIZED: |
390 case StackFrame::INTERPRETED: { | 390 case StackFrame::INTERPRETED: |
| 391 case StackFrame::BUILTIN: { |
391 JavaScriptFrame* js_frame = JavaScriptFrame::cast(frame); | 392 JavaScriptFrame* js_frame = JavaScriptFrame::cast(frame); |
392 // Set initial size to the maximum inlining level + 1 for the outermost | 393 // Set initial size to the maximum inlining level + 1 for the outermost |
393 // function. | 394 // function. |
394 List<FrameSummary> frames(FLAG_max_inlining_levels + 1); | 395 List<FrameSummary> frames(FLAG_max_inlining_levels + 1); |
395 js_frame->Summarize(&frames); | 396 js_frame->Summarize(&frames); |
396 for (int i = frames.length() - 1; i >= 0; i--) { | 397 for (int i = frames.length() - 1; i >= 0; i--) { |
397 Handle<JSFunction> fun = frames[i].function(); | 398 Handle<JSFunction> fun = frames[i].function(); |
398 Handle<Object> recv = frames[i].receiver(); | 399 Handle<Object> recv = frames[i].receiver(); |
399 // Filter out internal frames that we do not want to show. | 400 // Filter out internal frames that we do not want to show. |
400 if (!IsVisibleInStackTrace(*fun, *caller, *recv, &seen_caller)) { | 401 if (!IsVisibleInStackTrace(*fun, *caller, *recv, &seen_caller)) { |
(...skipping 2586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2987 // Then check whether this scope intercepts. | 2988 // Then check whether this scope intercepts. |
2988 if ((flag & intercept_mask_)) { | 2989 if ((flag & intercept_mask_)) { |
2989 intercepted_flags_ |= flag; | 2990 intercepted_flags_ |= flag; |
2990 return true; | 2991 return true; |
2991 } | 2992 } |
2992 return false; | 2993 return false; |
2993 } | 2994 } |
2994 | 2995 |
2995 } // namespace internal | 2996 } // namespace internal |
2996 } // namespace v8 | 2997 } // namespace v8 |
OLD | NEW |