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

Side by Side Diff: src/frames.cc

Issue 1865553004: [wasm] Do also output WASM frames on detailed stack traces (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@improve-asserts
Patch Set: Fix gcmole reported issue Created 4 years, 8 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
« no previous file with comments | « src/frames.h ('k') | src/isolate.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/frames.h" 5 #include "src/frames.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/ast/scopeinfo.h" 10 #include "src/ast/scopeinfo.h"
(...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after
1326 1326
1327 JSFunction* WasmFrame::function() const { 1327 JSFunction* WasmFrame::function() const {
1328 // TODO(clemensh): generate the right JSFunctions once per wasm function and 1328 // TODO(clemensh): generate the right JSFunctions once per wasm function and
1329 // cache them 1329 // cache them
1330 Factory* factory = isolate()->factory(); 1330 Factory* factory = isolate()->factory();
1331 Handle<JSFunction> fun = 1331 Handle<JSFunction> fun =
1332 factory->NewFunction(factory->NewStringFromAsciiChecked("<WASM>")); 1332 factory->NewFunction(factory->NewStringFromAsciiChecked("<WASM>"));
1333 return *fun; 1333 return *fun;
1334 } 1334 }
1335 1335
1336 void WasmFrame::Summarize(List<FrameSummary>* functions) const {
1337 DCHECK(functions->length() == 0);
1338 Code* code = LookupCode();
1339 int offset = static_cast<int>(pc() - code->instruction_start());
1340 AbstractCode* abstract_code = AbstractCode::cast(code);
1341 Handle<JSFunction> fun(function(), isolate());
1342 FrameSummary summary(receiver(), *fun, abstract_code, offset, false);
1343 functions->Add(summary);
1344 }
1345
1336 void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); } 1346 void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); }
1337 1347
1338 Address WasmFrame::GetCallerStackPointer() const { 1348 Address WasmFrame::GetCallerStackPointer() const {
1339 return fp() + ExitFrameConstants::kCallerSPOffset; 1349 return fp() + ExitFrameConstants::kCallerSPOffset;
1340 } 1350 }
1341 1351
1342 namespace { 1352 namespace {
1343 1353
1344 1354
1345 void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo* shared, 1355 void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo* shared,
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1773 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1764 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1774 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1765 list.Add(frame, zone); 1775 list.Add(frame, zone);
1766 } 1776 }
1767 return list.ToVector(); 1777 return list.ToVector();
1768 } 1778 }
1769 1779
1770 1780
1771 } // namespace internal 1781 } // namespace internal
1772 } // namespace v8 1782 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698