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

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: Adapt test. Created 4 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 unified diff | Download patch
« src/compiler.cc ('K') | « 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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 CompileRun( 793 CompileRun(
794 "var is_baseline_in_function, is_baseline_after_return;\n" 794 "var is_baseline_in_function, is_baseline_after_return;\n"
795 "var return_val;\n" 795 "var return_val;\n"
796 "function f() {\n" 796 "function f() {\n"
797 " %CompileBaseline(f);\n" 797 " %CompileBaseline(f);\n"
798 " is_baseline_in_function = IsBaselineCompiled(f);\n" 798 " is_baseline_in_function = IsBaselineCompiled(f);\n"
799 " return 1234;\n" 799 " return 1234;\n"
800 "};\n" 800 "};\n"
801 "return_val = f();\n" 801 "return_val = f();\n"
802 "is_baseline_after_return = IsBaselineCompiled(f);\n"); 802 "is_baseline_after_return = IsBaselineCompiled(f);\n");
803 CHECK_EQ(false, GetGlobalProperty("is_baseline_in_function")->BooleanValue()); 803 // TODO(4280): Remove this entire test once --ignition-preserve-bytecode is
804 // the default and the flag is removed. This test doesn't provide benefit any
805 // longer once {InterpreterActivationsFinder} is gone.
806 bool base = FLAG_ignition_preserve_bytecode;
rmcilroy 2016/08/22 15:33:03 just do: "if (FLAG_ignition_preserve_bytecode) ret
Michael Starzinger 2016/08/22 15:44:23 Done.
807 CHECK_EQ(base, GetGlobalProperty("is_baseline_in_function")->BooleanValue());
804 CHECK_EQ(true, GetGlobalProperty("is_baseline_after_return")->BooleanValue()); 808 CHECK_EQ(true, GetGlobalProperty("is_baseline_after_return")->BooleanValue());
805 CHECK_EQ(1234.0, GetGlobalProperty("return_val")->Number()); 809 CHECK_EQ(1234.0, GetGlobalProperty("return_val")->Number());
806 } 810 }
807 811
808 TEST(IgnitionEntryTrampolineSelfHealing) { 812 TEST(IgnitionEntryTrampolineSelfHealing) {
809 FLAG_allow_natives_syntax = true; 813 FLAG_allow_natives_syntax = true;
810 FLAG_always_opt = false; 814 FLAG_always_opt = false;
811 CcTest::InitializeVM(); 815 CcTest::InitializeVM();
812 FLAG_ignition = true; 816 FLAG_ignition = true;
813 Isolate* isolate = CcTest::i_isolate(); 817 Isolate* isolate = CcTest::i_isolate();
(...skipping 16 matching lines...) Expand all
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
« src/compiler.cc ('K') | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698