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

Side by Side Diff: src/objects-printer.cc

Issue 2549773002: Internalize strings in-place (Closed)
Patch Set: rebased Created 3 years, 11 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/ppc/code-stubs-ppc.cc » ('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 <iomanip> 7 #include <iomanip>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 os << "\n - stack_frames: " << Brief(stack_frames()); 843 os << "\n - stack_frames: " << Brief(stack_frames());
844 JSObjectPrintBody(os, this); 844 JSObjectPrintBody(os, this);
845 } 845 }
846 846
847 847
848 void String::StringPrint(std::ostream& os) { // NOLINT 848 void String::StringPrint(std::ostream& os) { // NOLINT
849 if (StringShape(this).IsInternalized()) { 849 if (StringShape(this).IsInternalized()) {
850 os << "#"; 850 os << "#";
851 } else if (StringShape(this).IsCons()) { 851 } else if (StringShape(this).IsCons()) {
852 os << "c\""; 852 os << "c\"";
853 } else if (StringShape(this).IsThin()) {
854 os << ">\"";
853 } else { 855 } else {
854 os << "\""; 856 os << "\"";
855 } 857 }
856 858
857 const char truncated_epilogue[] = "...<truncated>"; 859 const char truncated_epilogue[] = "...<truncated>";
858 int len = length(); 860 int len = length();
859 if (!FLAG_use_verbose_printer) { 861 if (!FLAG_use_verbose_printer) {
860 if (len > 100) { 862 if (len > 100) {
861 len = 100 - sizeof(truncated_epilogue); 863 len = 100 - sizeof(truncated_epilogue);
862 } 864 }
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1715 printf("Not a transition array\n"); 1717 printf("Not a transition array\n");
1716 } else { 1718 } else {
1717 reinterpret_cast<i::TransitionArray*>(object)->Print(); 1719 reinterpret_cast<i::TransitionArray*>(object)->Print();
1718 } 1720 }
1719 } 1721 }
1720 1722
1721 extern void _v8_internal_Print_StackTrace() { 1723 extern void _v8_internal_Print_StackTrace() {
1722 i::Isolate* isolate = i::Isolate::Current(); 1724 i::Isolate* isolate = i::Isolate::Current();
1723 isolate->PrintStack(stdout); 1725 isolate->PrintStack(stdout);
1724 } 1726 }
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/ppc/code-stubs-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698