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

Side by Side Diff: src/objects.h

Issue 6603028: Merge revisions 7030:7051 from bleeding_edge to isolates branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' 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/liveobjectlist.cc ('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 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 // Undefined values are placed after non-undefined values. 1364 // Undefined values are placed after non-undefined values.
1365 // Returns the number of non-undefined values. 1365 // Returns the number of non-undefined values.
1366 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit); 1366 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit);
1367 // As PrepareElementsForSort, but only on objects where elements is 1367 // As PrepareElementsForSort, but only on objects where elements is
1368 // a dictionary, and it will stay a dictionary. 1368 // a dictionary, and it will stay a dictionary.
1369 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit); 1369 MUST_USE_RESULT MaybeObject* PrepareSlowElementsForSort(uint32_t limit);
1370 1370
1371 MUST_USE_RESULT MaybeObject* SetProperty(String* key, 1371 MUST_USE_RESULT MaybeObject* SetProperty(String* key,
1372 Object* value, 1372 Object* value,
1373 PropertyAttributes attributes, 1373 PropertyAttributes attributes,
1374 StrictModeFlag strict); 1374 StrictModeFlag strict_mode);
1375 MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result, 1375 MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result,
1376 String* key, 1376 String* key,
1377 Object* value, 1377 Object* value,
1378 PropertyAttributes attributes, 1378 PropertyAttributes attributes,
1379 StrictModeFlag strict); 1379 StrictModeFlag strict_mode);
1380 MUST_USE_RESULT MaybeObject* SetPropertyWithFailedAccessCheck( 1380 MUST_USE_RESULT MaybeObject* SetPropertyWithFailedAccessCheck(
1381 LookupResult* result, 1381 LookupResult* result,
1382 String* name, 1382 String* name,
1383 Object* value, 1383 Object* value,
1384 bool check_prototype); 1384 bool check_prototype);
1385 MUST_USE_RESULT MaybeObject* SetPropertyWithCallback(Object* structure, 1385 MUST_USE_RESULT MaybeObject* SetPropertyWithCallback(Object* structure,
1386 String* name, 1386 String* name,
1387 Object* value, 1387 Object* value,
1388 JSObject* holder); 1388 JSObject* holder);
1389 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSFunction* setter, 1389 MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSFunction* setter,
1390 Object* value); 1390 Object* value);
1391 MUST_USE_RESULT MaybeObject* SetPropertyWithInterceptor( 1391 MUST_USE_RESULT MaybeObject* SetPropertyWithInterceptor(
1392 String* name, 1392 String* name,
1393 Object* value, 1393 Object* value,
1394 PropertyAttributes attributes, 1394 PropertyAttributes attributes,
1395 StrictModeFlag strict); 1395 StrictModeFlag strict_mode);
1396 MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor( 1396 MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor(
1397 String* name, 1397 String* name,
1398 Object* value, 1398 Object* value,
1399 PropertyAttributes attributes, 1399 PropertyAttributes attributes,
1400 StrictModeFlag strict); 1400 StrictModeFlag strict_mode);
1401 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes( 1401 MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes(
1402 String* key, 1402 String* key,
1403 Object* value, 1403 Object* value,
1404 PropertyAttributes attributes); 1404 PropertyAttributes attributes);
1405 1405
1406 // Retrieve a value in a normalized object given a lookup result. 1406 // Retrieve a value in a normalized object given a lookup result.
1407 // Handles the special representation of JS global objects. 1407 // Handles the special representation of JS global objects.
1408 Object* GetNormalizedProperty(LookupResult* result); 1408 Object* GetNormalizedProperty(LookupResult* result);
1409 1409
1410 // Sets the property value in a normalized object given a lookup result. 1410 // Sets the property value in a normalized object given a lookup result.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 inline Object* GetPrototype(); 1517 inline Object* GetPrototype();
1518 1518
1519 // Set the object's prototype (only JSObject and null are allowed). 1519 // Set the object's prototype (only JSObject and null are allowed).
1520 MUST_USE_RESULT MaybeObject* SetPrototype(Object* value, 1520 MUST_USE_RESULT MaybeObject* SetPrototype(Object* value,
1521 bool skip_hidden_prototypes); 1521 bool skip_hidden_prototypes);
1522 1522
1523 // Tells whether the index'th element is present. 1523 // Tells whether the index'th element is present.
1524 inline bool HasElement(uint32_t index); 1524 inline bool HasElement(uint32_t index);
1525 bool HasElementWithReceiver(JSObject* receiver, uint32_t index); 1525 bool HasElementWithReceiver(JSObject* receiver, uint32_t index);
1526 1526
1527 // Computes the new capacity when expanding the elements of a JSObject.
1528 static int NewElementsCapacity(int old_capacity) {
1529 // (old_capacity + 50%) + 16
1530 return old_capacity + (old_capacity >> 1) + 16;
1531 }
1532
1527 // Tells whether the index'th element is present and how it is stored. 1533 // Tells whether the index'th element is present and how it is stored.
1528 enum LocalElementType { 1534 enum LocalElementType {
1529 // There is no element with given index. 1535 // There is no element with given index.
1530 UNDEFINED_ELEMENT, 1536 UNDEFINED_ELEMENT,
1531 1537
1532 // Element with given index is handled by interceptor. 1538 // Element with given index is handled by interceptor.
1533 INTERCEPTED_ELEMENT, 1539 INTERCEPTED_ELEMENT,
1534 1540
1535 // Element with given index is character in string. 1541 // Element with given index is character in string.
1536 STRING_CHARACTER_ELEMENT, 1542 STRING_CHARACTER_ELEMENT,
(...skipping 5056 matching lines...) Expand 10 before | Expand all | Expand 10 after
6593 } else { 6599 } else {
6594 value &= ~(1 << bit_position); 6600 value &= ~(1 << bit_position);
6595 } 6601 }
6596 return value; 6602 return value;
6597 } 6603 }
6598 }; 6604 };
6599 6605
6600 } } // namespace v8::internal 6606 } } // namespace v8::internal
6601 6607
6602 #endif // V8_OBJECTS_H_ 6608 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/liveobjectlist.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698