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

Side by Side Diff: src/objects.h

Issue 6576024: (early draft) Strict mode - throw exception on assignment to read only property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Assign to read only property in strict mode. Created 9 years, 9 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/messages.js ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 // Collects elements starting at index 0. 1354 // Collects elements starting at index 0.
1355 // Undefined values are placed after non-undefined values. 1355 // Undefined values are placed after non-undefined values.
1356 // Returns the number of non-undefined values. 1356 // Returns the number of non-undefined values.
1357 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit); 1357 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit);
1358 // As PrepareElementsForSort, but only on objects where elements is 1358 // As PrepareElementsForSort, but only on objects where elements is
1359 // a dictionary, and it will stay a dictionary. 1359 // a dictionary, and it will stay a dictionary.
1360 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit); 1360 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit);
1361 1361
1362 MUST_USE_RESULT MaybeObject* SetProperty(String* key, 1362 MUST_USE_RESULT MaybeObject* SetProperty(String* key,
1363 Object* value, 1363 Object* value,
1364 PropertyAttributes attributes); 1364 PropertyAttributes attributes,
1365 StrictModeFlag strict);
1365 MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result, 1366 MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result,
1366 String* key, 1367 String* key,
1367 Object* value, 1368 Object* value,
1368 PropertyAttributes attributes); 1369 PropertyAttributes attributes,
1370 StrictModeFlag strict);
1369 MUST_USE_RESULT MaybeObject* SetPropertyWithFailedAccessCheck( 1371 MUST_USE_RESULT MaybeObject* SetPropertyWithFailedAccessCheck(
1370 LookupResult* result, 1372 LookupResult* result,
1371 String* name, 1373 String* name,
1372 Object* value, 1374 Object* value,
1373 bool check_prototype); 1375 bool check_prototype);
1374 MUST_USE_RESULT MaybeObject* SetPropertyWithCallback(Object* structure, 1376 MUST_USE_RESULT MaybeObject* SetPropertyWithCallback(Object* structure,
1375 String* name, 1377 String* name,
1376 Object* value, 1378 Object* value,
1377 JSObject* holder); 1379 JSObject* holder);
1378 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSFunction* setter, 1380 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSFunction* setter,
1379 Object* value); 1381 Object* value);
1380 MUST_USE_RESULT MaybeObject* SetPropertyWithInterceptor( 1382 MUST_USE_RESULT MaybeObject* SetPropertyWithInterceptor(
1381 String* name, 1383 String* name,
1382 Object* value, 1384 Object* value,
1383 PropertyAttributes attributes); 1385 PropertyAttributes attributes,
1386 StrictModeFlag strict);
1384 MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor( 1387 MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor(
1385 String* name, 1388 String* name,
1386 Object* value, 1389 Object* value,
1387 PropertyAttributes attributes); 1390 PropertyAttributes attributes,
1391 StrictModeFlag strict);
1388 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes( 1392 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes(
1389 String* key, 1393 String* key,
1390 Object* value, 1394 Object* value,
1391 PropertyAttributes attributes); 1395 PropertyAttributes attributes);
1392 1396
1393 // Retrieve a value in a normalized object given a lookup result. 1397 // Retrieve a value in a normalized object given a lookup result.
1394 // Handles the special representation of JS global objects. 1398 // Handles the special representation of JS global objects.
1395 Object* GetNormalizedProperty(LookupResult* result); 1399 Object* GetNormalizedProperty(LookupResult* result);
1396 1400
1397 // Sets the property value in a normalized object given a lookup result. 1401 // Sets the property value in a normalized object given a lookup result.
(...skipping 5160 matching lines...) Expand 10 before | Expand all | Expand 10 after
6558 } else { 6562 } else {
6559 value &= ~(1 << bit_position); 6563 value &= ~(1 << bit_position);
6560 } 6564 }
6561 return value; 6565 return value;
6562 } 6566 }
6563 }; 6567 };
6564 6568
6565 } } // namespace v8::internal 6569 } } // namespace v8::internal
6566 6570
6567 #endif // V8_OBJECTS_H_ 6571 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698