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

Side by Side Diff: src/compiler/code-stub-assembler.cc

Issue 1604543002: [compiler] Remove CodeStub from CompilationInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 years, 11 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/code-stub-assembler.h ('k') | src/compiler/fast-accessor-assembler.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/code-stub-assembler.h" 5 #include "src/compiler/code-stub-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
11 #include "src/compiler/instruction-selector.h" 11 #include "src/compiler/instruction-selector.h"
12 #include "src/compiler/linkage.h" 12 #include "src/compiler/linkage.h"
13 #include "src/compiler/pipeline.h" 13 #include "src/compiler/pipeline.h"
14 #include "src/compiler/raw-machine-assembler.h" 14 #include "src/compiler/raw-machine-assembler.h"
15 #include "src/compiler/schedule.h" 15 #include "src/compiler/schedule.h"
16 #include "src/frames.h" 16 #include "src/frames.h"
17 #include "src/interface-descriptors.h" 17 #include "src/interface-descriptors.h"
18 #include "src/interpreter/bytecodes.h" 18 #include "src/interpreter/bytecodes.h"
19 #include "src/machine-type.h" 19 #include "src/machine-type.h"
20 #include "src/macro-assembler.h" 20 #include "src/macro-assembler.h"
21 #include "src/zone.h" 21 #include "src/zone.h"
22 22
23 namespace v8 { 23 namespace v8 {
24 namespace internal { 24 namespace internal {
25 namespace compiler { 25 namespace compiler {
26 26
27 27
28 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone, 28 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone,
29 const CallInterfaceDescriptor& descriptor, 29 const CallInterfaceDescriptor& descriptor,
30 Code::Kind kind, const char* name) 30 Code::Flags flags, const char* name)
31 : raw_assembler_(new RawMachineAssembler( 31 : raw_assembler_(new RawMachineAssembler(
32 isolate, new (zone) Graph(zone), 32 isolate, new (zone) Graph(zone),
33 Linkage::GetStubCallDescriptor(isolate, zone, descriptor, 0, 33 Linkage::GetStubCallDescriptor(isolate, zone, descriptor, 0,
34 CallDescriptor::kNoFlags))), 34 CallDescriptor::kNoFlags))),
35 kind_(kind), 35 flags_(flags),
36 name_(name), 36 name_(name),
37 code_generated_(false) {} 37 code_generated_(false) {}
38 38
39 39
40 CodeStubAssembler::~CodeStubAssembler() {} 40 CodeStubAssembler::~CodeStubAssembler() {}
41 41
42 42
43 Handle<Code> CodeStubAssembler::GenerateCode() { 43 Handle<Code> CodeStubAssembler::GenerateCode() {
44 DCHECK(!code_generated_); 44 DCHECK(!code_generated_);
45 45
46 Schedule* schedule = raw_assembler_->Export(); 46 Schedule* schedule = raw_assembler_->Export();
47 Handle<Code> code = Pipeline::GenerateCodeForCodeStub( 47 Handle<Code> code = Pipeline::GenerateCodeForCodeStub(
48 isolate(), raw_assembler_->call_descriptor(), graph(), schedule, kind_, 48 isolate(), raw_assembler_->call_descriptor(), graph(), schedule, flags_,
49 name_); 49 name_);
50 50
51 code_generated_ = true; 51 code_generated_ = true;
52 return code; 52 return code;
53 } 53 }
54 54
55 55
56 Node* CodeStubAssembler::Int32Constant(int value) { 56 Node* CodeStubAssembler::Int32Constant(int value) {
57 return raw_assembler_->Int32Constant(value); 57 return raw_assembler_->Int32Constant(value);
58 } 58 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 Graph* CodeStubAssembler::graph() { return raw_assembler_->graph(); } 168 Graph* CodeStubAssembler::graph() { return raw_assembler_->graph(); }
169 169
170 170
171 Zone* CodeStubAssembler::zone() { return raw_assembler_->zone(); } 171 Zone* CodeStubAssembler::zone() { return raw_assembler_->zone(); }
172 172
173 173
174 } // namespace compiler 174 } // namespace compiler
175 } // namespace internal 175 } // namespace internal
176 } // namespace v8 176 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/compiler/fast-accessor-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698