Index: src/typing-reset.cc |
diff --git a/src/typing-reset.cc b/src/typing-reset.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b3b3aec573ecfd35bdeae93e3a4905598aedb087 |
--- /dev/null |
+++ b/src/typing-reset.cc |
@@ -0,0 +1,31 @@ |
+// Copyright 2015 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "src/v8.h" |
+ |
+#include "src/typing-reset.h" |
+ |
+#include "src/ast.h" |
+#include "src/codegen.h" |
+#include "src/scopes.h" |
+ |
+namespace v8 { |
+namespace internal { |
+ |
+ |
+TypingReseter::TypingReseter(CompilationInfo* info) |
+ : AstExpressionVisitor(info), info_(info) {} |
+ |
+ |
+void TypingReseter::Run(CompilationInfo* info) { |
+ TypingReseter* visitor = new (info->zone()) TypingReseter(info); |
rossberg
2015/08/20 16:34:26
No need to heap-allocate the visitor, AFAICT.
bradn
2015/08/20 21:35:47
Ok, changed round.
By the way, a terminology ques
rossberg
2015/08/21 12:36:51
I was just being sloppy. Meant heap-allocated as o
|
+ visitor->VisitAll(); |
+} |
+ |
+ |
+void TypingReseter::VisitExpression(Expression* expression) { |
+ expression->set_bounds(Bounds::Unbounded(info_->zone())); |
+} |
+} |
+} // namespace v8::internal |