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

Unified Diff: test/cctest/compiler/function-tester.h

Issue 473263004: Towards removing dependency from generic lowering on compilation info. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Using flags in compilation info. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/test-run-inlining.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/function-tester.h
diff --git a/test/cctest/compiler/function-tester.h b/test/cctest/compiler/function-tester.h
index 4a416a42082d0f4a54fc4f99ae9aac8af7e1679b..7a7a5582b7912a87c655b815b797f2b5d8b9ca5d 100644
--- a/test/cctest/compiler/function-tester.h
+++ b/test/cctest/compiler/function-tester.h
@@ -26,12 +26,12 @@ namespace compiler {
class FunctionTester : public InitializedHandleScope {
public:
- explicit FunctionTester(const char* source, bool context_specialization =
- FLAG_context_specialization)
+ explicit FunctionTester(const char* source, uint32_t flags = 0)
: isolate(main_isolate()),
function((FLAG_allow_natives_syntax = true, NewFunction(source))),
- context_specialization_(context_specialization) {
+ flags_(flags) {
Compile(function);
+ USE(flags_);
}
Isolate* isolate;
@@ -45,7 +45,12 @@ class FunctionTester : public InitializedHandleScope {
StrictMode strict_mode = info.function()->strict_mode();
info.SetStrictMode(strict_mode);
info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code()));
- if (context_specialization_) info.MarkAsContextSpecializing();
+ if (flags_ & CompilationInfo::kContextSpecializing) {
+ info.MarkAsContextSpecializing();
+ }
+ if (flags_ & CompilationInfo::kInliningEnabled) {
+ info.MarkAsInliningEnabled();
+ }
CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info));
CHECK_NE(NULL, info.scope());
@@ -193,7 +198,7 @@ class FunctionTester : public InitializedHandleScope {
Handle<Object> false_value() { return isolate->factory()->false_value(); }
private:
- bool context_specialization_;
+ uint32_t flags_;
};
}
}
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/test-run-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698