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

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: update test Created 9 years, 12 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
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 10310 matching lines...) Expand 10 before | Expand all | Expand 10 after
10321 // LiveEdit::FunctionPatchabilityStatus type. 10321 // LiveEdit::FunctionPatchabilityStatus type.
10322 static MaybeObject* Runtime_LiveEditCheckAndDropActivations(Arguments args) { 10322 static MaybeObject* Runtime_LiveEditCheckAndDropActivations(Arguments args) {
10323 ASSERT(args.length() == 2); 10323 ASSERT(args.length() == 2);
10324 HandleScope scope; 10324 HandleScope scope;
10325 CONVERT_ARG_CHECKED(JSArray, shared_array, 0); 10325 CONVERT_ARG_CHECKED(JSArray, shared_array, 0);
10326 CONVERT_BOOLEAN_CHECKED(do_drop, args[1]); 10326 CONVERT_BOOLEAN_CHECKED(do_drop, args[1]);
10327 10327
10328 return *LiveEdit::CheckAndDropActivations(shared_array, do_drop); 10328 return *LiveEdit::CheckAndDropActivations(shared_array, do_drop);
10329 } 10329 }
10330 10330
10331 // Compares 2 strings line-by-line and returns diff in form of JSArray of 10331 // Compares 2 strings line-by-line, then token-wise and returns diff in form
10332 // triplets (pos1, pos1_end, pos2_end) describing list of diff chunks. 10332 // of JSArray of triplets (pos1, pos1_end, pos2_end) describing list
10333 static MaybeObject* Runtime_LiveEditCompareStringsLinewise(Arguments args) { 10333 // of diff chunks.
10334 static MaybeObject* Runtime_LiveEditCompareStrings(Arguments args) {
10334 ASSERT(args.length() == 2); 10335 ASSERT(args.length() == 2);
10335 HandleScope scope; 10336 HandleScope scope;
10336 CONVERT_ARG_CHECKED(String, s1, 0); 10337 CONVERT_ARG_CHECKED(String, s1, 0);
10337 CONVERT_ARG_CHECKED(String, s2, 1); 10338 CONVERT_ARG_CHECKED(String, s2, 1);
10338 10339
10339 return *LiveEdit::CompareStringsLinewise(s1, s2); 10340 return *LiveEdit::CompareStrings(s1, s2);
10340 } 10341 }
10341 10342
10342 10343
10343 10344
10344 // A testing entry. Returns statement position which is the closest to 10345 // A testing entry. Returns statement position which is the closest to
10345 // source_position. 10346 // source_position.
10346 static MaybeObject* Runtime_GetFunctionCodePositionFromSource(Arguments args) { 10347 static MaybeObject* Runtime_GetFunctionCodePositionFromSource(Arguments args) {
10347 ASSERT(args.length() == 2); 10348 ASSERT(args.length() == 2);
10348 HandleScope scope; 10349 HandleScope scope;
10349 CONVERT_ARG_CHECKED(JSFunction, function, 0); 10350 CONVERT_ARG_CHECKED(JSFunction, function, 0);
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
10796 } else { 10797 } else {
10797 // Handle last resort GC and make sure to allow future allocations 10798 // Handle last resort GC and make sure to allow future allocations
10798 // to grow the heap without causing GCs (if possible). 10799 // to grow the heap without causing GCs (if possible).
10799 Counters::gc_last_resort_from_js.Increment(); 10800 Counters::gc_last_resort_from_js.Increment();
10800 Heap::CollectAllGarbage(false); 10801 Heap::CollectAllGarbage(false);
10801 } 10802 }
10802 } 10803 }
10803 10804
10804 10805
10805 } } // namespace v8::internal 10806 } } // namespace v8::internal
OLDNEW
« src/liveedit.cc ('K') | « 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