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

Side by Side Diff: test/cctest/compiler/function-tester.h

Issue 511133002: Fix build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 #include "test/cctest/cctest.h" 9 #include "test/cctest/cctest.h"
10 10
11 #include "src/compiler.h" 11 #include "src/compiler.h"
12 #include "src/compiler/pipeline.h" 12 #include "src/compiler/pipeline.h"
13 #include "src/execution.h" 13 #include "src/execution.h"
14 #include "src/full-codegen.h" 14 #include "src/full-codegen.h"
15 #include "src/handles.h" 15 #include "src/handles.h"
16 #include "src/objects-inl.h" 16 #include "src/objects-inl.h"
17 #include "src/parser.h" 17 #include "src/parser.h"
18 #include "src/rewriter.h" 18 #include "src/rewriter.h"
19 #include "src/scopes.h" 19 #include "src/scopes.h"
20 20
21 #define USE_CRANKSHAFT 0 21 #define USE_CRANKSHAFT 0
22 22
23 namespace v8 { 23 namespace v8 {
24 namespace internal { 24 namespace internal {
25 namespace compiler { 25 namespace compiler {
26 26
27 class FunctionTester : public InitializedHandleScope { 27 class FunctionTester : public InitializedHandleScope {
28 const uint32_t supported_flags =
Sven Panne 2014/08/28 08:53:13 I don't really think that you wanted to define an
sigurds 2014/08/28 09:25:43 Yes, it should have been static.
29 CompilationInfo::kContextSpecializing | CompilationInfo::kInliningEnabled;
30
31 public: 28 public:
32 explicit FunctionTester(const char* source, uint32_t flags = 0) 29 explicit FunctionTester(const char* source, uint32_t flags = 0)
33 : isolate(main_isolate()), 30 : isolate(main_isolate()),
34 function((FLAG_allow_natives_syntax = true, NewFunction(source))), 31 function((FLAG_allow_natives_syntax = true, NewFunction(source))),
35 flags_(flags) { 32 flags_(flags) {
36 Compile(function); 33 Compile(function);
34 const uint32_t supported_flags = CompilationInfo::kContextSpecializing |
35 CompilationInfo::kInliningEnabled;
37 CHECK_EQ(0, flags_ & ~supported_flags); 36 CHECK_EQ(0, flags_ & ~supported_flags);
38 } 37 }
39 38
40 Isolate* isolate; 39 Isolate* isolate;
41 Handle<JSFunction> function; 40 Handle<JSFunction> function;
42 41
43 Handle<JSFunction> Compile(Handle<JSFunction> function) { 42 Handle<JSFunction> Compile(Handle<JSFunction> function) {
44 #if V8_TURBOFAN_TARGET 43 #if V8_TURBOFAN_TARGET
45 CompilationInfoWithZone info(function); 44 CompilationInfoWithZone info(function);
46 45
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 Handle<Object> false_value() { return isolate->factory()->false_value(); } 200 Handle<Object> false_value() { return isolate->factory()->false_value(); }
202 201
203 private: 202 private:
204 uint32_t flags_; 203 uint32_t flags_;
205 }; 204 };
206 } 205 }
207 } 206 }
208 } // namespace v8::internal::compiler 207 } // namespace v8::internal::compiler
209 208
210 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 209 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698