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

Unified Diff: src/typing-asm.h

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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/scopes.cc ('k') | src/typing-asm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing-asm.h
diff --git a/test/cctest/profiler-extension.h b/src/typing-asm.h
similarity index 55%
copy from test/cctest/profiler-extension.h
copy to src/typing-asm.h
index 6f816b33fba847fdf7bfa57f24f7aed822a7ae1e..6bf449925a4831e852bb8b1be05f9f6e53cbc5fd 100644
--- a/test/cctest/profiler-extension.h
+++ b/src/typing-asm.h
@@ -24,31 +24,65 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Tests of profiles generator and utilities.
-#ifndef V8_TEST_CCTEST_PROFILER_EXTENSION_H_
-#define V8_TEST_CCTEST_PROFILER_EXTENSION_H_
+#ifndef V8_TYPING_ASM_H_
+#define V8_TYPING_ASM_H_
+
+#include "v8.h"
-#include "include/v8-profiler.h"
+#include "allocation.h"
+#include "ast.h"
+#include "compiler.h"
+#include "scopes.h"
+#include "types.h"
+#include "zone.h"
namespace v8 {
namespace internal {
-class ProfilerExtension : public v8::Extension {
+
+class AsmTyper: public AstVisitor {
public:
- ProfilerExtension() : v8::Extension("v8/profiler", kSource) { }
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate(
- v8::Isolate* isolate,
- v8::Handle<v8::String> name);
- static void StartProfiling(const v8::FunctionCallbackInfo<v8::Value>& args);
- static void StopProfiling(const v8::FunctionCallbackInfo<v8::Value>& args);
- static v8::CpuProfile* last_profile;
+ static bool Run(CompilationInfo* info);
+
+ 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:
- static const char* kSource;
-};
+ explicit AsmTyper(CompilationInfo* info);
+
+ CompilationInfo* info_;
+ Handle<Type> expected_type_;
+ Handle<Type> computed_type_;
+ Handle<Type> return_type_;
+ bool valid_;
+ Zone* zone() const { return info_->zone(); }
+
+ Handle<Type> handle_type(Type* type) { return Handle<Type>(type, isolate_); }
+ Handle<Type> handle_type(Handle<Type> type) { return type; }
+
+ void VisitDeclarations(ZoneList<Declaration*>* d);
+ void VisitStatements(ZoneList<Statement*>* s);
+
+ void VisitExpressionAnnotation(Expression* e);
+ void VisitFunctionAnnotation(FunctionLiteral* f);
+ void VisitAsmModule(FunctionLiteral* f);
+
+ Handle<Type> StdlibType();
+
+#define DECLARE_VISIT(type) virtual void Visit##type(type* node);
+ AST_NODE_LIST(DECLARE_VISIT)
+#undef DECLARE_VISIT
+
+ DISALLOW_COPY_AND_ASSIGN(AsmTyper);
+};
} } // namespace v8::internal
-#endif
+#endif // V8_TYPING_ASM_H_
« no previous file with comments | « src/scopes.cc ('k') | src/typing-asm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698