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

Unified Diff: src/frames.cc

Issue 2069423002: [builtins] Introduce a proper BUILTIN frame type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix clobbered reg in mips Created 4 years, 6 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/frames.h ('k') | src/frames-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index ba9ec7913a519d7317c2500a83cc4d31c677318a..20776f6b1b37613ecfc1637b737677b500ccebe7 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -454,10 +454,14 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
if (code_obj->is_interpreter_trampoline_builtin()) {
return INTERPRETED;
}
- // We treat frames for BUILTIN Code objects as OptimizedFrame for now
- // (all the builtins with JavaScript linkage are actually generated
- // with TurboFan currently, so this is sound).
- return OPTIMIZED;
+ if (code_obj->is_turbofanned()) {
+ // TODO(bmeurer): We treat frames for BUILTIN Code objects as
+ // OptimizedFrame for now (all the builtins with JavaScript
+ // linkage are actually generated with TurboFan currently, so
+ // this is sound).
+ return OPTIMIZED;
+ }
+ return BUILTIN;
case Code::FUNCTION:
return JAVA_SCRIPT;
case Code::OPTIMIZED_FUNCTION:
@@ -692,6 +696,7 @@ void StandardFrame::IterateCompiledFrame(ObjectVisitor* v) const {
case JAVA_SCRIPT:
case OPTIMIZED:
case INTERPRETED:
+ case BUILTIN:
// These frame types have a context, but they are actually stored
// in the place on the stack that one finds the frame type.
UNREACHABLE();
@@ -1289,11 +1294,6 @@ int ArgumentsAdaptorFrame::GetNumberOfIncomingArguments() const {
return Smi::cast(GetExpression(0))->value();
}
-
-Address ArgumentsAdaptorFrame::GetCallerStackPointer() const {
- return fp() + StandardFrameConstants::kCallerSPOffset;
-}
-
int ArgumentsAdaptorFrame::GetLength(Address fp) {
const int offset = ArgumentsAdaptorFrameConstants::kLengthOffset;
return Smi::cast(Memory::Object_at(fp + offset))->value();
@@ -1304,6 +1304,15 @@ Code* ArgumentsAdaptorFrame::unchecked_code() const {
Builtins::kArgumentsAdaptorTrampoline);
}
+void BuiltinFrame::Print(StringStream* accumulator, PrintMode mode,
+ int index) const {
+ // TODO(bmeurer)
+}
+
+int BuiltinFrame::GetNumberOfIncomingArguments() const {
+ return Smi::cast(GetExpression(0))->value();
+}
+
Address InternalFrame::GetCallerStackPointer() const {
// Internal frames have no arguments. The stack pointer of the
// caller is at a fixed offset from the frame pointer.
« no previous file with comments | « src/frames.h ('k') | src/frames-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698