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

Side by Side Diff: src/runtime.cc

Issue 418143007: FYI Implementing 'super' keyword (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: one more test Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 HandleScope scope(isolate); 2017 HandleScope scope(isolate);
2018 DCHECK(args.length() == 1); 2018 DCHECK(args.length() == 1);
2019 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); 2019 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
2020 Handle<Object> result; 2020 Handle<Object> result;
2021 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 2021 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
2022 isolate, result, JSObject::PreventExtensions(obj)); 2022 isolate, result, JSObject::PreventExtensions(obj));
2023 return *result; 2023 return *result;
2024 } 2024 }
2025 2025
2026 2026
2027 RUNTIME_FUNCTION(Runtime_ToMethod) {
2028 HandleScope scope(isolate);
2029 DCHECK(args.length() == 2);
2030 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
2031 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1);
2032 Handle<JSFunction> clone(Handle<JSFunction>::cast(
2033 isolate->factory()->CopyJSObject(fun)));
2034 clone->set_home_object(*home_object);
2035 return *clone;
2036 }
2037
2038
2027 RUNTIME_FUNCTION(Runtime_IsExtensible) { 2039 RUNTIME_FUNCTION(Runtime_IsExtensible) {
2028 SealHandleScope shs(isolate); 2040 SealHandleScope shs(isolate);
2029 DCHECK(args.length() == 1); 2041 DCHECK(args.length() == 1);
2030 CONVERT_ARG_CHECKED(JSObject, obj, 0); 2042 CONVERT_ARG_CHECKED(JSObject, obj, 0);
2031 if (obj->IsJSGlobalProxy()) { 2043 if (obj->IsJSGlobalProxy()) {
2032 PrototypeIterator iter(isolate, obj); 2044 PrototypeIterator iter(isolate, obj);
2033 if (iter.IsAtEnd()) return isolate->heap()->false_value(); 2045 if (iter.IsAtEnd()) return isolate->heap()->false_value();
2034 DCHECK(iter.GetCurrent()->IsJSGlobalObject()); 2046 DCHECK(iter.GetCurrent()->IsJSGlobalObject());
2035 obj = JSObject::cast(iter.GetCurrent()); 2047 obj = JSObject::cast(iter.GetCurrent());
2036 } 2048 }
(...skipping 13543 matching lines...) Expand 10 before | Expand all | Expand 10 after
15580 } 15592 }
15581 return NULL; 15593 return NULL;
15582 } 15594 }
15583 15595
15584 15596
15585 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15597 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15586 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15598 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15587 } 15599 }
15588 15600
15589 } } // namespace v8::internal 15601 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698