Index: src/ast-numbering.cc |
diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc |
index c2dd70e1bbe75086a0de3e9097aac6d2b3dc49c1..605fedd5905dc75870c663751a3f4c94de77d919 100644 |
--- a/src/ast-numbering.cc |
+++ b/src/ast-numbering.cc |
@@ -559,6 +559,14 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { |
DisableCrankshaft(kContextAllocatedArguments); |
} |
+ // TODO(aperez): Add support in Crankshaft for arrow functions. |
wingo
2015/01/15 10:09:05
Let's file a bug for the tasks needed in Crankshaf
aperez
2015/01/15 16:58:03
Done.
|
+ if (scope->is_arrow_scope() && scope->uses_this()) { |
+ DisableCrankshaft(kCapturedThis); |
+ } |
+ if (scope->is_function_scope() && scope->inner_uses_this()) { |
+ DisableCrankshaft(kCapturedThis); |
+ } |
+ |
VisitDeclarations(scope->declarations()); |
if (scope->is_function_scope() && scope->function() != NULL) { |
// Visit the name of the named function expression. |