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

Side by Side Diff: src/runtime.cc

Issue 6017008: Add fine-grained diff implementation to LiveEdit engine. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge Created 9 years, 11 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/runtime.h ('k') | test/mjsunit/debug-liveedit-diff.js » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 10316 matching lines...) Expand 10 before | Expand all | Expand 10 after
10327 // LiveEdit::FunctionPatchabilityStatus type. 10327 // LiveEdit::FunctionPatchabilityStatus type.
10328 static MaybeObject* Runtime_LiveEditCheckAndDropActivations(Arguments args) { 10328 static MaybeObject* Runtime_LiveEditCheckAndDropActivations(Arguments args) {
10329 ASSERT(args.length() == 2); 10329 ASSERT(args.length() == 2);
10330 HandleScope scope; 10330 HandleScope scope;
10331 CONVERT_ARG_CHECKED(JSArray, shared_array, 0); 10331 CONVERT_ARG_CHECKED(JSArray, shared_array, 0);
10332 CONVERT_BOOLEAN_CHECKED(do_drop, args[1]); 10332 CONVERT_BOOLEAN_CHECKED(do_drop, args[1]);
10333 10333
10334 return *LiveEdit::CheckAndDropActivations(shared_array, do_drop); 10334 return *LiveEdit::CheckAndDropActivations(shared_array, do_drop);
10335 } 10335 }
10336 10336
10337 // Compares 2 strings line-by-line and returns diff in form of JSArray of 10337 // Compares 2 strings line-by-line, then token-wise and returns diff in form
10338 // triplets (pos1, pos1_end, pos2_end) describing list of diff chunks. 10338 // of JSArray of triplets (pos1, pos1_end, pos2_end) describing list
10339 static MaybeObject* Runtime_LiveEditCompareStringsLinewise(Arguments args) { 10339 // of diff chunks.
10340 static MaybeObject* Runtime_LiveEditCompareStrings(Arguments args) {
10340 ASSERT(args.length() == 2); 10341 ASSERT(args.length() == 2);
10341 HandleScope scope; 10342 HandleScope scope;
10342 CONVERT_ARG_CHECKED(String, s1, 0); 10343 CONVERT_ARG_CHECKED(String, s1, 0);
10343 CONVERT_ARG_CHECKED(String, s2, 1); 10344 CONVERT_ARG_CHECKED(String, s2, 1);
10344 10345
10345 return *LiveEdit::CompareStringsLinewise(s1, s2); 10346 return *LiveEdit::CompareStrings(s1, s2);
10346 } 10347 }
10347 10348
10348 10349
10349 10350
10350 // A testing entry. Returns statement position which is the closest to 10351 // A testing entry. Returns statement position which is the closest to
10351 // source_position. 10352 // source_position.
10352 static MaybeObject* Runtime_GetFunctionCodePositionFromSource(Arguments args) { 10353 static MaybeObject* Runtime_GetFunctionCodePositionFromSource(Arguments args) {
10353 ASSERT(args.length() == 2); 10354 ASSERT(args.length() == 2);
10354 HandleScope scope; 10355 HandleScope scope;
10355 CONVERT_ARG_CHECKED(JSFunction, function, 0); 10356 CONVERT_ARG_CHECKED(JSFunction, function, 0);
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
10828 } else { 10829 } else {
10829 // Handle last resort GC and make sure to allow future allocations 10830 // Handle last resort GC and make sure to allow future allocations
10830 // to grow the heap without causing GCs (if possible). 10831 // to grow the heap without causing GCs (if possible).
10831 Counters::gc_last_resort_from_js.Increment(); 10832 Counters::gc_last_resort_from_js.Increment();
10832 Heap::CollectAllGarbage(false); 10833 Heap::CollectAllGarbage(false);
10833 } 10834 }
10834 } 10835 }
10835 10836
10836 10837
10837 } } // namespace v8::internal 10838 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | test/mjsunit/debug-liveedit-diff.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698