OLD | NEW |
---|---|
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 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2065 return *clone; | 2065 return *clone; |
2066 } | 2066 } |
2067 | 2067 |
2068 | 2068 |
2069 RUNTIME_FUNCTION(Runtime_HomeObjectSymbol) { | 2069 RUNTIME_FUNCTION(Runtime_HomeObjectSymbol) { |
2070 DCHECK(args.length() == 0); | 2070 DCHECK(args.length() == 0); |
2071 return isolate->heap()->home_object_symbol(); | 2071 return isolate->heap()->home_object_symbol(); |
2072 } | 2072 } |
2073 | 2073 |
2074 | 2074 |
2075 RUNTIME_FUNCTION(Runtime_LoadFromSuper) { | |
2076 HandleScope scope(isolate); | |
2077 DCHECK(args.length() == 3); | |
2078 CONVERT_ARG_HANDLE_CHECKED(JSObject, base_value, 0); | |
2079 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1); | |
2080 CONVERT_ARG_HANDLE_CHECKED(Name, name, 2); | |
2081 | |
2082 LookupIterator it(receiver, name, base_value); | |
2083 it.LookupForRead(); | |
Toon Verwaest
2014/09/15 11:57:20
I don't understand why you need this weird setup.
Dmitry Lomov (no reviews)
2014/09/15 12:31:12
Done.
| |
2084 Handle<Object> result; | |
2085 if (it.IsFound()) { | |
2086 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | |
2087 Object::GetProperty(&it)); | |
2088 return *result; | |
2089 } | |
2090 return isolate->heap()->undefined_value(); | |
2091 } | |
2092 | |
2093 | |
2075 RUNTIME_FUNCTION(Runtime_IsExtensible) { | 2094 RUNTIME_FUNCTION(Runtime_IsExtensible) { |
2076 SealHandleScope shs(isolate); | 2095 SealHandleScope shs(isolate); |
2077 DCHECK(args.length() == 1); | 2096 DCHECK(args.length() == 1); |
2078 CONVERT_ARG_CHECKED(JSObject, obj, 0); | 2097 CONVERT_ARG_CHECKED(JSObject, obj, 0); |
2079 if (obj->IsJSGlobalProxy()) { | 2098 if (obj->IsJSGlobalProxy()) { |
2080 PrototypeIterator iter(isolate, obj); | 2099 PrototypeIterator iter(isolate, obj); |
2081 if (iter.IsAtEnd()) return isolate->heap()->false_value(); | 2100 if (iter.IsAtEnd()) return isolate->heap()->false_value(); |
2082 DCHECK(iter.GetCurrent()->IsJSGlobalObject()); | 2101 DCHECK(iter.GetCurrent()->IsJSGlobalObject()); |
2083 obj = JSObject::cast(iter.GetCurrent()); | 2102 obj = JSObject::cast(iter.GetCurrent()); |
2084 } | 2103 } |
(...skipping 13572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15657 } | 15676 } |
15658 return NULL; | 15677 return NULL; |
15659 } | 15678 } |
15660 | 15679 |
15661 | 15680 |
15662 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15681 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15663 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15682 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15664 } | 15683 } |
15665 | 15684 |
15666 } } // namespace v8::internal | 15685 } } // namespace v8::internal |
OLD | NEW |