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

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

Issue 2197573002: Clean up compiler dispatcher job a bit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-job.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 6
7 #include "src/compiler-dispatcher/compiler-dispatcher-job.h" 7 #include "src/compiler-dispatcher/compiler-dispatcher-job.h"
8 #include "src/flags.h" 8 #include "src/flags.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 typedef TestWithContext CompilerDispatcherJobTest; 16 typedef TestWithContext CompilerDispatcherJobTest;
17 17
18 namespace { 18 namespace {
19 19
20 class ScriptResource : public v8::String::ExternalOneByteStringResource { 20 class ScriptResource : public v8::String::ExternalOneByteStringResource {
21 public: 21 public:
22 ScriptResource(const char* data, size_t length) 22 ScriptResource(const char* data, size_t length)
23 : data_(data), length_(length) {} 23 : data_(data), length_(length) {}
24 ~ScriptResource() override = default;
24 25
25 const char* data() const { return data_; } 26 const char* data() const override { return data_; }
26 size_t length() const { return length_; } 27 size_t length() const override { return length_; }
27 28
28 private: 29 private:
29 const char* data_; 30 const char* data_;
30 size_t length_; 31 size_t length_;
31 32
32 DISALLOW_COPY_AND_ASSIGN(ScriptResource); 33 DISALLOW_COPY_AND_ASSIGN(ScriptResource);
33 }; 34 };
34 35
35 Handle<JSFunction> CreateFunction( 36 Handle<JSFunction> CreateFunction(
36 Isolate* isolate, ExternalOneByteString::Resource* maybe_resource) { 37 Isolate* isolate, ExternalOneByteString::Resource* maybe_resource) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 85
85 ASSERT_TRUE(job->status() == CompileJobStatus::kInitial); 86 ASSERT_TRUE(job->status() == CompileJobStatus::kInitial);
86 job->PrepareToParseOnMainThread(); 87 job->PrepareToParseOnMainThread();
87 ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToParse); 88 ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToParse);
88 job->Parse(); 89 job->Parse();
89 ASSERT_TRUE(job->status() == CompileJobStatus::kParsed); 90 ASSERT_TRUE(job->status() == CompileJobStatus::kParsed);
90 } 91 }
91 92
92 } // namespace internal 93 } // namespace internal
93 } // namespace v8 94 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler-dispatcher/compiler-dispatcher-job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698