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

Unified Diff: src/runtime/runtime.cc

Issue 621833002: Extract runtime functions for classes into a separate file. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Includes cleaned up Created 6 years, 3 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
« no previous file with comments | « BUILD.gn ('k') | src/runtime/runtime-classes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime.cc
diff --git a/src/runtime/runtime.cc b/src/runtime/runtime.cc
index 815bc4592a65600086955620e69c10557621eb25..c504728b75b8a4ea2bb9a95e842efda84ec08111 100644
--- a/src/runtime/runtime.cc
+++ b/src/runtime/runtime.cc
@@ -270,97 +270,6 @@ RUNTIME_FUNCTION(Runtime_PreventExtensions) {
}
-RUNTIME_FUNCTION(Runtime_ToMethod) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 2);
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
- CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
- Handle<JSFunction> clone = JSFunction::CloneClosure(fun);
- Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol());
- JSObject::SetOwnPropertyIgnoreAttributes(clone, home_object_symbol,
- home_object, DONT_ENUM).Assert();
- return *clone;
-}
-
-
-RUNTIME_FUNCTION(Runtime_HomeObjectSymbol) {
- DCHECK(args.length() == 0);
- return isolate->heap()->home_object_symbol();
-}
-
-
-RUNTIME_FUNCTION(Runtime_LoadFromSuper) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 3);
- CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
- CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
- CONVERT_ARG_HANDLE_CHECKED(Name, name, 2);
-
- if (home_object->IsAccessCheckNeeded() &&
- !isolate->MayNamedAccess(home_object, name, v8::ACCESS_GET)) {
- isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_GET);
- RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
- }
-
- PrototypeIterator iter(isolate, home_object);
- Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
- if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value();
-
- LookupIterator it(receiver, name, Handle<JSReceiver>::cast(proto));
- Handle<Object> result;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::GetProperty(&it));
- return *result;
-}
-
-
-static Object* StoreToSuper(Isolate* isolate, Handle<JSObject> home_object,
- Handle<Object> receiver, Handle<Name> name,
- Handle<Object> value, StrictMode strict_mode) {
- if (home_object->IsAccessCheckNeeded() &&
- !isolate->MayNamedAccess(home_object, name, v8::ACCESS_SET)) {
- isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_SET);
- RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
- }
-
- PrototypeIterator iter(isolate, home_object);
- Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
- if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value();
-
- LookupIterator it(receiver, name, Handle<JSReceiver>::cast(proto));
- Handle<Object> result;
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, result,
- Object::SetProperty(&it, value, strict_mode,
- Object::CERTAINLY_NOT_STORE_FROM_KEYED,
- Object::SUPER_PROPERTY));
- return *result;
-}
-
-
-RUNTIME_FUNCTION(Runtime_StoreToSuper_Strict) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 4);
- CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
- CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
- CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
- CONVERT_ARG_HANDLE_CHECKED(Name, name, 3);
-
- return StoreToSuper(isolate, home_object, receiver, name, value, STRICT);
-}
-
-
-RUNTIME_FUNCTION(Runtime_StoreToSuper_Sloppy) {
- HandleScope scope(isolate);
- DCHECK(args.length() == 4);
- CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0);
- CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
- CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
- CONVERT_ARG_HANDLE_CHECKED(Name, name, 3);
-
- return StoreToSuper(isolate, home_object, receiver, name, value, SLOPPY);
-}
-
-
RUNTIME_FUNCTION(Runtime_IsExtensible) {
SealHandleScope shs(isolate);
DCHECK(args.length() == 1);
« no previous file with comments | « BUILD.gn ('k') | src/runtime/runtime-classes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698