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

Side by Side Diff: test/cctest/test-compiler.cc

Issue 2267693002: [interpreter] Allow mixed stacks if bytecode is preserved. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: One more comment. Created 4 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
« no previous file with comments | « src/compiler.cc ('k') | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 v8::Local<v8::Context> context = isolate->GetCurrentContext(); 774 v8::Local<v8::Context> context = isolate->GetCurrentContext();
775 v8::Local<v8::FunctionTemplate> t = 775 v8::Local<v8::FunctionTemplate> t =
776 v8::FunctionTemplate::New(isolate, IsBaselineCompiled); 776 v8::FunctionTemplate::New(isolate, IsBaselineCompiled);
777 CHECK(context->Global() 777 CHECK(context->Global()
778 ->Set(context, v8_str("IsBaselineCompiled"), 778 ->Set(context, v8_str("IsBaselineCompiled"),
779 t->GetFunction(context).ToLocalChecked()) 779 t->GetFunction(context).ToLocalChecked())
780 .FromJust()); 780 .FromJust());
781 } 781 }
782 782
783 TEST(IgnitionBaselineOnReturn) { 783 TEST(IgnitionBaselineOnReturn) {
784 // TODO(4280): Remove this entire test once --ignition-preserve-bytecode is
785 // the default and the flag is removed. This test doesn't provide benefit any
786 // longer once {InterpreterActivationsFinder} is gone.
787 if (FLAG_ignition_preserve_bytecode) return;
784 FLAG_allow_natives_syntax = true; 788 FLAG_allow_natives_syntax = true;
785 FLAG_always_opt = false; 789 FLAG_always_opt = false;
786 CcTest::InitializeVM(); 790 CcTest::InitializeVM();
787 FLAG_ignition = true; 791 FLAG_ignition = true;
788 Isolate* isolate = CcTest::i_isolate(); 792 Isolate* isolate = CcTest::i_isolate();
789 isolate->interpreter()->Initialize(); 793 isolate->interpreter()->Initialize();
790 v8::HandleScope scope(CcTest::isolate()); 794 v8::HandleScope scope(CcTest::isolate());
791 InstallIsBaselineCompiledHelper(CcTest::isolate()); 795 InstallIsBaselineCompiledHelper(CcTest::isolate());
792 796
793 CompileRun( 797 CompileRun(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 CHECK_NE(*isolate->builtins()->InterpreterEntryTrampoline(), f1->code()); 834 CHECK_NE(*isolate->builtins()->InterpreterEntryTrampoline(), f1->code());
831 CHECK_EQ(*isolate->builtins()->InterpreterEntryTrampoline(), f2->code()); 835 CHECK_EQ(*isolate->builtins()->InterpreterEntryTrampoline(), f2->code());
832 CHECK_EQ(23.0, GetGlobalProperty("result1")->Number()); 836 CHECK_EQ(23.0, GetGlobalProperty("result1")->Number());
833 837
834 // Function {f2} will self-heal now. 838 // Function {f2} will self-heal now.
835 CompileRun("var result2 = f2()"); 839 CompileRun("var result2 = f2()");
836 CHECK_NE(*isolate->builtins()->InterpreterEntryTrampoline(), f1->code()); 840 CHECK_NE(*isolate->builtins()->InterpreterEntryTrampoline(), f1->code());
837 CHECK_NE(*isolate->builtins()->InterpreterEntryTrampoline(), f2->code()); 841 CHECK_NE(*isolate->builtins()->InterpreterEntryTrampoline(), f2->code());
838 CHECK_EQ(23.0, GetGlobalProperty("result2")->Number()); 842 CHECK_EQ(23.0, GetGlobalProperty("result2")->Number());
839 } 843 }
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698