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 Handle<Object> result; | |
2084 if (it.IsFound()) { | |
Toon Verwaest
2014/09/15 13:16:43
You don't need this it.IsFound() either... GetProp
Dmitry Lomov (no reviews)
2014/09/16 13:15:55
Done.
| |
2085 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | |
2086 Object::GetProperty(&it)); | |
2087 return *result; | |
2088 } | |
2089 return isolate->heap()->undefined_value(); | |
2090 } | |
2091 | |
2092 | |
2075 RUNTIME_FUNCTION(Runtime_IsExtensible) { | 2093 RUNTIME_FUNCTION(Runtime_IsExtensible) { |
2076 SealHandleScope shs(isolate); | 2094 SealHandleScope shs(isolate); |
2077 DCHECK(args.length() == 1); | 2095 DCHECK(args.length() == 1); |
2078 CONVERT_ARG_CHECKED(JSObject, obj, 0); | 2096 CONVERT_ARG_CHECKED(JSObject, obj, 0); |
2079 if (obj->IsJSGlobalProxy()) { | 2097 if (obj->IsJSGlobalProxy()) { |
2080 PrototypeIterator iter(isolate, obj); | 2098 PrototypeIterator iter(isolate, obj); |
2081 if (iter.IsAtEnd()) return isolate->heap()->false_value(); | 2099 if (iter.IsAtEnd()) return isolate->heap()->false_value(); |
2082 DCHECK(iter.GetCurrent()->IsJSGlobalObject()); | 2100 DCHECK(iter.GetCurrent()->IsJSGlobalObject()); |
2083 obj = JSObject::cast(iter.GetCurrent()); | 2101 obj = JSObject::cast(iter.GetCurrent()); |
2084 } | 2102 } |
(...skipping 13572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
15657 } | 15675 } |
15658 return NULL; | 15676 return NULL; |
15659 } | 15677 } |
15660 | 15678 |
15661 | 15679 |
15662 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15680 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15663 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15681 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15664 } | 15682 } |
15665 | 15683 |
15666 } } // namespace v8::internal | 15684 } } // namespace v8::internal |
OLD | NEW |