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

Side by Side Diff: src/compiler/raw-machine-assembler.cc

Issue 567433002: Eliminate Turbofan shims with CodeFactory (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. 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
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/simplified-lowering.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 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 #include "src/code-factory.h"
5 #include "src/compiler/pipeline.h" 6 #include "src/compiler/pipeline.h"
6 #include "src/compiler/raw-machine-assembler.h" 7 #include "src/compiler/raw-machine-assembler.h"
7 #include "src/compiler/scheduler.h" 8 #include "src/compiler/scheduler.h"
8 9
9 namespace v8 { 10 namespace v8 {
10 namespace internal { 11 namespace internal {
11 namespace compiler { 12 namespace compiler {
12 13
13 RawMachineAssembler::RawMachineAssembler(Graph* graph, 14 RawMachineAssembler::RawMachineAssembler(Graph* graph,
14 MachineSignature* machine_sig, 15 MachineSignature* machine_sig,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 77
77 void RawMachineAssembler::Return(Node* value) { 78 void RawMachineAssembler::Return(Node* value) {
78 schedule()->AddReturn(CurrentBlock(), value); 79 schedule()->AddReturn(CurrentBlock(), value);
79 current_block_ = NULL; 80 current_block_ = NULL;
80 } 81 }
81 82
82 83
83 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver, 84 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver,
84 Node* context, Node* frame_state, 85 Node* context, Node* frame_state,
85 CallFunctionFlags flags) { 86 CallFunctionFlags flags) {
86 CallFunctionStub stub(isolate(), 0, flags); 87 Callable callable = CodeFactory::CallFunction(isolate(), 0, flags);
87 CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor();
88 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 88 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
89 d, 1, CallDescriptor::kNeedsFrameState, zone()); 89 callable.descriptor(), 1, CallDescriptor::kNeedsFrameState, zone());
90 Node* stub_code = HeapConstant(stub.GetCode()); 90 Node* stub_code = HeapConstant(callable.code());
91 Node* call = graph()->NewNode(common()->Call(desc), stub_code, function, 91 Node* call = graph()->NewNode(common()->Call(desc), stub_code, function,
92 receiver, context, frame_state); 92 receiver, context, frame_state);
93 schedule()->AddNode(CurrentBlock(), call); 93 schedule()->AddNode(CurrentBlock(), call);
94 return call; 94 return call;
95 } 95 }
96 96
97 97
98 Node* RawMachineAssembler::CallJS0(Node* function, Node* receiver, 98 Node* RawMachineAssembler::CallJS0(Node* function, Node* receiver,
99 Node* context, Node* frame_state) { 99 Node* context, Node* frame_state) {
100 CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(1, zone()); 100 CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(1, zone());
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 Node* node = graph()->NewNode(op, input_count, inputs); 156 Node* node = graph()->NewNode(op, input_count, inputs);
157 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() 157 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start()
158 : CurrentBlock(); 158 : CurrentBlock();
159 schedule()->AddNode(block, node); 159 schedule()->AddNode(block, node);
160 return node; 160 return node;
161 } 161 }
162 162
163 } // namespace compiler 163 } // namespace compiler
164 } // namespace internal 164 } // namespace internal
165 } // namespace v8 165 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698