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

Unified Diff: test/cctest/compiler/compiler/test-pipeline.cc

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 5 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
Index: test/cctest/compiler/compiler/test-pipeline.cc
diff --git a/test/cctest/compiler/compiler/test-pipeline.cc b/test/cctest/compiler/compiler/test-pipeline.cc
new file mode 100644
index 0000000000000000000000000000000000000000..84ccc28bde605bcc2f39abda566bb4c4424813ba
--- /dev/null
+++ b/test/cctest/compiler/compiler/test-pipeline.cc
@@ -0,0 +1,40 @@
+// Copyright 2013 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 "test/cctest/cctest.h"
+
+#include "src/compiler.h"
+#include "src/compiler/pipeline.h"
+#include "src/handles.h"
+#include "src/parser.h"
+#include "src/rewriter.h"
+#include "src/scopes.h"
+
+using namespace v8::internal;
+using namespace v8::internal::compiler;
+
+TEST(PipelineAdd) {
+ InitializedHandleScope handles;
+ const char* source = "(function(a,b) { return a + b; })";
+ Handle<JSFunction> function = v8::Utils::OpenHandle(
+ *v8::Handle<v8::Function>::Cast(CompileRun(source)));
+ CompilationInfoWithZone info(function);
+
+ CHECK(Parser::Parse(&info));
+ StrictMode strict_mode = info.function()->strict_mode();
+ info.SetStrictMode(strict_mode);
+ CHECK(Rewriter::Rewrite(&info));
+ CHECK(Scope::Analyze(&info));
+ CHECK_NE(NULL, info.scope());
+
+ Pipeline pipeline(&info);
+ Handle<Code> code = pipeline.GenerateCode();
+#if V8_TURBOFAN_TARGET
+ CHECK(Pipeline::SupportedTarget());
+ CHECK(!code.is_null());
+#else
+ USE(code);
+#endif
+}
« no previous file with comments | « test/cctest/compiler/compiler/test-phi-reducer.cc ('k') | test/cctest/compiler/compiler/test-representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698