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

Unified Diff: test/cctest/test-compiler.cc

Issue 2475203003: [compiler] Remove --ignition-preserve-bytecode flag. (Closed)
Patch Set: Created 4 years, 1 month 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
« src/compiler.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-compiler.cc
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index e26fb317bbc86338973a54176fa2390bc8d00e4b..ef7506b58fda90f41a9227fa52d522662227b018 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -619,53 +619,6 @@ TEST(SplitConstantsInFullCompiler) {
}
#endif
-static void IsBaselineCompiled(
- const v8::FunctionCallbackInfo<v8::Value>& args) {
- Handle<Object> object = v8::Utils::OpenHandle(*args[0]);
- Handle<JSFunction> function = Handle<JSFunction>::cast(object);
- bool is_baseline = function->shared()->code()->kind() == Code::FUNCTION;
- return args.GetReturnValue().Set(is_baseline);
-}
-
-static void InstallIsBaselineCompiledHelper(v8::Isolate* isolate) {
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
- v8::Local<v8::FunctionTemplate> t =
- v8::FunctionTemplate::New(isolate, IsBaselineCompiled);
- CHECK(context->Global()
- ->Set(context, v8_str("IsBaselineCompiled"),
- t->GetFunction(context).ToLocalChecked())
- .FromJust());
-}
-
-TEST(IgnitionBaselineOnReturn) {
- // TODO(4280): Remove this entire test once --ignition-preserve-bytecode is
- // the default and the flag is removed. This test doesn't provide benefit any
- // longer once {InterpreterActivationsFinder} is gone.
- if (FLAG_ignition_preserve_bytecode) return;
- FLAG_allow_natives_syntax = true;
- FLAG_always_opt = false;
- CcTest::InitializeVM();
- FLAG_ignition = true;
- Isolate* isolate = CcTest::i_isolate();
- isolate->interpreter()->Initialize();
- v8::HandleScope scope(CcTest::isolate());
- InstallIsBaselineCompiledHelper(CcTest::isolate());
-
- CompileRun(
- "var is_baseline_in_function, is_baseline_after_return;\n"
- "var return_val;\n"
- "function f() {\n"
- " %CompileBaseline(f);\n"
- " is_baseline_in_function = IsBaselineCompiled(f);\n"
- " return 1234;\n"
- "};\n"
- "return_val = f();\n"
- "is_baseline_after_return = IsBaselineCompiled(f);\n");
- CHECK_EQ(false, GetGlobalProperty("is_baseline_in_function")->BooleanValue());
- CHECK_EQ(true, GetGlobalProperty("is_baseline_after_return")->BooleanValue());
- CHECK_EQ(1234.0, GetGlobalProperty("return_val")->Number());
-}
-
TEST(IgnitionEntryTrampolineSelfHealing) {
FLAG_allow_natives_syntax = true;
FLAG_always_opt = false;
« src/compiler.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698