Reviewers: Yang,

Description:
Remove obsolete global SubString method.

[email protected]

Please review this at https://codereview.chromium.org/24545002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+2, -15 lines):
  M src/handles.h
  M src/handles.cc
  M src/objects.cc


Index: src/handles.cc
diff --git a/src/handles.cc b/src/handles.cc
index 033fdab3dc6652534e76bd9d4fae19eebeb08289..6b9025dbf6306da14897b1e4656e45e7bb2aebf0 100644
--- a/src/handles.cc
+++ b/src/handles.cc
@@ -285,15 +285,6 @@ Handle<Object> LookupSingleCharacterStringFromCode(Isolate* isolate,
 }


-Handle<String> SubString(Handle<String> str,
-                         int start,
-                         int end,
-                         PretenureFlag pretenure) {
-  CALL_HEAP_FUNCTION(str->GetIsolate(),
-                     str->SubString(start, end, pretenure), String);
-}
-
-
 // Wrappers for scripts are kept alive and cached in weak global
 // handles referred from foreign objects held by the scripts as long as
 // they are used. When they are not used anymore, the garbage
Index: src/handles.h
diff --git a/src/handles.h b/src/handles.h
index 585f7b4e79f02f5bf4fd3134250e0fdada0d4f6f..0f619d572e3e7f7b6ddee2929f4d3951cdeba339 100644
--- a/src/handles.h
+++ b/src/handles.h
@@ -299,11 +299,6 @@ Handle<FixedArray> GetEnumPropertyKeys(Handle<JSObject> object,
 Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first,
                                Handle<FixedArray> second);

-Handle<String> SubString(Handle<String> str,
-                         int start,
-                         int end,
-                         PretenureFlag pretenure = NOT_TENURED);
-
 // Sets the expected number of properties for the function's instances.
 void SetExpectedNofProperties(Handle<JSFunction> func, int nof);

Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 169307fb8e077c8cb4513f6f9fdaa489ac2dc26d..32127eb8b9f19afd9e3cf46c04303b900ca86772 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9734,7 +9734,8 @@ bool SharedFunctionInfo::HasSourceCode() {
 Handle<Object> SharedFunctionInfo::GetSourceCode() {
   if (!HasSourceCode()) return GetIsolate()->factory()->undefined_value();
   Handle<String> source(String::cast(Script::cast(script())->source()));
-  return SubString(source, start_position(), end_position());
+  return GetIsolate()->factory()->NewSubString(
+      source, start_position(), end_position());
 }




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to