| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/frames-inl.h" | 9 #include "src/frames-inl.h" |
| 10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 UNREACHABLE(); | 926 UNREACHABLE(); |
| 927 return MakePair(NULL, NULL); | 927 return MakePair(NULL, NULL); |
| 928 } | 928 } |
| 929 } | 929 } |
| 930 | 930 |
| 931 // Otherwise, if the slot was found the holder is a context extension | 931 // Otherwise, if the slot was found the holder is a context extension |
| 932 // object, subject of a with, or a global object. We read the named | 932 // object, subject of a with, or a global object. We read the named |
| 933 // property from it. | 933 // property from it. |
| 934 if (!holder.is_null()) { | 934 if (!holder.is_null()) { |
| 935 Handle<JSReceiver> object = Handle<JSReceiver>::cast(holder); | 935 Handle<JSReceiver> object = Handle<JSReceiver>::cast(holder); |
| 936 #ifdef DEBUG | |
| 937 if (!object->IsJSProxy()) { | |
| 938 Maybe<bool> maybe = JSReceiver::HasProperty(object, name); | |
| 939 DCHECK(maybe.has_value); | |
| 940 DCHECK(maybe.value); | |
| 941 } | |
| 942 #endif | |
| 943 // GetProperty below can cause GC. | 936 // GetProperty below can cause GC. |
| 944 Handle<Object> receiver_handle( | 937 Handle<Object> receiver_handle( |
| 945 object->IsGlobalObject() | 938 object->IsGlobalObject() |
| 946 ? Object::cast(isolate->heap()->undefined_value()) | 939 ? Object::cast(isolate->heap()->undefined_value()) |
| 947 : object->IsJSProxy() ? static_cast<Object*>(*object) | 940 : object->IsJSProxy() ? static_cast<Object*>(*object) |
| 948 : ComputeReceiverForNonGlobal( | 941 : ComputeReceiverForNonGlobal( |
| 949 isolate, JSObject::cast(*object)), | 942 isolate, JSObject::cast(*object)), |
| 950 isolate); | 943 isolate); |
| 951 | 944 |
| 952 // No need to unhole the value here. This is taken care of by the | 945 // No need to unhole the value here. This is taken care of by the |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 return Smi::FromInt(frame->GetArgumentsLength()); | 1115 return Smi::FromInt(frame->GetArgumentsLength()); |
| 1123 } | 1116 } |
| 1124 | 1117 |
| 1125 | 1118 |
| 1126 RUNTIME_FUNCTION(RuntimeReference_Arguments) { | 1119 RUNTIME_FUNCTION(RuntimeReference_Arguments) { |
| 1127 SealHandleScope shs(isolate); | 1120 SealHandleScope shs(isolate); |
| 1128 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); | 1121 return __RT_impl_Runtime_GetArgumentsProperty(args, isolate); |
| 1129 } | 1122 } |
| 1130 } | 1123 } |
| 1131 } // namespace v8::internal | 1124 } // namespace v8::internal |
| OLD | NEW |