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

Unified Diff: src/liveedit.h

Issue 2943002: Reimplement stack manipulations for LiveEdit (Closed)
Patch Set: follow codereview Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | src/liveedit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.h
diff --git a/src/liveedit.h b/src/liveedit.h
index d8e2a1375b52b862ea8ba23a611163378a6192c2..c2e7502d1a5177808a506b3619b0efe846236286 100644
--- a/src/liveedit.h
+++ b/src/liveedit.h
@@ -83,8 +83,15 @@ class LiveEdit : AllStatic {
static void WrapSharedFunctionInfos(Handle<JSArray> array);
+ // Replaces function code. The function mustn't be running anywhere on stack.
+ // The only exception is when stack_manipulation data is provided.
+ // The stack manipulations are performed in this method. It is expected that
+ // as a result the function gets restarted.
+ // \param stack_manipulation_data possibly null handle to stack manipulations
+ // that are to be performed
static Object* ReplaceFunctionCode(Handle<JSArray> new_compile_info_array,
- Handle<JSArray> shared_info_array);
+ Handle<JSArray> shared_info_array,
+ Handle<ByteArray> stack_manipulation_data);
// Updates script field in FunctionSharedInfo.
static void SetFunctionScript(Handle<JSValue> function_wrapper,
@@ -106,22 +113,20 @@ class LiveEdit : AllStatic {
Handle<JSValue> orig_function_shared,
Handle<JSValue> subst_function_shared);
- // Checks listed functions on stack and return array with corresponding
- // FunctionPatchabilityStatus statuses; extra array element may
- // contain general error message. Modifies the current stack and
- // has restart the lowest found frames and drops all other frames above
- // if possible and if do_drop is true.
- static Handle<JSArray> CheckAndDropActivations(
- Handle<JSArray> shared_info_array, bool do_drop);
-
- // A copy of this is in liveedit-debugger.js.
- enum FunctionPatchabilityStatus {
- FUNCTION_AVAILABLE_FOR_PATCH = 1,
- FUNCTION_BLOCKED_ON_ACTIVE_STACK = 2,
- FUNCTION_BLOCKED_ON_OTHER_STACK = 3,
- FUNCTION_BLOCKED_UNDER_NATIVE_CODE = 4,
- FUNCTION_REPLACED_ON_ACTIVE_STACK = 5
- };
+ // Checks the listed functions against the current stacks and plans
+ // possible stack manipulations: all frames running listed functions
+ // must be removed (dropped) from stack.
+ // \param shared_info_array contains array of wrapped shared function
+ // infos or undefined elements
+ // \return array-packed StackManipulationInfo structure
+ static Handle<JSArray> CheckActivations(Handle<JSArray> shared_info_array);
+
+ // Returns whether the frame is paused at function restarter code.
+ static bool IsAtFrameResetPatch(const JavaScriptFrame*);
+
+ // Returns pointer to entry of function restarted code (the code must
+ // be patched).
+ static Address GetRestarterPatchEntryPoint(Code* code);
// Compares 2 strings line-by-line and returns diff in form of array of
// triplets (pos1, pos1_end, pos2_end) describing list of diff chunks.
@@ -167,4 +172,4 @@ class Comparator {
} } // namespace v8::internal
-#endif /* V*_LIVEEDIT_H_ */
+#endif /* V8_LIVEEDIT_H_ */
« no previous file with comments | « src/ia32/debug-ia32.cc ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698