| 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 if (is_function_declaration) { | 110 if (is_function_declaration) { |
| 111 it.Restart(); | 111 it.Restart(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 // Define or redefine own property. | 114 // Define or redefine own property. |
| 115 RETURN_FAILURE_ON_EXCEPTION( | 115 RETURN_FAILURE_ON_EXCEPTION( |
| 116 isolate, JSObject::DefineOwnPropertyIgnoreAttributes(&it, value, attr)); | 116 isolate, JSObject::DefineOwnPropertyIgnoreAttributes(&it, value, attr)); |
| 117 | 117 |
| 118 if (!feedback_vector.is_null()) { | 118 if (!feedback_vector.is_null() && |
| 119 it.state() != LookupIterator::State::INTERCEPTOR) { |
| 119 DCHECK_EQ(*global, *it.GetHolder<Object>()); | 120 DCHECK_EQ(*global, *it.GetHolder<Object>()); |
| 120 // Preinitialize the feedback slot if the global object does not have | 121 // Preinitialize the feedback slot if the global object does not have |
| 121 // named interceptor or the interceptor is not masking. | 122 // named interceptor or the interceptor is not masking. |
| 122 if (!global->HasNamedInterceptor() || | 123 if (!global->HasNamedInterceptor() || |
| 123 global->GetNamedInterceptor()->non_masking()) { | 124 global->GetNamedInterceptor()->non_masking()) { |
| 124 LoadGlobalICNexus nexus(feedback_vector, slot); | 125 LoadGlobalICNexus nexus(feedback_vector, slot); |
| 125 nexus.ConfigurePropertyCellMode(it.GetPropertyCell()); | 126 nexus.ConfigurePropertyCellMode(it.GetPropertyCell()); |
| 126 } | 127 } |
| 127 } | 128 } |
| 128 return isolate->heap()->undefined_value(); | 129 return isolate->heap()->undefined_value(); |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { | 979 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { |
| 979 HandleScope scope(isolate); | 980 HandleScope scope(isolate); |
| 980 DCHECK_EQ(2, args.length()); | 981 DCHECK_EQ(2, args.length()); |
| 981 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 982 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
| 982 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 983 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
| 983 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); | 984 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); |
| 984 } | 985 } |
| 985 | 986 |
| 986 } // namespace internal | 987 } // namespace internal |
| 987 } // namespace v8 | 988 } // namespace v8 |
| OLD | NEW |