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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/objects-inl.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 String* source = String::cast(Script::cast(script())->source()); 879 String* source = String::cast(Script::cast(script())->source());
880 int start = start_position(); 880 int start = start_position();
881 int length = end_position() - start; 881 int length = end_position() - start;
882 base::SmartArrayPointer<char> source_string = source->ToCString( 882 base::SmartArrayPointer<char> source_string = source->ToCString(
883 DISALLOW_NULLS, FAST_STRING_TRAVERSAL, start, length, NULL); 883 DISALLOW_NULLS, FAST_STRING_TRAVERSAL, start, length, NULL);
884 os << source_string.get(); 884 os << source_string.get();
885 } 885 }
886 // Script files are often large, hard to read. 886 // Script files are often large, hard to read.
887 // os << "\n - script ="; 887 // os << "\n - script =";
888 // script()->Print(os); 888 // script()->Print(os);
889 if (is_named_expression()) {
890 os << "\n - named expression";
891 } else if (is_anonymous_expression()) {
892 os << "\n - anonymous expression";
893 } else if (is_declaration()) {
894 os << "\n - declaration";
895 }
889 os << "\n - function token position = " << function_token_position(); 896 os << "\n - function token position = " << function_token_position();
890 os << "\n - start position = " << start_position(); 897 os << "\n - start position = " << start_position();
891 os << "\n - end position = " << end_position(); 898 os << "\n - end position = " << end_position();
892 os << "\n - is expression = " << is_expression();
893 os << "\n - debug info = " << Brief(debug_info()); 899 os << "\n - debug info = " << Brief(debug_info());
894 os << "\n - length = " << length(); 900 os << "\n - length = " << length();
895 os << "\n - optimized_code_map = " << Brief(optimized_code_map()); 901 os << "\n - optimized_code_map = " << Brief(optimized_code_map());
896 os << "\n - feedback_vector = "; 902 os << "\n - feedback_vector = ";
897 feedback_vector()->TypeFeedbackVectorPrint(os); 903 feedback_vector()->TypeFeedbackVectorPrint(os);
898 if (HasBytecodeArray()) { 904 if (HasBytecodeArray()) {
899 os << "\n - bytecode_array = " << bytecode_array(); 905 os << "\n - bytecode_array = " << bytecode_array();
900 } 906 }
901 os << "\n"; 907 os << "\n";
902 } 908 }
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1322 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1317 Object* transitions = map()->raw_transitions(); 1323 Object* transitions = map()->raw_transitions();
1318 int num_transitions = TransitionArray::NumberOfTransitions(transitions); 1324 int num_transitions = TransitionArray::NumberOfTransitions(transitions);
1319 if (num_transitions == 0) return; 1325 if (num_transitions == 0) return;
1320 os << "\n - transitions"; 1326 os << "\n - transitions";
1321 TransitionArray::PrintTransitions(os, transitions, false); 1327 TransitionArray::PrintTransitions(os, transitions, false);
1322 } 1328 }
1323 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1329 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1324 } // namespace internal 1330 } // namespace internal
1325 } // namespace v8 1331 } // namespace v8
OLDNEW
« 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