Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/objects.cc

Issue 10067010: Implement ES5 erratum: global declarations shadow inherited properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/contexts.h ('k') | src/parser.cc » ('j') | src/runtime.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3007 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 object->GetIsolate(), 3018 object->GetIsolate(),
3019 object->SetLocalPropertyIgnoreAttributes(*key, *value, attributes), 3019 object->SetLocalPropertyIgnoreAttributes(*key, *value, attributes),
3020 Object); 3020 Object);
3021 } 3021 }
3022 3022
3023 3023
3024 MaybeObject* JSObject::SetLocalPropertyIgnoreAttributes( 3024 MaybeObject* JSObject::SetLocalPropertyIgnoreAttributes(
3025 String* name, 3025 String* name,
3026 Object* value, 3026 Object* value,
3027 PropertyAttributes attributes) { 3027 PropertyAttributes attributes) {
3028
3029 // Make sure that the top context does not change when doing callbacks or 3028 // Make sure that the top context does not change when doing callbacks or
3030 // interceptor calls. 3029 // interceptor calls.
3031 AssertNoContextChange ncc; 3030 AssertNoContextChange ncc;
3032 Isolate* isolate = GetIsolate(); 3031 Isolate* isolate = GetIsolate();
3033 LookupResult result(isolate); 3032 LookupResult result(isolate);
3034 LocalLookup(name, &result); 3033 LocalLookup(name, &result);
3035 // Check access rights if needed. 3034 // Check access rights if needed.
3036 if (IsAccessCheckNeeded()) { 3035 if (IsAccessCheckNeeded()) {
3037 if (!isolate->MayNamedAccess(this, name, v8::ACCESS_SET)) { 3036 if (!isolate->MayNamedAccess(this, name, v8::ACCESS_SET)) {
3038 return SetPropertyWithFailedAccessCheck(&result, 3037 return SetPropertyWithFailedAccessCheck(&result,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 return ConvertDescriptorToField(name, value, attributes); 3086 return ConvertDescriptorToField(name, value, attributes);
3088 case CONSTANT_TRANSITION: 3087 case CONSTANT_TRANSITION:
3089 // Replace with a MAP_TRANSITION to a new map with a FIELD, even 3088 // Replace with a MAP_TRANSITION to a new map with a FIELD, even
3090 // if the value is a function. 3089 // if the value is a function.
3091 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); 3090 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes);
3092 case NULL_DESCRIPTOR: 3091 case NULL_DESCRIPTOR:
3093 case ELEMENTS_TRANSITION: 3092 case ELEMENTS_TRANSITION:
3094 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes); 3093 return ConvertDescriptorToFieldAndMapTransition(name, value, attributes);
3095 case HANDLER: 3094 case HANDLER:
3096 UNREACHABLE(); 3095 UNREACHABLE();
3097 return value;
3098 } 3096 }
3099 UNREACHABLE(); // keep the compiler happy 3097 UNREACHABLE(); // keep the compiler happy
3100 return value; 3098 return value;
3101 } 3099 }
3102 3100
3103 3101
3104 PropertyAttributes JSObject::GetPropertyAttributePostInterceptor( 3102 PropertyAttributes JSObject::GetPropertyAttributePostInterceptor(
3105 JSObject* receiver, 3103 JSObject* receiver,
3106 String* name, 3104 String* name,
3107 bool continue_search) { 3105 bool continue_search) {
(...skipping 9865 matching lines...) Expand 10 before | Expand all | Expand 10 after
12973 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 12971 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
12974 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 12972 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
12975 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 12973 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
12976 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 12974 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
12977 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 12975 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
12978 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 12976 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
12979 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 12977 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
12980 } 12978 }
12981 12979
12982 } } // namespace v8::internal 12980 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/parser.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698