| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 11554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11565 | 11565 |
| 11566 // Compares 2 strings line-by-line, then token-wise and returns diff in form | 11566 // Compares 2 strings line-by-line, then token-wise and returns diff in form |
| 11567 // of JSArray of triplets (pos1, pos1_end, pos2_end) describing list | 11567 // of JSArray of triplets (pos1, pos1_end, pos2_end) describing list |
| 11568 // of diff chunks. | 11568 // of diff chunks. |
| 11569 RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditCompareStrings) { | 11569 RUNTIME_FUNCTION(MaybeObject*, Runtime_LiveEditCompareStrings) { |
| 11570 ASSERT(args.length() == 2); | 11570 ASSERT(args.length() == 2); |
| 11571 HandleScope scope(isolate); | 11571 HandleScope scope(isolate); |
| 11572 CONVERT_ARG_CHECKED(String, s1, 0); | 11572 CONVERT_ARG_CHECKED(String, s1, 0); |
| 11573 CONVERT_ARG_CHECKED(String, s2, 1); | 11573 CONVERT_ARG_CHECKED(String, s2, 1); |
| 11574 | 11574 |
| 11575 return *LiveEdit::CompareStrings(s1, s2); | 11575 return LiveEdit::CompareStrings(s1, s2); |
| 11576 } | 11576 } |
| 11577 | 11577 |
| 11578 | 11578 |
| 11579 // A testing entry. Returns statement position which is the closest to | 11579 // A testing entry. Returns statement position which is the closest to |
| 11580 // source_position. | 11580 // source_position. |
| 11581 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFunctionCodePositionFromSource) { | 11581 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFunctionCodePositionFromSource) { |
| 11582 ASSERT(args.length() == 2); | 11582 ASSERT(args.length() == 2); |
| 11583 HandleScope scope(isolate); | 11583 HandleScope scope(isolate); |
| 11584 CONVERT_ARG_CHECKED(JSFunction, function, 0); | 11584 CONVERT_ARG_CHECKED(JSFunction, function, 0); |
| 11585 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]); | 11585 CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]); |
| (...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12325 } else { | 12325 } else { |
| 12326 // Handle last resort GC and make sure to allow future allocations | 12326 // Handle last resort GC and make sure to allow future allocations |
| 12327 // to grow the heap without causing GCs (if possible). | 12327 // to grow the heap without causing GCs (if possible). |
| 12328 isolate->counters()->gc_last_resort_from_js()->Increment(); | 12328 isolate->counters()->gc_last_resort_from_js()->Increment(); |
| 12329 isolate->heap()->CollectAllGarbage(false); | 12329 isolate->heap()->CollectAllGarbage(false); |
| 12330 } | 12330 } |
| 12331 } | 12331 } |
| 12332 | 12332 |
| 12333 | 12333 |
| 12334 } } // namespace v8::internal | 12334 } } // namespace v8::internal |
| OLD | NEW |