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

Side by Side Diff: src/runtime.cc

Issue 32523008: Handlify JSObject::PrepareElementsForSort (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cr changes Created 7 years, 1 month 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/objects.cc ('k') | no next file » | 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 10530 matching lines...) Expand 10 before | Expand all | Expand 10 after
10541 return string; 10541 return string;
10542 } 10542 }
10543 10543
10544 10544
10545 // Moves all own elements of an object, that are below a limit, to positions 10545 // Moves all own elements of an object, that are below a limit, to positions
10546 // starting at zero. All undefined values are placed after non-undefined values, 10546 // starting at zero. All undefined values are placed after non-undefined values,
10547 // and are followed by non-existing element. Does not change the length 10547 // and are followed by non-existing element. Does not change the length
10548 // property. 10548 // property.
10549 // Returns the number of non-undefined elements collected. 10549 // Returns the number of non-undefined elements collected.
10550 RUNTIME_FUNCTION(MaybeObject*, Runtime_RemoveArrayHoles) { 10550 RUNTIME_FUNCTION(MaybeObject*, Runtime_RemoveArrayHoles) {
10551 SealHandleScope shs(isolate); 10551 HandleScope scope(isolate);
10552 ASSERT(args.length() == 2); 10552 ASSERT(args.length() == 2);
10553 CONVERT_ARG_CHECKED(JSObject, object, 0); 10553 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
10554 CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]); 10554 CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]);
10555 return object->PrepareElementsForSort(limit); 10555 return *JSObject::PrepareElementsForSort(object, limit);
10556 } 10556 }
10557 10557
10558 10558
10559 // Move contents of argument 0 (an array) to argument 1 (an array) 10559 // Move contents of argument 0 (an array) to argument 1 (an array)
10560 RUNTIME_FUNCTION(MaybeObject*, Runtime_MoveArrayContents) { 10560 RUNTIME_FUNCTION(MaybeObject*, Runtime_MoveArrayContents) {
10561 SealHandleScope shs(isolate); 10561 SealHandleScope shs(isolate);
10562 ASSERT(args.length() == 2); 10562 ASSERT(args.length() == 2);
10563 CONVERT_ARG_CHECKED(JSArray, from, 0); 10563 CONVERT_ARG_CHECKED(JSArray, from, 0);
10564 CONVERT_ARG_CHECKED(JSArray, to, 1); 10564 CONVERT_ARG_CHECKED(JSArray, to, 1);
10565 from->ValidateElements(); 10565 from->ValidateElements();
(...skipping 4300 matching lines...) Expand 10 before | Expand all | Expand 10 after
14866 // Handle last resort GC and make sure to allow future allocations 14866 // Handle last resort GC and make sure to allow future allocations
14867 // to grow the heap without causing GCs (if possible). 14867 // to grow the heap without causing GCs (if possible).
14868 isolate->counters()->gc_last_resort_from_js()->Increment(); 14868 isolate->counters()->gc_last_resort_from_js()->Increment();
14869 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14869 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14870 "Runtime::PerformGC"); 14870 "Runtime::PerformGC");
14871 } 14871 }
14872 } 14872 }
14873 14873
14874 14874
14875 } } // namespace v8::internal 14875 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698