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

Unified Diff: src/compiler/pipeline.cc

Issue 1866613003: [turbofan] Deprecate CompilationInfo::has_literal predicate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/linkage.cc ('k') | no next file » | 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 1d7e967cc733efc3939b3652d3a5b58dbcabd8a5..e480b194c93f443a3d78adf7cef32021c6256e3e 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -1112,12 +1112,10 @@ Handle<Code> Pipeline::GenerateCode() {
int pos = info()->shared_info()->start_position();
json_of << "{\"function\":\"" << function_name.get()
<< "\", \"sourcePosition\":" << pos << ", \"source\":\"";
- if (info()->has_literal() && !script->IsUndefined() &&
- !script->source()->IsUndefined()) {
+ if (!script->IsUndefined() && !script->source()->IsUndefined()) {
DisallowHeapAllocation no_allocation;
- FunctionLiteral* function = info()->literal();
- int start = function->start_position();
- int len = function->end_position() - start;
+ int start = info()->shared_info()->start_position();
+ int len = info()->shared_info()->end_position() - start;
String::SubStringRange source(String::cast(script->source()), start,
len);
for (const auto& c : source) {
« no previous file with comments | « src/compiler/linkage.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698