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

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: Don't assign undefined to Handle<Script> 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') | src/isolate.cc » ('J')
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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 1311
1312 JSFunction* WasmFrame::function() const { 1312 JSFunction* WasmFrame::function() const {
1313 // TODO(clemensh): generate the right JSFunctions once per wasm function and 1313 // TODO(clemensh): generate the right JSFunctions once per wasm function and
1314 // cache them 1314 // cache them
1315 Factory* factory = isolate()->factory(); 1315 Factory* factory = isolate()->factory();
1316 Handle<JSFunction> fun = 1316 Handle<JSFunction> fun =
1317 factory->NewFunction(factory->NewStringFromAsciiChecked("<WASM>")); 1317 factory->NewFunction(factory->NewStringFromAsciiChecked("<WASM>"));
1318 return *fun; 1318 return *fun;
1319 } 1319 }
1320 1320
1321 void WasmFrame::Summarize(List<FrameSummary>* functions) const {
1322 DCHECK(functions->length() == 0);
1323 Code* code = LookupCode();
1324 int offset = static_cast<int>(pc() - code->instruction_start());
1325 AbstractCode* abstract_code = AbstractCode::cast(code);
1326 FrameSummary summary(receiver(), function(), abstract_code, offset, false);
1327 functions->Add(summary);
1328 }
1329
1321 void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); } 1330 void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); }
1322 1331
1323 Address WasmFrame::GetCallerStackPointer() const { 1332 Address WasmFrame::GetCallerStackPointer() const {
1324 return fp() + ExitFrameConstants::kCallerSPOffset; 1333 return fp() + ExitFrameConstants::kCallerSPOffset;
1325 } 1334 }
1326 1335
1327 namespace { 1336 namespace {
1328 1337
1329 1338
1330 void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo* shared, 1339 void PrintFunctionSource(StringStream* accumulator, SharedFunctionInfo* shared,
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 1756 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
1748 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 1757 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
1749 list.Add(frame, zone); 1758 list.Add(frame, zone);
1750 } 1759 }
1751 return list.ToVector(); 1760 return list.ToVector();
1752 } 1761 }
1753 1762
1754 1763
1755 } // namespace internal 1764 } // namespace internal
1756 } // namespace v8 1765 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698