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

Unified Diff: src/typing.h

Issue 14990014: Collect type feedback in separate pass and store it in AST (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Consistent check-alive Created 7 years, 7 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/type-info.cc ('k') | src/typing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing.h
diff --git a/src/marking-thread.h b/src/typing.h
similarity index 63%
copy from src/marking-thread.h
copy to src/typing.h
index 9efa3af13262165972abf179defac6f83fed4ac9..d8708c2ccbe6f456ff76bdb53d7d530e4ced405e 100644
--- a/src/marking-thread.h
+++ b/src/typing.h
@@ -25,47 +25,53 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_MARKING_THREAD_H_
-#define V8_MARKING_THREAD_H_
+#ifndef V8_TYPING_H_
+#define V8_TYPING_H_
-#include "atomicops.h"
-#include "flags.h"
-#include "platform.h"
-#include "v8utils.h"
+#include "v8.h"
-#include "spaces.h"
-
-#include "heap.h"
+#include "allocation.h"
+#include "ast.h"
+#include "compiler.h"
+#include "type-info.h"
+#include "zone.h"
+#include "scopes.h"
namespace v8 {
namespace internal {
-class MarkingThread : public Thread {
- public:
- explicit MarkingThread(Isolate* isolate);
- void Run();
- void Stop();
- void StartMarking();
- void WaitForMarkingThread();
+class AstTyper: public AstVisitor {
+ public:
+ static void Type(CompilationInfo* info);
- ~MarkingThread() {
- delete start_marking_semaphore_;
- delete end_marking_semaphore_;
- delete stop_semaphore_;
+ void* operator new(size_t size, Zone* zone) {
+ return zone->New(static_cast<int>(size));
}
+ void operator delete(void* pointer, Zone* zone) { }
+ void operator delete(void* pointer) { }
+
+ DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
private:
- Isolate* isolate_;
- Heap* heap_;
- Semaphore* start_marking_semaphore_;
- Semaphore* end_marking_semaphore_;
- Semaphore* stop_semaphore_;
- volatile AtomicWord stop_thread_;
- int id_;
- static Atomic32 id_counter_;
+ explicit AstTyper(CompilationInfo* info);
+
+ CompilationInfo* info_;
+ TypeFeedbackOracle oracle_;
+
+ TypeFeedbackOracle* oracle() { return &oracle_; }
+ Zone* zone() const { return info_->zone(); }
+
+ void VisitDeclarations(ZoneList<Declaration*>* declarations);
+ void VisitStatements(ZoneList<Statement*>* statements);
+
+#define DECLARE_VISIT(type) virtual void Visit##type(type* node);
+ AST_NODE_LIST(DECLARE_VISIT)
+#undef DECLARE_VISIT
+
+ DISALLOW_COPY_AND_ASSIGN(AstTyper);
};
} } // namespace v8::internal
-#endif // V8_MARKING_THREAD_H_
+#endif // V8_TYPING_H_
« no previous file with comments | « src/type-info.cc ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698