| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 case StackFrame::INTERPRETED: | 389 case StackFrame::INTERPRETED: |
| 390 case StackFrame::BUILTIN: { | 390 case StackFrame::BUILTIN: { |
| 391 JavaScriptFrame* js_frame = JavaScriptFrame::cast(frame); | 391 JavaScriptFrame* js_frame = JavaScriptFrame::cast(frame); |
| 392 // Set initial size to the maximum inlining level + 1 for the outermost | 392 // Set initial size to the maximum inlining level + 1 for the outermost |
| 393 // function. | 393 // function. |
| 394 List<FrameSummary> frames(FLAG_max_inlining_levels + 1); | 394 List<FrameSummary> frames(FLAG_max_inlining_levels + 1); |
| 395 js_frame->Summarize(&frames); | 395 js_frame->Summarize(&frames); |
| 396 for (int i = frames.length() - 1; i >= 0; i--) { | 396 for (int i = frames.length() - 1; i >= 0; i--) { |
| 397 Handle<JSFunction> fun = frames[i].function(); | 397 Handle<JSFunction> fun = frames[i].function(); |
| 398 Handle<Object> recv = frames[i].receiver(); | 398 Handle<Object> recv = frames[i].receiver(); |
| 399 if (frame->type() == StackFrame::BUILTIN && fun->IsConstructor()) { |
| 400 // Help CallSite::IsConstructor to properly detect constructors |
| 401 // implemented in assembler. |
| 402 recv = handle(heap()->call_site_constructor_symbol(), this); |
| 403 } |
| 399 // Filter out internal frames that we do not want to show. | 404 // Filter out internal frames that we do not want to show. |
| 400 if (!IsVisibleInStackTrace(*fun, *caller, &seen_caller)) continue; | 405 if (!IsVisibleInStackTrace(*fun, *caller, &seen_caller)) continue; |
| 401 // Filter out frames from other security contexts. | 406 // Filter out frames from other security contexts. |
| 402 if (!this->context()->HasSameSecurityTokenAs(fun->context())) { | 407 if (!this->context()->HasSameSecurityTokenAs(fun->context())) { |
| 403 continue; | 408 continue; |
| 404 } | 409 } |
| 405 elements = MaybeGrow(this, elements, cursor, cursor + 4); | 410 elements = MaybeGrow(this, elements, cursor, cursor + 4); |
| 406 | 411 |
| 407 Handle<AbstractCode> abstract_code = frames[i].abstract_code(); | 412 Handle<AbstractCode> abstract_code = frames[i].abstract_code(); |
| 408 | 413 |
| (...skipping 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3086 // Then check whether this scope intercepts. | 3091 // Then check whether this scope intercepts. |
| 3087 if ((flag & intercept_mask_)) { | 3092 if ((flag & intercept_mask_)) { |
| 3088 intercepted_flags_ |= flag; | 3093 intercepted_flags_ |= flag; |
| 3089 return true; | 3094 return true; |
| 3090 } | 3095 } |
| 3091 return false; | 3096 return false; |
| 3092 } | 3097 } |
| 3093 | 3098 |
| 3094 } // namespace internal | 3099 } // namespace internal |
| 3095 } // namespace v8 | 3100 } // namespace v8 |
| OLD | NEW |