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

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

Issue 505133002: Unit test of instruction selection for calls with deoptimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review 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/raw-machine-assembler.h ('k') | src/compiler/x64/code-generator-x64.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/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 #include "src/compiler/raw-machine-assembler.h" 6 #include "src/compiler/raw-machine-assembler.h"
7 #include "src/compiler/scheduler.h" 7 #include "src/compiler/scheduler.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 78
79 void RawMachineAssembler::Deoptimize(Node* state) { 79 void RawMachineAssembler::Deoptimize(Node* state) {
80 Node* deopt = graph()->NewNode(common()->Deoptimize(), state); 80 Node* deopt = graph()->NewNode(common()->Deoptimize(), state);
81 schedule()->AddDeoptimize(CurrentBlock(), deopt); 81 schedule()->AddDeoptimize(CurrentBlock(), deopt);
82 current_block_ = NULL; 82 current_block_ = NULL;
83 } 83 }
84 84
85 85
86 Node* RawMachineAssembler::CallFunctionStub0(Node* function, Node* receiver,
87 Node* context, Node* frame_state,
88 Label* continuation,
89 Label* deoptimization,
90 CallFunctionFlags flags) {
91 CallFunctionStub stub(isolate(), 0, flags);
92 CodeStubInterfaceDescriptor* d = isolate()->code_stub_interface_descriptor(
93 reinterpret_cast<CodeStub*>(&stub)->MajorKey());
94 stub.InitializeInterfaceDescriptor(d);
95
96 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
97 d, 1, static_cast<CallDescriptor::DeoptimizationSupport>(
98 CallDescriptor::kLazyDeoptimization |
99 CallDescriptor::kNeedsFrameState),
100 zone());
101 Node* stub_code = HeapConstant(stub.GetCode());
102 Node* call = graph()->NewNode(common()->Call(desc), stub_code, function,
103 receiver, context, frame_state);
104 schedule()->AddCall(CurrentBlock(), call, Use(continuation),
105 Use(deoptimization));
106 current_block_ = NULL;
107 return call;
108 }
109
110
86 Node* RawMachineAssembler::CallJS0(Node* function, Node* receiver, 111 Node* RawMachineAssembler::CallJS0(Node* function, Node* receiver,
87 Label* continuation, Label* deoptimization) { 112 Label* continuation, Label* deoptimization) {
88 CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(1, zone()); 113 CallDescriptor* descriptor = Linkage::GetJSCallDescriptor(1, zone());
89 Node* call = graph()->NewNode(common()->Call(descriptor), function, receiver); 114 Node* call = graph()->NewNode(common()->Call(descriptor), function, receiver);
90 schedule()->AddCall(CurrentBlock(), call, Use(continuation), 115 schedule()->AddCall(CurrentBlock(), call, Use(continuation),
91 Use(deoptimization)); 116 Use(deoptimization));
92 current_block_ = NULL; 117 current_block_ = NULL;
93 return call; 118 return call;
94 } 119 }
95 120
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 Node* node = graph()->NewNode(op, input_count, inputs); 174 Node* node = graph()->NewNode(op, input_count, inputs);
150 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start() 175 BasicBlock* block = op->opcode() == IrOpcode::kParameter ? schedule()->start()
151 : CurrentBlock(); 176 : CurrentBlock();
152 schedule()->AddNode(block, node); 177 schedule()->AddNode(block, node);
153 return node; 178 return node;
154 } 179 }
155 180
156 } // namespace compiler 181 } // namespace compiler
157 } // namespace internal 182 } // namespace internal
158 } // namespace v8 183 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698