OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 9738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9749 // For array of SharedFunctionInfo's (each wrapped in JSValue) | 9749 // For array of SharedFunctionInfo's (each wrapped in JSValue) |
9750 // checks that none of them have activations on stacks (of any thread). | 9750 // checks that none of them have activations on stacks (of any thread). |
9751 // Returns array of the same length with corresponding results of | 9751 // Returns array of the same length with corresponding results of |
9752 // LiveEdit::FunctionPatchabilityStatus type. | 9752 // LiveEdit::FunctionPatchabilityStatus type. |
9753 static Object* Runtime_LiveEditCheckAndDropActivations(Arguments args) { | 9753 static Object* Runtime_LiveEditCheckAndDropActivations(Arguments args) { |
9754 ASSERT(args.length() == 2); | 9754 ASSERT(args.length() == 2); |
9755 HandleScope scope; | 9755 HandleScope scope; |
9756 CONVERT_ARG_CHECKED(JSArray, shared_array, 0); | 9756 CONVERT_ARG_CHECKED(JSArray, shared_array, 0); |
9757 CONVERT_BOOLEAN_CHECKED(do_drop, args[1]); | 9757 CONVERT_BOOLEAN_CHECKED(do_drop, args[1]); |
9758 | 9758 |
9759 | |
9760 return *LiveEdit::CheckAndDropActivations(shared_array, do_drop); | 9759 return *LiveEdit::CheckAndDropActivations(shared_array, do_drop); |
9761 } | 9760 } |
9762 | 9761 |
| 9762 // Compares 2 strings line-by-line and returns diff in form of JSArray of |
| 9763 // triplets (pos1, len1, len2) describing list of diff chunks. |
| 9764 static Object* Runtime_LiveEditCompareStringsLinewise(Arguments args) { |
| 9765 ASSERT(args.length() == 2); |
| 9766 HandleScope scope; |
| 9767 CONVERT_ARG_CHECKED(String, s1, 0); |
| 9768 CONVERT_ARG_CHECKED(String, s2, 1); |
| 9769 |
| 9770 return *LiveEdit::CompareStringsLinewise(s1, s2); |
| 9771 } |
| 9772 |
| 9773 |
9763 | 9774 |
9764 // A testing entry. Returns statement position which is the closest to | 9775 // A testing entry. Returns statement position which is the closest to |
9765 // source_position. | 9776 // source_position. |
9766 static Object* Runtime_GetFunctionCodePositionFromSource(Arguments args) { | 9777 static Object* Runtime_GetFunctionCodePositionFromSource(Arguments args) { |
9767 ASSERT(args.length() == 2); | 9778 ASSERT(args.length() == 2); |
9768 HandleScope scope; | 9779 HandleScope scope; |
9769 CONVERT_ARG_CHECKED(JSFunction, function, 0); | 9780 CONVERT_ARG_CHECKED(JSFunction, function, 0); |
9770 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]); | 9781 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]); |
9771 | 9782 |
9772 Handle<Code> code(function->code()); | 9783 Handle<Code> code(function->code()); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10182 } else { | 10193 } else { |
10183 // Handle last resort GC and make sure to allow future allocations | 10194 // Handle last resort GC and make sure to allow future allocations |
10184 // to grow the heap without causing GCs (if possible). | 10195 // to grow the heap without causing GCs (if possible). |
10185 Counters::gc_last_resort_from_js.Increment(); | 10196 Counters::gc_last_resort_from_js.Increment(); |
10186 Heap::CollectAllGarbage(false); | 10197 Heap::CollectAllGarbage(false); |
10187 } | 10198 } |
10188 } | 10199 } |
10189 | 10200 |
10190 | 10201 |
10191 } } // namespace v8::internal | 10202 } } // namespace v8::internal |
OLD | NEW |