Chromium Code Reviews| 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) { |
|
Sven Panne
2013/05/16 11:58:05
What is the reason for the new/delete definitions
rossberg
2013/05/17 10:59:50
This is simply analogous to the graph builder. Not
|
| + 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_ |