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

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..f7cbde744aaafb93ebd160a37b930dc723dba410 100644
--- a/test/cctest/compiler/function-tester.h
+++ b/test/cctest/compiler/function-tester.h
@@ -26,12 +26,14 @@ namespace compiler {
class FunctionTester : public InitializedHandleScope {
public:
- explicit FunctionTester(const char* source, bool context_specialization =
- FLAG_context_specialization)
+ enum Flag { kContextSpecializing = 1 << 0, kInliningEnabled = 2 << 0 };
titzer 2014/08/27 11:48:40 You can just use the CompilationInfo::Flag here I
sigurds 2014/08/27 13:02:46 Done.
+
+ 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 +47,8 @@ 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_ & kContextSpecializing) info.MarkAsContextSpecializing();
+ if (flags_ & kInliningEnabled) info.MarkAsInliningEnabled();
CHECK(Rewriter::Rewrite(&info));
CHECK(Scope::Analyze(&info));
CHECK_NE(NULL, info.scope());
@@ -193,7 +196,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