From 4d12e9480133a2e4d65749c5c2587ec685bb5c76 Mon Sep 17 00:00:00 2001 From: yangguo Date: Tue, 28 Apr 2015 01:53:12 -0700 Subject: [PATCH] Port CallSite methods to C++. The goal is to port all of error stack trace formatting to C++. We will do this bottom up, by first porting helper functions. Eventually, CallSite methods will only be used when a custom error stack trace formatter is defined via Error.prepareStackTrace. R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/1060583008 Cr-Commit-Position: refs/heads/master@{#28095} --- src/messages.cc | 79 +++++++++++++++++++++++++ src/messages.h | 23 ++++++++ src/messages.js | 91 +++++++++++++---------------- src/runtime/runtime-debug.cc | 9 --- src/runtime/runtime-internal.cc | 41 +++++++++++++ src/runtime/runtime.h | 61 ++++++++++--------- test/mjsunit/compiler/regress-stacktrace.js | 1 - 7 files changed, 217 insertions(+), 88 deletions(-) diff --git a/src/messages.cc b/src/messages.cc index 1c07854..7dc5f64 100644 --- a/src/messages.cc +++ b/src/messages.cc @@ -163,6 +163,85 @@ SmartArrayPointer MessageHandler::GetLocalizedMessage( } +Handle CallSite::GetFileName(Isolate* isolate) { + Handle script(fun_->shared()->script(), isolate); + if (script->IsScript()) { + return Handle(Handle