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

Side by Side Diff: test/cctest/compiler/function-tester.h

Issue 568783002: Remove deoptimization by patching the call stack. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 #include "test/cctest/cctest.h" 9 #include "test/cctest/cctest.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 CHECK(Rewriter::Rewrite(&info)); 60 CHECK(Rewriter::Rewrite(&info));
61 CHECK(Scope::Analyze(&info)); 61 CHECK(Scope::Analyze(&info));
62 CHECK_NE(NULL, info.scope()); 62 CHECK_NE(NULL, info.scope());
63 Handle<ScopeInfo> scope_info = ScopeInfo::Create(info.scope(), info.zone()); 63 Handle<ScopeInfo> scope_info = ScopeInfo::Create(info.scope(), info.zone());
64 info.shared_info()->set_scope_info(*scope_info); 64 info.shared_info()->set_scope_info(*scope_info);
65 65
66 EnsureDeoptimizationSupport(&info); 66 EnsureDeoptimizationSupport(&info);
67 67
68 Pipeline pipeline(&info); 68 Pipeline pipeline(&info);
69 Handle<Code> code = pipeline.GenerateCode(); 69 Handle<Code> code = pipeline.GenerateCode();
70 if (FLAG_turbo_deoptimization) {
71 info.context()->native_context()->AddOptimizedCode(*code);
72 }
70 73
71 CHECK(!code.is_null()); 74 CHECK(!code.is_null());
72 function->ReplaceCode(*code); 75 function->ReplaceCode(*code);
73 #elif USE_CRANKSHAFT 76 #elif USE_CRANKSHAFT
74 Handle<Code> unoptimized = Handle<Code>(function->code()); 77 Handle<Code> unoptimized = Handle<Code>(function->code());
75 Handle<Code> code = Compiler::GetOptimizedCode(function, unoptimized, 78 Handle<Code> code = Compiler::GetOptimizedCode(function, unoptimized,
76 Compiler::NOT_CONCURRENT); 79 Compiler::NOT_CONCURRENT);
77 CHECK(!code.is_null()); 80 CHECK(!code.is_null());
78 #if ENABLE_DISASSEMBLER 81 #if ENABLE_DISASSEMBLER
79 if (FLAG_print_opt_code) { 82 if (FLAG_print_opt_code) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 Handle<Object> false_value() { return isolate->factory()->false_value(); } 207 Handle<Object> false_value() { return isolate->factory()->false_value(); }
205 208
206 private: 209 private:
207 uint32_t flags_; 210 uint32_t flags_;
208 }; 211 };
209 } 212 }
210 } 213 }
211 } // namespace v8::internal::compiler 214 } // namespace v8::internal::compiler
212 215
213 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 216 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698