| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 Handle<String> name, | 119 Handle<String> name, |
| 120 int* object_offset) { | 120 int* object_offset) { |
| 121 Isolate* isolate = name->GetIsolate(); | 121 Isolate* isolate = name->GetIsolate(); |
| 122 | 122 |
| 123 if (type->Is(T::String())) { | 123 if (type->Is(T::String())) { |
| 124 return CheckForName(name, isolate->factory()->length_string(), | 124 return CheckForName(name, isolate->factory()->length_string(), |
| 125 String::kLengthOffset, object_offset); | 125 String::kLengthOffset, object_offset); |
| 126 } | 126 } |
| 127 | 127 |
| 128 if (!type->IsClass()) return false; | 128 if (!type->IsClass()) return false; |
| 129 Handle<Map> map = type->AsClass()->Map(); | 129 Handle<Map> map = type->AsClass(); |
| 130 | 130 |
| 131 switch (map->instance_type()) { | 131 switch (map->instance_type()) { |
| 132 case JS_ARRAY_TYPE: | 132 case JS_ARRAY_TYPE: |
| 133 return | 133 return |
| 134 CheckForName(name, isolate->factory()->length_string(), | 134 CheckForName(name, isolate->factory()->length_string(), |
| 135 JSArray::kLengthOffset, object_offset); | 135 JSArray::kLengthOffset, object_offset); |
| 136 case JS_TYPED_ARRAY_TYPE: | 136 case JS_TYPED_ARRAY_TYPE: |
| 137 return | 137 return |
| 138 CheckForName(name, isolate->factory()->length_string(), | 138 CheckForName(name, isolate->factory()->length_string(), |
| 139 JSTypedArray::kLengthOffset, object_offset) || | 139 JSTypedArray::kLengthOffset, object_offset) || |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1205 info->set_data(Smi::FromInt(index)); | 1205 info->set_data(Smi::FromInt(index)); |
| 1206 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); | 1206 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); |
| 1207 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); | 1207 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); |
| 1208 info->set_getter(*getter); | 1208 info->set_getter(*getter); |
| 1209 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 1209 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
| 1210 return info; | 1210 return info; |
| 1211 } | 1211 } |
| 1212 | 1212 |
| 1213 | 1213 |
| 1214 } } // namespace v8::internal | 1214 } } // namespace v8::internal |
| OLD | NEW |