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

Side by Side Diff: test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc

Issue 2645403002: [Compiler] Enable use of seperate zones for parsing and compiling. (Closed)
Patch Set: Add back header Created 3 years, 10 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/compiler/test-run-bytecode-graph-builder.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 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" 5 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h"
6 6
7 #include "src/base/atomic-utils.h" 7 #include "src/base/atomic-utils.h"
8 #include "src/base/platform/semaphore.h" 8 #include "src/base/platform/semaphore.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 11 matching lines...) Expand all
22 typedef TestWithContext OptimizingCompileDispatcherTest; 22 typedef TestWithContext OptimizingCompileDispatcherTest;
23 23
24 namespace { 24 namespace {
25 25
26 class BlockingCompilationJob : public CompilationJob { 26 class BlockingCompilationJob : public CompilationJob {
27 public: 27 public:
28 BlockingCompilationJob(Isolate* isolate, Handle<JSFunction> function) 28 BlockingCompilationJob(Isolate* isolate, Handle<JSFunction> function)
29 : CompilationJob(isolate, &info_, "BlockingCompilationJob", 29 : CompilationJob(isolate, &info_, "BlockingCompilationJob",
30 State::kReadyToExecute), 30 State::kReadyToExecute),
31 parse_info_(handle(function->shared())), 31 parse_info_(handle(function->shared())),
32 info_(&parse_info_, function), 32 info_(parse_info_.zone(), &parse_info_, function),
33 blocking_(false), 33 blocking_(false),
34 semaphore_(0) {} 34 semaphore_(0) {}
35 ~BlockingCompilationJob() override = default; 35 ~BlockingCompilationJob() override = default;
36 36
37 bool IsBlocking() const { return blocking_.Value(); } 37 bool IsBlocking() const { return blocking_.Value(); }
38 void Signal() { semaphore_.Signal(); } 38 void Signal() { semaphore_.Signal(); }
39 39
40 // CompilationJob implementation. 40 // CompilationJob implementation.
41 Status PrepareJobImpl() override { 41 Status PrepareJobImpl() override {
42 UNREACHABLE(); 42 UNREACHABLE();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 // Should not block. 86 // Should not block.
87 dispatcher.Flush(OptimizingCompileDispatcher::BlockingBehavior::kDontBlock); 87 dispatcher.Flush(OptimizingCompileDispatcher::BlockingBehavior::kDontBlock);
88 88
89 // Unblock the job & finish. 89 // Unblock the job & finish.
90 job->Signal(); 90 job->Signal();
91 dispatcher.Stop(); 91 dispatcher.Stop();
92 } 92 }
93 93
94 } // namespace internal 94 } // namespace internal
95 } // namespace v8 95 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698