Index: src/frames.cc |
diff --git a/src/frames.cc b/src/frames.cc |
index 145f50f49ee579e17d5942bc0d28c3d9aeb46b39..4f4704c555276a53082a5465839ef77868425e43 100644 |
--- a/src/frames.cc |
+++ b/src/frames.cc |
@@ -451,10 +451,14 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator, |
switch (code_obj->kind()) { |
case Code::BUILTIN: |
if (marker->IsSmi()) break; |
- // 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; |
Jarin
2016/04/20 11:47:57
What would go wrong if you also optimized function
|
+ } |
+ return BUILTIN; |
case Code::FUNCTION: |
return JAVA_SCRIPT; |
case Code::OPTIMIZED_FUNCTION: |
@@ -702,6 +706,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(); |
@@ -1280,11 +1285,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(); |
@@ -1295,6 +1295,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. |