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_; |
}; |
} |
} |