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

Unified Diff: src/handles.cc

Issue 7477045: Tentative implementation of string slices (hidden under the flag --string-slices). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patched RegExp for string slices. Created 9 years, 4 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
Index: src/handles.cc
diff --git a/src/handles.cc b/src/handles.cc
index d73aaf0fca671fed228d4996c5e70872713eee8e..8a14eac47a2df279547c8f7dd39b1d02ed7b2c3d 100644
--- a/src/handles.cc
+++ b/src/handles.cc
@@ -250,6 +250,21 @@ Handle<String> FlattenGetString(Handle<String> string) {
}
+void TruncateString(Handle<String> string) {
+ CALL_HEAP_FUNCTION_VOID(string->GetIsolate(), string->TryTruncate());
+}
+
+
+Handle<String> TruncateGetString(Handle<String> string) {
+ CALL_HEAP_FUNCTION(string->GetIsolate(), string->TryTruncate(), String);
+}
+
+
+void FlattenOrTruncateString(Handle<String> string) {
+ CALL_HEAP_FUNCTION_VOID(string->GetIsolate(), string->TryFlattenOrTruncate());
+}
+
+
Handle<Object> SetPrototype(Handle<JSFunction> function,
Handle<Object> prototype) {
ASSERT(function->should_have_prototype());

Powered by Google App Engine
This is Rietveld 408576698