Skip to content

Commit e404670

Browse files
alexkozyCommit Bot
authored andcommitted
[debug] removed most debugger js
Removed most of mirrors.js and debug.js. Further steps: - migrate liveedit.js to native, - remove debugger context. R=yangguo@chromium.org TBR=leszeks@chromium.org Bug: v8:5530 Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I291ef20ef3c63a424d32e3e0c9d0962a6ca382d1 Reviewed-on: https://chromium-review.googlesource.com/1081176 Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#53480}
1 parent 5cb11a1 commit e404670

39 files changed

Lines changed: 1285 additions & 7594 deletions

BUILD.gn

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,6 @@ action("js2c") {
649649
"src/js/prologue.js",
650650
"src/js/array.js",
651651
"src/js/typedarray.js",
652-
"src/debug/mirrors.js",
653-
"src/debug/debug.js",
654652
"src/debug/liveedit.js",
655653
]
656654

@@ -2259,7 +2257,6 @@ v8_source_set("v8_base") {
22592257
"src/runtime/runtime-dataview.cc",
22602258
"src/runtime/runtime-date.cc",
22612259
"src/runtime/runtime-debug.cc",
2262-
"src/runtime/runtime-error.cc",
22632260
"src/runtime/runtime-forin.cc",
22642261
"src/runtime/runtime-function.cc",
22652262
"src/runtime/runtime-futex.cc",

src/compiler/js-intrinsic-lowering.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
5555
return ReduceIsInstanceType(node, JS_TYPED_ARRAY_TYPE);
5656
case Runtime::kInlineIsJSProxy:
5757
return ReduceIsInstanceType(node, JS_PROXY_TYPE);
58-
case Runtime::kInlineIsJSMap:
59-
return ReduceIsInstanceType(node, JS_MAP_TYPE);
60-
case Runtime::kInlineIsJSSet:
61-
return ReduceIsInstanceType(node, JS_SET_TYPE);
6258
case Runtime::kInlineIsJSWeakMap:
6359
return ReduceIsInstanceType(node, JS_WEAK_MAP_TYPE);
6460
case Runtime::kInlineIsJSWeakSet:

src/compiler/linkage.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ bool Linkage::NeedsFrameStateInput(Runtime::FunctionId function) {
158158
case Runtime::kAbort:
159159
case Runtime::kAllocateInTargetSpace:
160160
case Runtime::kCreateIterResultObject:
161-
case Runtime::kGeneratorGetContinuation:
162161
case Runtime::kIncBlockCounter:
163162
case Runtime::kIsFunction:
164163
case Runtime::kNewClosure:
@@ -185,8 +184,6 @@ bool Linkage::NeedsFrameStateInput(Runtime::FunctionId function) {
185184
case Runtime::kInlineGeneratorGetResumeMode:
186185
case Runtime::kInlineCreateJSGeneratorObject:
187186
case Runtime::kInlineIsArray:
188-
case Runtime::kInlineIsJSMap:
189-
case Runtime::kInlineIsJSSet:
190187
case Runtime::kInlineIsJSWeakMap:
191188
case Runtime::kInlineIsJSWeakSet:
192189
case Runtime::kInlineIsJSReceiver:

src/debug/debug-evaluate.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,8 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
332332
V(IsArray) \
333333
V(IsDate) \
334334
V(IsFunction) \
335-
V(IsJSMap) \
336335
V(IsJSProxy) \
337336
V(IsJSReceiver) \
338-
V(IsJSSet) \
339337
V(IsJSWeakMap) \
340338
V(IsJSWeakSet) \
341339
V(IsRegExp) \

src/debug/debug-frames.cc

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -181,32 +181,5 @@ bool FrameInspector::ParameterIsShadowedByContextLocal(
181181
return ScopeInfo::ContextSlotIndex(info, parameter_name, &mode, &init_flag,
182182
&maybe_assigned_flag) != -1;
183183
}
184-
185-
SaveContext* DebugFrameHelper::FindSavedContextForFrame(Isolate* isolate,
186-
StandardFrame* frame) {
187-
SaveContext* save = isolate->save_context();
188-
while (save != nullptr && !save->IsBelowFrame(frame)) {
189-
save = save->prev();
190-
}
191-
DCHECK(save != nullptr);
192-
return save;
193-
}
194-
195-
int DebugFrameHelper::FindIndexedNonNativeFrame(StackTraceFrameIterator* it,
196-
int index) {
197-
int count = -1;
198-
for (; !it->done(); it->Advance()) {
199-
std::vector<FrameSummary> frames;
200-
it->frame()->Summarize(&frames);
201-
for (size_t i = frames.size(); i != 0; i--) {
202-
// Omit functions from native and extension scripts.
203-
if (!frames[i - 1].is_subject_to_debugging()) continue;
204-
if (++count == index) return static_cast<int>(i) - 1;
205-
}
206-
}
207-
return -1;
208-
}
209-
210-
211184
} // namespace internal
212185
} // namespace v8

src/debug/debug-frames.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,6 @@ class FrameInspector {
7171

7272
DISALLOW_COPY_AND_ASSIGN(FrameInspector);
7373
};
74-
75-
76-
class DebugFrameHelper : public AllStatic {
77-
public:
78-
static SaveContext* FindSavedContextForFrame(Isolate* isolate,
79-
StandardFrame* frame);
80-
// Advances the iterator to the frame that matches the index and returns the
81-
// inlined frame index, or -1 if not found. Skips native JS functions.
82-
static int FindIndexedNonNativeFrame(StackTraceFrameIterator* it, int index);
83-
84-
// Helper functions for wrapping and unwrapping stack frame ids.
85-
static Smi* WrapFrameId(StackFrame::Id id) {
86-
DCHECK(IsAligned(OffsetFrom(id), static_cast<intptr_t>(4)));
87-
return Smi::FromInt(id >> 2);
88-
}
89-
90-
static StackFrame::Id UnwrapFrameId(int wrapped) {
91-
return static_cast<StackFrame::Id>(wrapped << 2);
92-
}
93-
};
94-
9574
} // namespace internal
9675
} // namespace v8
9776

src/debug/debug-interface.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,9 @@ class DebugDelegate {
147147
// |inspector_break_points_hit| contains id of breakpoints installed with
148148
// debug::Script::SetBreakpoint API.
149149
virtual void BreakProgramRequested(
150-
v8::Local<v8::Context> paused_context, v8::Local<v8::Object> exec_state,
150+
v8::Local<v8::Context> paused_context,
151151
const std::vector<debug::BreakpointId>& inspector_break_points_hit) {}
152152
virtual void ExceptionThrown(v8::Local<v8::Context> paused_context,
153-
v8::Local<v8::Object> exec_state,
154153
v8::Local<v8::Value> exception,
155154
v8::Local<v8::Value> promise, bool is_uncaught) {
156155
}

0 commit comments

Comments
 (0)