Remove obsolete global SubString method.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/24545002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mstarzinger@chromium.org 2013-09-25 09:31:10 +00:00
parent d0e12549ed
commit a409a2d651
3 changed files with 2 additions and 15 deletions

View File

@ -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

View File

@ -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);

View File

@ -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());
}