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

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

Issue 2394213003: Named all zones in the project (Closed)
Patch Set: Merge branch 'master' into zonenames Created 4 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/cctest.cc ('k') | test/cctest/compiler/function-tester.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 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 "src/handles.h" 5 #include "src/handles.h"
6 #include "src/interface-descriptors.h" 6 #include "src/interface-descriptors.h"
7 #include "src/isolate.h" 7 #include "src/isolate.h"
8 #include "test/cctest/compiler/function-tester.h" 8 #include "test/cctest/compiler/function-tester.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 namespace compiler { 12 namespace compiler {
13 13
14 class ZoneHolder { 14 class ZoneHolder {
15 public: 15 public:
16 explicit ZoneHolder(Isolate* isolate) : zone_(isolate->allocator()) {} 16 explicit ZoneHolder(Isolate* isolate)
17 : zone_(isolate->allocator(), ZONE_NAME) {}
17 Zone* zone() { return &zone_; } 18 Zone* zone() { return &zone_; }
18 19
19 private: 20 private:
20 Zone zone_; 21 Zone zone_;
21 }; 22 };
22 23
23 // Inherit from ZoneHolder in order to create a zone that can be passed to 24 // Inherit from ZoneHolder in order to create a zone that can be passed to
24 // CodeAssembler base class constructor. 25 // CodeAssembler base class constructor.
25 template <typename CodeAssemblerT> 26 template <typename CodeAssemblerT>
26 class CodeAssemblerTesterImpl : private ZoneHolder, public CodeAssemblerT { 27 class CodeAssemblerTesterImpl : private ZoneHolder, public CodeAssemblerT {
(...skipping 25 matching lines...) Expand all
52 } 53 }
53 54
54 private: 55 private:
55 HandleScope scope_; 56 HandleScope scope_;
56 LocalContext context_; 57 LocalContext context_;
57 }; 58 };
58 59
59 } // namespace compiler 60 } // namespace compiler
60 } // namespace internal 61 } // namespace internal
61 } // namespace v8 62 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/cctest.cc ('k') | test/cctest/compiler/function-tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698