| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 Handle<String> name, | 98 Handle<String> name, |
| 99 int* object_offset) { | 99 int* object_offset) { |
| 100 Isolate* isolate = name->GetIsolate(); | 100 Isolate* isolate = name->GetIsolate(); |
| 101 | 101 |
| 102 if (type->Is(T::String())) { | 102 if (type->Is(T::String())) { |
| 103 return CheckForName(name, isolate->heap()->length_string(), | 103 return CheckForName(name, isolate->heap()->length_string(), |
| 104 String::kLengthOffset, object_offset); | 104 String::kLengthOffset, object_offset); |
| 105 } | 105 } |
| 106 | 106 |
| 107 if (!type->IsClass()) return false; | 107 if (!type->IsClass()) return false; |
| 108 Handle<Map> map = type->AsClass(); | 108 Handle<Map> map = type->AsClass()->Map(); |
| 109 | 109 |
| 110 switch (map->instance_type()) { | 110 switch (map->instance_type()) { |
| 111 case JS_ARRAY_TYPE: | 111 case JS_ARRAY_TYPE: |
| 112 return | 112 return |
| 113 CheckForName(name, isolate->heap()->length_string(), | 113 CheckForName(name, isolate->heap()->length_string(), |
| 114 JSArray::kLengthOffset, object_offset); | 114 JSArray::kLengthOffset, object_offset); |
| 115 case JS_TYPED_ARRAY_TYPE: | 115 case JS_TYPED_ARRAY_TYPE: |
| 116 return | 116 return |
| 117 CheckForName(name, isolate->heap()->length_string(), | 117 CheckForName(name, isolate->heap()->length_string(), |
| 118 JSTypedArray::kLengthOffset, object_offset) || | 118 JSTypedArray::kLengthOffset, object_offset) || |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 info->set_data(Smi::FromInt(index)); | 967 info->set_data(Smi::FromInt(index)); |
| 968 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); | 968 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); |
| 969 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); | 969 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); |
| 970 info->set_getter(*getter); | 970 info->set_getter(*getter); |
| 971 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 971 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
| 972 return info; | 972 return info; |
| 973 } | 973 } |
| 974 | 974 |
| 975 | 975 |
| 976 } } // namespace v8::internal | 976 } } // namespace v8::internal |
| OLD | NEW |