| 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 "src/accessors.h" | 5 #include "src/accessors.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/contexts.h" | 8 #include "src/contexts.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/execution.h" | 10 #include "src/execution.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 info->set_all_can_read(false); | 32 info->set_all_can_read(false); |
| 33 info->set_all_can_write(false); | 33 info->set_all_can_write(false); |
| 34 info->set_is_special_data_property(true); | 34 info->set_is_special_data_property(true); |
| 35 name = factory->InternalizeName(name); | 35 name = factory->InternalizeName(name); |
| 36 info->set_name(*name); | 36 info->set_name(*name); |
| 37 Handle<Object> get = v8::FromCData(isolate, getter); | 37 Handle<Object> get = v8::FromCData(isolate, getter); |
| 38 if (setter == nullptr) setter = &ReconfigureToDataProperty; | 38 if (setter == nullptr) setter = &ReconfigureToDataProperty; |
| 39 Handle<Object> set = v8::FromCData(isolate, setter); | 39 Handle<Object> set = v8::FromCData(isolate, setter); |
| 40 info->set_getter(*get); | 40 info->set_getter(*get); |
| 41 info->set_setter(*set); | 41 info->set_setter(*set); |
| 42 #ifdef USE_SIMULATOR |
| 43 Address redirected = info->redirected_getter(); |
| 44 if (redirected != nullptr) { |
| 45 Handle<Object> js_get = v8::FromCData(isolate, redirected); |
| 46 info->set_js_getter(*js_get); |
| 47 } |
| 48 #endif |
| 42 return info; | 49 return info; |
| 43 } | 50 } |
| 44 | 51 |
| 45 | 52 |
| 46 static V8_INLINE bool CheckForName(Handle<Name> name, | 53 static V8_INLINE bool CheckForName(Handle<Name> name, |
| 47 Handle<String> property_name, | 54 Handle<String> property_name, |
| 48 int offset, | 55 int offset, |
| 49 int* object_offset) { | 56 int* object_offset) { |
| 50 if (Name::Equals(name, property_name)) { | 57 if (Name::Equals(name, property_name)) { |
| 51 *object_offset = offset; | 58 *object_offset = offset; |
| (...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 Isolate* isolate = name->GetIsolate(); | 1258 Isolate* isolate = name->GetIsolate(); |
| 1252 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, | 1259 Handle<AccessorInfo> info = MakeAccessor(isolate, name, &ModuleGetExport, |
| 1253 &ModuleSetExport, attributes); | 1260 &ModuleSetExport, attributes); |
| 1254 info->set_data(Smi::FromInt(index)); | 1261 info->set_data(Smi::FromInt(index)); |
| 1255 return info; | 1262 return info; |
| 1256 } | 1263 } |
| 1257 | 1264 |
| 1258 | 1265 |
| 1259 } // namespace internal | 1266 } // namespace internal |
| 1260 } // namespace v8 | 1267 } // namespace v8 |
| OLD | NEW |