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

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

Issue 1407533004: [turbofan] Fix various issues with --turbo-inlining enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 years, 2 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 | « test/cctest/test-debug.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | 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 30 matching lines...) Expand all
41 using ::v8::internal::Deoptimizer; 41 using ::v8::internal::Deoptimizer;
42 using ::v8::internal::EmbeddedVector; 42 using ::v8::internal::EmbeddedVector;
43 using ::v8::internal::Handle; 43 using ::v8::internal::Handle;
44 using ::v8::internal::Isolate; 44 using ::v8::internal::Isolate;
45 using ::v8::internal::JSFunction; 45 using ::v8::internal::JSFunction;
46 using ::v8::internal::Object; 46 using ::v8::internal::Object;
47 47
48 // Size of temp buffer for formatting small strings. 48 // Size of temp buffer for formatting small strings.
49 #define SMALL_STRING_BUFFER_SIZE 80 49 #define SMALL_STRING_BUFFER_SIZE 80
50 50
51 // Utility class to set --allow-natives-syntax --always-opt and --nouse-inlining 51 // Utility class to set the following runtime flags when constructed and return
52 // when constructed and return to their default state when destroyed. 52 // to their default state when destroyed:
53 // --allow-natives-syntax --always-opt --noturbo-inlining --nouse-inlining
53 class AlwaysOptimizeAllowNativesSyntaxNoInlining { 54 class AlwaysOptimizeAllowNativesSyntaxNoInlining {
54 public: 55 public:
55 AlwaysOptimizeAllowNativesSyntaxNoInlining() 56 AlwaysOptimizeAllowNativesSyntaxNoInlining()
56 : always_opt_(i::FLAG_always_opt), 57 : always_opt_(i::FLAG_always_opt),
57 allow_natives_syntax_(i::FLAG_allow_natives_syntax), 58 allow_natives_syntax_(i::FLAG_allow_natives_syntax),
59 turbo_inlining_(i::FLAG_turbo_inlining),
58 use_inlining_(i::FLAG_use_inlining) { 60 use_inlining_(i::FLAG_use_inlining) {
59 i::FLAG_always_opt = true; 61 i::FLAG_always_opt = true;
60 i::FLAG_allow_natives_syntax = true; 62 i::FLAG_allow_natives_syntax = true;
63 i::FLAG_turbo_inlining = false;
61 i::FLAG_use_inlining = false; 64 i::FLAG_use_inlining = false;
62 } 65 }
63 66
64 ~AlwaysOptimizeAllowNativesSyntaxNoInlining() { 67 ~AlwaysOptimizeAllowNativesSyntaxNoInlining() {
68 i::FLAG_always_opt = always_opt_;
65 i::FLAG_allow_natives_syntax = allow_natives_syntax_; 69 i::FLAG_allow_natives_syntax = allow_natives_syntax_;
66 i::FLAG_always_opt = always_opt_; 70 i::FLAG_turbo_inlining = turbo_inlining_;
67 i::FLAG_use_inlining = use_inlining_; 71 i::FLAG_use_inlining = use_inlining_;
68 } 72 }
69 73
70 private: 74 private:
71 bool always_opt_; 75 bool always_opt_;
72 bool allow_natives_syntax_; 76 bool allow_natives_syntax_;
77 bool turbo_inlining_;
73 bool use_inlining_; 78 bool use_inlining_;
74 }; 79 };
75 80
76 81
77 // Utility class to set --allow-natives-syntax and --nouse-inlining when 82 // Utility class to set the following runtime flags when constructed and return
78 // constructed and return to their default state when destroyed. 83 // to their default state when destroyed:
84 // --allow-natives-syntax --noturbo-inlining --nouse-inlining
79 class AllowNativesSyntaxNoInlining { 85 class AllowNativesSyntaxNoInlining {
80 public: 86 public:
81 AllowNativesSyntaxNoInlining() 87 AllowNativesSyntaxNoInlining()
82 : allow_natives_syntax_(i::FLAG_allow_natives_syntax), 88 : allow_natives_syntax_(i::FLAG_allow_natives_syntax),
89 turbo_inlining_(i::FLAG_turbo_inlining),
83 use_inlining_(i::FLAG_use_inlining) { 90 use_inlining_(i::FLAG_use_inlining) {
84 i::FLAG_allow_natives_syntax = true; 91 i::FLAG_allow_natives_syntax = true;
92 i::FLAG_turbo_inlining = false;
85 i::FLAG_use_inlining = false; 93 i::FLAG_use_inlining = false;
86 } 94 }
87 95
88 ~AllowNativesSyntaxNoInlining() { 96 ~AllowNativesSyntaxNoInlining() {
89 i::FLAG_allow_natives_syntax = allow_natives_syntax_; 97 i::FLAG_allow_natives_syntax = allow_natives_syntax_;
98 i::FLAG_turbo_inlining = turbo_inlining_;
90 i::FLAG_use_inlining = use_inlining_; 99 i::FLAG_use_inlining = use_inlining_;
91 } 100 }
92 101
93 private: 102 private:
94 bool allow_natives_syntax_; 103 bool allow_natives_syntax_;
104 bool turbo_inlining_;
95 bool use_inlining_; 105 bool use_inlining_;
96 }; 106 };
97 107
98 108
99 // Abort any ongoing incremental marking to make sure that all weak global 109 // Abort any ongoing incremental marking to make sure that all weak global
100 // handle callbacks are processed. 110 // handle callbacks are processed.
101 static void NonIncrementalGC(i::Isolate* isolate) { 111 static void NonIncrementalGC(i::Isolate* isolate) {
102 isolate->heap()->CollectAllGarbage(); 112 isolate->heap()->CollectAllGarbage();
103 } 113 }
104 114
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized()); 791 CHECK(!GetJSFunction(env->Global(), "f1")->IsOptimized());
782 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized()); 792 CHECK(!GetJSFunction(env->Global(), "g1")->IsOptimized());
783 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized()); 793 CHECK(!GetJSFunction(env->Global(), "f2")->IsOptimized());
784 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized()); 794 CHECK(!GetJSFunction(env->Global(), "g2")->IsOptimized());
785 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value()); 795 CHECK_EQ(1, env->Global()->Get(v8_str("count"))->Int32Value());
786 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value()); 796 CHECK_EQ(13, env->Global()->Get(v8_str("result"))->Int32Value());
787 } 797 }
788 isolate->Exit(); 798 isolate->Exit();
789 isolate->Dispose(); 799 isolate->Dispose();
790 } 800 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698