| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3005 | 3005 |
| 3006 return AddMissingElementsTransitions(closest_map, kind); | 3006 return AddMissingElementsTransitions(closest_map, kind); |
| 3007 } | 3007 } |
| 3008 | 3008 |
| 3009 | 3009 |
| 3010 void JSObject::LocalLookupRealNamedProperty(Name* name, LookupResult* result) { | 3010 void JSObject::LocalLookupRealNamedProperty(Name* name, LookupResult* result) { |
| 3011 if (IsJSGlobalProxy()) { | 3011 if (IsJSGlobalProxy()) { |
| 3012 Object* proto = GetPrototype(); | 3012 Object* proto = GetPrototype(); |
| 3013 if (proto->IsNull()) return result->NotFound(); | 3013 if (proto->IsNull()) return result->NotFound(); |
| 3014 ASSERT(proto->IsJSGlobalObject()); | 3014 ASSERT(proto->IsJSGlobalObject()); |
| 3015 // A GlobalProxy's prototype should always be a proper JSObject. | |
| 3016 return JSObject::cast(proto)->LocalLookupRealNamedProperty(name, result); | 3015 return JSObject::cast(proto)->LocalLookupRealNamedProperty(name, result); |
| 3017 } | 3016 } |
| 3018 | 3017 |
| 3019 if (HasFastProperties()) { | 3018 if (HasFastProperties()) { |
| 3020 map()->LookupDescriptor(this, name, result); | 3019 map()->LookupDescriptor(this, name, result); |
| 3021 // A property or a map transition was found. We return all of these result | 3020 // A property or a map transition was found. We return all of these result |
| 3022 // types because LocalLookupRealNamedProperty is used when setting | 3021 // types because LocalLookupRealNamedProperty is used when setting |
| 3023 // properties where map transitions are handled. | 3022 // properties where map transitions are handled. |
| 3024 ASSERT(!result->IsFound() || | 3023 ASSERT(!result->IsFound() || |
| 3025 (result->holder() == this && result->IsFastPropertyType())); | 3024 (result->holder() == this && result->IsFastPropertyType())); |
| (...skipping 9131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12157 | 12156 |
| 12158 bool JSObject::HasRealElementProperty(Isolate* isolate, uint32_t index) { | 12157 bool JSObject::HasRealElementProperty(Isolate* isolate, uint32_t index) { |
| 12159 // Check access rights if needed. | 12158 // Check access rights if needed. |
| 12160 if (IsAccessCheckNeeded()) { | 12159 if (IsAccessCheckNeeded()) { |
| 12161 if (!isolate->MayIndexedAccess(this, index, v8::ACCESS_HAS)) { | 12160 if (!isolate->MayIndexedAccess(this, index, v8::ACCESS_HAS)) { |
| 12162 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); | 12161 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); |
| 12163 return false; | 12162 return false; |
| 12164 } | 12163 } |
| 12165 } | 12164 } |
| 12166 | 12165 |
| 12166 if (IsJSGlobalProxy()) { |
| 12167 Object* proto = GetPrototype(); |
| 12168 if (proto->IsNull()) return false; |
| 12169 ASSERT(proto->IsJSGlobalObject()); |
| 12170 return JSObject::cast(proto)->HasRealElementProperty(isolate, index); |
| 12171 } |
| 12172 |
| 12167 return GetElementAttributeWithoutInterceptor(this, index, false) != ABSENT; | 12173 return GetElementAttributeWithoutInterceptor(this, index, false) != ABSENT; |
| 12168 } | 12174 } |
| 12169 | 12175 |
| 12170 | 12176 |
| 12171 bool JSObject::HasRealNamedCallbackProperty(Isolate* isolate, Name* key) { | 12177 bool JSObject::HasRealNamedCallbackProperty(Isolate* isolate, Name* key) { |
| 12172 // Check access rights if needed. | 12178 // Check access rights if needed. |
| 12173 if (IsAccessCheckNeeded()) { | 12179 if (IsAccessCheckNeeded()) { |
| 12174 if (!isolate->MayNamedAccess(this, key, v8::ACCESS_HAS)) { | 12180 if (!isolate->MayNamedAccess(this, key, v8::ACCESS_HAS)) { |
| 12175 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); | 12181 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); |
| 12176 return false; | 12182 return false; |
| (...skipping 2915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15092 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 15098 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 15093 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 15099 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 15094 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 15100 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 15095 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 15101 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 15096 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 15102 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 15097 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 15103 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 15098 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 15104 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 15099 } | 15105 } |
| 15100 | 15106 |
| 15101 } } // namespace v8::internal | 15107 } } // namespace v8::internal |
| OLD | NEW |