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

Side by Side Diff: test/cctest/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, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "src/v8.h"
6 #include "test/cctest/cctest.h"
7
8 #include "src/compiler.h"
9 #include "src/compiler/pipeline.h"
10 #include "src/handles.h"
11 #include "src/parser.h"
12 #include "src/rewriter.h"
13 #include "src/scopes.h"
14
15 using namespace v8::internal;
16 using namespace v8::internal::compiler;
17
18 TEST(PipelineAdd) {
19 InitializedHandleScope handles;
20 const char* source = "(function(a,b) { return a + b; })";
21 Handle<JSFunction> function = v8::Utils::OpenHandle(
22 *v8::Handle<v8::Function>::Cast(CompileRun(source)));
23 CompilationInfoWithZone info(function);
24
25 CHECK(Parser::Parse(&info));
26 StrictMode strict_mode = info.function()->strict_mode();
27 info.SetStrictMode(strict_mode);
28 CHECK(Rewriter::Rewrite(&info));
29 CHECK(Scope::Analyze(&info));
30 CHECK_NE(NULL, info.scope());
31
32 Pipeline pipeline(&info);
33 Handle<Code> code = pipeline.GenerateCode();
34 #if V8_TURBOFAN_TARGET
35 CHECK(Pipeline::SupportedTarget());
36 CHECK(!code.is_null());
37 #else
38 USE(code);
39 #endif
40 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-phi-reducer.cc ('k') | test/cctest/compiler/test-representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698