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

Unified Diff: src/objects-printer.cc

Issue 1712833002: Don't reflect ES2015 Function name inference in Function.prototype.toString (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move bits around to make STATIC_ASSERT happy 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/objects-inl.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 49b746b42362e3b5dc1f9eb521b85d331fe5fad9..6a651bd5e68b42367f3aac13d6469b6677018a06 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -886,10 +886,16 @@ void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT
// Script files are often large, hard to read.
// os << "\n - script =";
// script()->Print(os);
+ if (is_named_expression()) {
+ os << "\n - named expression";
+ } else if (is_anonymous_expression()) {
+ os << "\n - anonymous expression";
+ } else if (is_declaration()) {
+ os << "\n - declaration";
+ }
os << "\n - function token position = " << function_token_position();
os << "\n - start position = " << start_position();
os << "\n - end position = " << end_position();
- os << "\n - is expression = " << is_expression();
os << "\n - debug info = " << Brief(debug_info());
os << "\n - length = " << length();
os << "\n - optimized_code_map = " << Brief(optimized_code_map());
« no previous file with comments | « src/objects-inl.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698