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

Side by Side Diff: src/runtime.cc

Issue 222413003: Merged r19848 into 3.24 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.24
Patch Set: 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/objects.cc ('k') | src/version.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 10521 matching lines...) Expand 10 before | Expand all | Expand 10 after
10532 } 10532 }
10533 return string; 10533 return string;
10534 } 10534 }
10535 10535
10536 10536
10537 // Moves all own elements of an object, that are below a limit, to positions 10537 // Moves all own elements of an object, that are below a limit, to positions
10538 // starting at zero. All undefined values are placed after non-undefined values, 10538 // starting at zero. All undefined values are placed after non-undefined values,
10539 // and are followed by non-existing element. Does not change the length 10539 // and are followed by non-existing element. Does not change the length
10540 // property. 10540 // property.
10541 // Returns the number of non-undefined elements collected. 10541 // Returns the number of non-undefined elements collected.
10542 // Returns -1 if hole removal is not supported by this method.
10542 RUNTIME_FUNCTION(MaybeObject*, Runtime_RemoveArrayHoles) { 10543 RUNTIME_FUNCTION(MaybeObject*, Runtime_RemoveArrayHoles) {
10543 HandleScope scope(isolate); 10544 HandleScope scope(isolate);
10544 ASSERT(args.length() == 2); 10545 ASSERT(args.length() == 2);
10545 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); 10546 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
10546 CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]); 10547 CONVERT_NUMBER_CHECKED(uint32_t, limit, Uint32, args[1]);
10547 return *JSObject::PrepareElementsForSort(object, limit); 10548 return *JSObject::PrepareElementsForSort(object, limit);
10548 } 10549 }
10549 10550
10550 10551
10551 // Move contents of argument 0 (an array) to argument 1 (an array) 10552 // Move contents of argument 0 (an array) to argument 1 (an array)
(...skipping 4370 matching lines...) Expand 10 before | Expand all | Expand 10 after
14922 // Handle last resort GC and make sure to allow future allocations 14923 // Handle last resort GC and make sure to allow future allocations
14923 // to grow the heap without causing GCs (if possible). 14924 // to grow the heap without causing GCs (if possible).
14924 isolate->counters()->gc_last_resort_from_js()->Increment(); 14925 isolate->counters()->gc_last_resort_from_js()->Increment();
14925 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14926 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14926 "Runtime::PerformGC"); 14927 "Runtime::PerformGC");
14927 } 14928 }
14928 } 14929 }
14929 14930
14930 14931
14931 } } // namespace v8::internal 14932 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698