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

Unified Diff: src/compiler/pipeline.cc

Issue 1679313002: [interpreter] Make it possible to optimize without parse. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-language-mode
Patch Set: Created 4 years, 10 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/compiler.cc ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index d944e6020007b650c6b94e8f46471e9ac2fc3e74..555bde6d77827e30e2baa48026aaecc872cc4642 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -1078,13 +1078,14 @@ Handle<Code> Pipeline::GenerateCode() {
if (json_file != nullptr) {
OFStream json_of(json_file);
Handle<Script> script = info()->script();
- FunctionLiteral* function = info()->literal();
base::SmartArrayPointer<char> function_name = info()->GetDebugName();
int pos = info()->shared_info()->start_position();
json_of << "{\"function\":\"" << function_name.get()
<< "\", \"sourcePosition\":" << pos << ", \"source\":\"";
- if (!script->IsUndefined() && !script->source()->IsUndefined()) {
+ if (info()->has_literal() && !script->IsUndefined() &&
+ !script->source()->IsUndefined()) {
DisallowHeapAllocation no_allocation;
+ FunctionLiteral* function = info()->literal();
int start = function->start_position();
int len = function->end_position() - start;
String::SubStringRange source(String::cast(script->source()), start,
« no previous file with comments | « src/compiler.cc ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698