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

Side by Side Diff: src/objects.h

Issue 225683003: ElementsAccessor::GetAccessorPair() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ElementsAccessor::GetAccessorPair() handlified. Created 6 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/elements.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 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 2448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 // be represented as a double and not a Smi. 2459 // be represented as a double and not a Smi.
2460 bool ShouldConvertToFastDoubleElements(bool* has_smi_only_elements); 2460 bool ShouldConvertToFastDoubleElements(bool* has_smi_only_elements);
2461 2461
2462 // Computes the new capacity when expanding the elements of a JSObject. 2462 // Computes the new capacity when expanding the elements of a JSObject.
2463 static int NewElementsCapacity(int old_capacity) { 2463 static int NewElementsCapacity(int old_capacity) {
2464 // (old_capacity + 50%) + 16 2464 // (old_capacity + 50%) + 16
2465 return old_capacity + (old_capacity >> 1) + 16; 2465 return old_capacity + (old_capacity >> 1) + 16;
2466 } 2466 }
2467 2467
2468 // These methods do not perform access checks! 2468 // These methods do not perform access checks!
2469 AccessorPair* GetLocalPropertyAccessorPair(Name* name); 2469 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetLocalPropertyAccessorPair(
2470 AccessorPair* GetLocalElementAccessorPair(uint32_t index); 2470 Handle<JSObject> object,
2471 Handle<Name> name);
2472 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetLocalElementAccessorPair(
2473 Handle<JSObject> object,
2474 uint32_t index);
2471 2475
2472 static Handle<Object> SetFastElement(Handle<JSObject> object, uint32_t index, 2476 static Handle<Object> SetFastElement(Handle<JSObject> object, uint32_t index,
2473 Handle<Object> value, 2477 Handle<Object> value,
2474 StrictMode strict_mode, 2478 StrictMode strict_mode,
2475 bool check_prototype); 2479 bool check_prototype);
2476 2480
2477 static Handle<Object> SetOwnElement(Handle<JSObject> object, 2481 static Handle<Object> SetOwnElement(Handle<JSObject> object,
2478 uint32_t index, 2482 uint32_t index,
2479 Handle<Object> value, 2483 Handle<Object> value,
2480 StrictMode strict_mode); 2484 StrictMode strict_mode);
(...skipping 8345 matching lines...) Expand 10 before | Expand all | Expand 10 after
10826 } else { 10830 } else {
10827 value &= ~(1 << bit_position); 10831 value &= ~(1 << bit_position);
10828 } 10832 }
10829 return value; 10833 return value;
10830 } 10834 }
10831 }; 10835 };
10832 10836
10833 } } // namespace v8::internal 10837 } } // namespace v8::internal
10834 10838
10835 #endif // V8_OBJECTS_H_ 10839 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698