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

Side by Side Diff: test/cctest/compiler/test-pipeline.cc

Issue 453953002: Set ScopeInfo when compiling for unit tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
1 // Copyright 2013 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 #include "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 7
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 11 matching lines...) Expand all
22 *v8::Handle<v8::Function>::Cast(CompileRun(source))); 22 *v8::Handle<v8::Function>::Cast(CompileRun(source)));
23 CompilationInfoWithZone info(function); 23 CompilationInfoWithZone info(function);
24 24
25 CHECK(Parser::Parse(&info)); 25 CHECK(Parser::Parse(&info));
26 StrictMode strict_mode = info.function()->strict_mode(); 26 StrictMode strict_mode = info.function()->strict_mode();
27 info.SetStrictMode(strict_mode); 27 info.SetStrictMode(strict_mode);
28 CHECK(Rewriter::Rewrite(&info)); 28 CHECK(Rewriter::Rewrite(&info));
29 CHECK(Scope::Analyze(&info)); 29 CHECK(Scope::Analyze(&info));
30 CHECK_NE(NULL, info.scope()); 30 CHECK_NE(NULL, info.scope());
31 31
32 if (!info.shared_info().is_null()) {
Michael Starzinger 2014/08/14 08:48:07 As discussed offline: Let's drop this as this test
sigurds 2014/08/14 09:53:34 Done.
33 Handle<ScopeInfo> scope_info = ScopeInfo::Create(info.scope(), info.zone());
34 info.shared_info()->set_scope_info(*scope_info);
35 }
36
32 Pipeline pipeline(&info); 37 Pipeline pipeline(&info);
33 #if V8_TURBOFAN_TARGET 38 #if V8_TURBOFAN_TARGET
34 Handle<Code> code = pipeline.GenerateCode(); 39 Handle<Code> code = pipeline.GenerateCode();
35 CHECK(Pipeline::SupportedTarget()); 40 CHECK(Pipeline::SupportedTarget());
36 CHECK(!code.is_null()); 41 CHECK(!code.is_null());
37 #else 42 #else
38 USE(pipeline); 43 USE(pipeline);
39 #endif 44 #endif
40 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698