Chromium Code Reviews

Unified Diff: src/execution.cc

Issue 1143153004: Remove Execution::CharAt (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/execution.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index 97c660e10fbb80339c45e29b4a23ae60554b5f14..6a8ac83acf0ef140991318a9f808e18ed4e7d73a 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -602,35 +602,6 @@ MaybeHandle<JSRegExp> Execution::NewJSRegExp(Handle<String> pattern,
}
-Handle<Object> Execution::CharAt(Handle<String> string, uint32_t index) {
- Isolate* isolate = string->GetIsolate();
- Factory* factory = isolate->factory();
-
- int int_index = static_cast<int>(index);
- if (int_index < 0 || int_index >= string->length()) {
- return factory->undefined_value();
- }
-
- Handle<Object> char_at = Object::GetProperty(
- isolate->js_builtins_object(),
- factory->char_at_string()).ToHandleChecked();
- if (!char_at->IsJSFunction()) {
- return factory->undefined_value();
- }
-
- Handle<Object> index_object = factory->NewNumberFromInt(int_index);
- Handle<Object> index_arg[] = { index_object };
- Handle<Object> result;
- if (!TryCall(Handle<JSFunction>::cast(char_at),
- string,
- arraysize(index_arg),
- index_arg).ToHandle(&result)) {
- return factory->undefined_value();
- }
- return result;
-}
-
-
Handle<String> Execution::GetStackTraceLine(Handle<Object> recv,
Handle<JSFunction> fun,
Handle<Object> pos,
« no previous file with comments | « src/execution.h ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine