From 8e6d978bba0f3c52b297573157e4547ed9d291d1 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 16 Oct 2009 14:05:12 +0200 Subject: Upgrade v8 to 1.3.16 and apply my V8 patch for debugging. --- deps/v8/src/compiler.cc | 303 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 300 insertions(+), 3 deletions(-) (limited to 'deps/v8/src/compiler.cc') diff --git a/deps/v8/src/compiler.cc b/deps/v8/src/compiler.cc index 6ba7a9a9d..2e55683b2 100644 --- a/deps/v8/src/compiler.cc +++ b/deps/v8/src/compiler.cc @@ -32,6 +32,7 @@ #include "compilation-cache.h" #include "compiler.h" #include "debug.h" +#include "fast-codegen.h" #include "oprofile-agent.h" #include "rewriter.h" #include "scopes.h" @@ -40,6 +41,29 @@ namespace v8 { namespace internal { + +class CodeGenSelector: public AstVisitor { + public: + enum CodeGenTag { NORMAL, FAST }; + + CodeGenSelector() : has_supported_syntax_(true) {} + + CodeGenTag Select(FunctionLiteral* fun); + + private: + void VisitStatements(ZoneList* stmts); + + // AST node visit functions. +#define DECLARE_VISIT(type) virtual void Visit##type(type* node); + AST_NODE_LIST(DECLARE_VISIT) +#undef DECLARE_VISIT + + bool has_supported_syntax_; + + DISALLOW_COPY_AND_ASSIGN(CodeGenSelector); +}; + + static Handle MakeCode(FunctionLiteral* literal, Handle