Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1284)

Unified Diff: src/runtime/runtime-internal.cc

Issue 974213002: Extract ParseInfo from CompilationInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index 0d13a1fbe4dab340e392d553b45086cb1b16de95..7ad925b9c0384cf2074fbbdcb4f4a6a33cc5c1dc 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -179,18 +179,13 @@ RUNTIME_FUNCTION(Runtime_RenderCallSite) {
if (location.start_pos() == -1) return isolate->heap()->empty_string();
Zone zone;
+ ParseInfo info(&zone);
if (location.function()->shared()->is_function()) {
- CompilationInfo info(location.function(), &zone);
- if (!Parser::ParseStatic(&info)) {
- isolate->clear_pending_exception();
- return isolate->heap()->empty_string();
- }
- CallPrinter printer(isolate, &zone);
- const char* string = printer.Print(info.function(), location.start_pos());
- return *isolate->factory()->NewStringFromAsciiChecked(string);
+ info.InitializeFromJSFunction(location.function());
+ } else {
+ info.InitializeFromScript(location.script());
}
- CompilationInfo info(location.script(), &zone);
if (!Parser::ParseStatic(&info)) {
isolate->clear_pending_exception();
return isolate->heap()->empty_string();
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698