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

Side by Side Diff: src/objects.h

Issue 2018963002: [builtins] Migrate String.prototype.trim/trimLeft/trimRight to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Franziskas comments. Created 4 years, 6 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/js/string.js ('k') | src/objects.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 8842 matching lines...) Expand 10 before | Expand all | Expand 10 after
8853 8853
8854 bool ComputeArrayIndex(uint32_t* index); 8854 bool ComputeArrayIndex(uint32_t* index);
8855 8855
8856 // Externalization. 8856 // Externalization.
8857 bool MakeExternal(v8::String::ExternalStringResource* resource); 8857 bool MakeExternal(v8::String::ExternalStringResource* resource);
8858 bool MakeExternal(v8::String::ExternalOneByteStringResource* resource); 8858 bool MakeExternal(v8::String::ExternalOneByteStringResource* resource);
8859 8859
8860 // Conversion. 8860 // Conversion.
8861 inline bool AsArrayIndex(uint32_t* index); 8861 inline bool AsArrayIndex(uint32_t* index);
8862 8862
8863 // Trimming.
8864 enum TrimMode { kTrim, kTrimLeft, kTrimRight };
8865 static Handle<String> Trim(Handle<String> string, TrimMode mode);
8866
8863 DECLARE_CAST(String) 8867 DECLARE_CAST(String)
8864 8868
8865 void PrintOn(FILE* out); 8869 void PrintOn(FILE* out);
8866 8870
8867 // For use during stack traces. Performs rudimentary sanity check. 8871 // For use during stack traces. Performs rudimentary sanity check.
8868 bool LooksValid(); 8872 bool LooksValid();
8869 8873
8870 // Dispatched behavior. 8874 // Dispatched behavior.
8871 void StringShortPrint(StringStream* accumulator); 8875 void StringShortPrint(StringStream* accumulator);
8872 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT 8876 void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
10785 } 10789 }
10786 return value; 10790 return value;
10787 } 10791 }
10788 }; 10792 };
10789 10793
10790 10794
10791 } // NOLINT, false-positive due to second-order macros. 10795 } // NOLINT, false-positive due to second-order macros.
10792 } // NOLINT, false-positive due to second-order macros. 10796 } // NOLINT, false-positive due to second-order macros.
10793 10797
10794 #endif // V8_OBJECTS_H_ 10798 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/js/string.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698