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

Unified Diff: src/mirror-debugger.js

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mirror-debugger.js
diff --git a/src/mirror-debugger.js b/src/mirror-debugger.js
index e1fd872f3b980f0224bb3b1741989ea3dcea2718..28b8fc81baa2c067022dfeb67c03303ee3767c29 100644
--- a/src/mirror-debugger.js
+++ b/src/mirror-debugger.js
@@ -1509,6 +1509,11 @@ FrameDetails.prototype.scopeCount = function() {
};
+FrameDetails.prototype.stepInPositionsImpl = function() {
+ return %GetStepInPositions(this.break_id_, this.frameId());
+};
+
+
/**
* Mirror object for stack frames.
* @param {number} break_id The break id in the VM for which this frame is
@@ -1669,15 +1674,55 @@ FrameMirror.prototype.scope = function(index) {
};
+FrameMirror.prototype.stepInPositions = function() {
+ var script = this.func().script();
+ var funcOffset = this.func().sourcePosition_();
+
+ var stepInRaw = this.details_.stepInPositionsImpl();
+ var result = [];
+ if (stepInRaw) {
+ for (var i = 0; i < stepInRaw.length; i++) {
+ var posStruct = {};
+ var offset = script.locationFromPosition(funcOffset + stepInRaw[i],
+ true);
+ serializeLocationFields(offset, posStruct);
+ var item = {
+ position: posStruct
+ };
+ result.push(item);
+ }
+ }
+
+ return result;
+};
+
+
FrameMirror.prototype.evaluate = function(source, disable_break,
opt_context_object) {
- var result = %DebugEvaluate(this.break_id_,
- this.details_.frameId(),
- this.details_.inlinedFrameIndex(),
- source,
- Boolean(disable_break),
- opt_context_object);
- return MakeMirror(result);
+ var result_array = %DebugEvaluate(this.break_id_,
+ this.details_.frameId(),
+ this.details_.inlinedFrameIndex(),
+ source,
+ Boolean(disable_break),
+ opt_context_object);
+ // Silently ignore local variables changes if the frame is optimized.
+ if (!this.isOptimizedFrame()) {
+ var local_scope_on_stack = result_array[1];
+ var local_scope_modifed = result_array[2];
+ for (var n in local_scope_modifed) {
+ var value_on_stack = local_scope_on_stack[n];
+ var value_modifed = local_scope_modifed[n];
+ if (value_on_stack !== value_modifed) {
+ %SetScopeVariableValue(this.break_id_,
+ this.details_.frameId(),
+ this.details_.inlinedFrameIndex(),
+ 0,
+ n,
+ value_modifed);
+ }
+ }
+ }
+ return MakeMirror(result_array[0]);
};
« no previous file with comments | « src/mips/stub-cache-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698