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

Unified Diff: src/runtime/runtime-classes.cc

Issue 1540953004: [runtime] Rewrite Function.prototype.toString in C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typos. Created 5 years 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/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index 75d3a5d8bf8d8c1e428a19e40dee22d36403eb06..ccd15e8b5da947bdf805a3fbbbdc7a6b49638627 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -245,31 +245,6 @@ RUNTIME_FUNCTION(Runtime_FinalizeClassDefinition) {
}
-RUNTIME_FUNCTION(Runtime_ClassGetSourceCode) {
- HandleScope shs(isolate);
- DCHECK(args.length() == 1);
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
-
- Handle<Symbol> start_position_symbol(
- isolate->heap()->class_start_position_symbol());
- Handle<Object> start_position =
- JSReceiver::GetDataProperty(fun, start_position_symbol);
- if (!start_position->IsSmi()) return isolate->heap()->undefined_value();
-
- Handle<Symbol> end_position_symbol(
- isolate->heap()->class_end_position_symbol());
- Handle<Object> end_position =
- JSReceiver::GetDataProperty(fun, end_position_symbol);
- CHECK(end_position->IsSmi());
-
- Handle<String> source(
- String::cast(Script::cast(fun->shared()->script())->source()));
- return *isolate->factory()->NewSubString(
- source, Handle<Smi>::cast(start_position)->value(),
- Handle<Smi>::cast(end_position)->value());
-}
-
-
static MaybeHandle<Object> LoadFromSuper(Isolate* isolate,
Handle<Object> receiver,
Handle<JSObject> home_object,

Powered by Google App Engine
This is Rietveld 408576698