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

Side by Side Diff: src/compiler/js-generic-lowering.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.h ('k') | src/compiler/raw-machine-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 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/code-stubs.h" 6 #include "src/code-stubs.h"
6 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
7 #include "src/compiler/graph-inl.h" 8 #include "src/compiler/graph-inl.h"
8 #include "src/compiler/js-generic-lowering.h" 9 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-aux-data-inl.h" 11 #include "src/compiler/node-aux-data-inl.h"
11 #include "src/compiler/node-properties-inl.h" 12 #include "src/compiler/node-properties-inl.h"
12 #include "src/unique.h" 13 #include "src/unique.h"
13 14
14 namespace v8 { 15 namespace v8 {
15 namespace internal { 16 namespace internal {
16 namespace compiler { 17 namespace compiler {
17 18
18
19 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub
20 // which doesn't have an interface descriptor yet. It mimics a hydrogen code
21 // stub for the underlying IC stub code.
22 class LoadICStubShim : public HydrogenCodeStub {
23 public:
24 LoadICStubShim(Isolate* isolate, ContextualMode contextual_mode)
25 : HydrogenCodeStub(isolate), contextual_mode_(contextual_mode) {}
26
27 virtual Handle<Code> GenerateCode() OVERRIDE {
28 ExtraICState extra_state = LoadIC::ComputeExtraICState(contextual_mode_);
29 return LoadIC::initialize_stub(isolate(), extra_state);
30 }
31
32 virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
33 return LoadDescriptor(isolate());
34 }
35
36 private:
37 virtual Major MajorKey() const OVERRIDE { return NoCache; }
38 virtual bool UseSpecialCache() OVERRIDE { return true; }
39
40 ContextualMode contextual_mode_;
41 };
42
43
44 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub
45 // which doesn't have an interface descriptor yet. It mimics a hydrogen code
46 // stub for the underlying IC stub code.
47 class KeyedLoadICStubShim : public HydrogenCodeStub {
48 public:
49 explicit KeyedLoadICStubShim(Isolate* isolate) : HydrogenCodeStub(isolate) {}
50
51 virtual Handle<Code> GenerateCode() OVERRIDE {
52 return isolate()->builtins()->KeyedLoadIC_Initialize();
53 }
54
55 virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
56 return LoadDescriptor(isolate());
57 }
58
59 private:
60 virtual Major MajorKey() const OVERRIDE { return NoCache; }
61 virtual bool UseSpecialCache() OVERRIDE { return true; }
62 };
63
64
65 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub
66 // which doesn't have an interface descriptor yet. It mimics a hydrogen code
67 // stub for the underlying IC stub code.
68 class StoreICStubShim : public HydrogenCodeStub {
69 public:
70 StoreICStubShim(Isolate* isolate, StrictMode strict_mode)
71 : HydrogenCodeStub(isolate), strict_mode_(strict_mode) {}
72
73 virtual Handle<Code> GenerateCode() OVERRIDE {
74 return StoreIC::initialize_stub(isolate(), strict_mode_);
75 }
76
77 virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
78 return StoreDescriptor(isolate());
79 }
80
81 private:
82 virtual Major MajorKey() const OVERRIDE { return NoCache; }
83 virtual bool UseSpecialCache() OVERRIDE { return true; }
84
85 StrictMode strict_mode_;
86 };
87
88
89 // TODO(mstarzinger): This is a temporary shim to be able to call an IC stub
90 // which doesn't have an interface descriptor yet. It mimics a hydrogen code
91 // stub for the underlying IC stub code.
92 class KeyedStoreICStubShim : public HydrogenCodeStub {
93 public:
94 KeyedStoreICStubShim(Isolate* isolate, StrictMode strict_mode)
95 : HydrogenCodeStub(isolate), strict_mode_(strict_mode) {}
96
97 virtual Handle<Code> GenerateCode() OVERRIDE {
98 return strict_mode_ == SLOPPY
99 ? isolate()->builtins()->KeyedStoreIC_Initialize()
100 : isolate()->builtins()->KeyedStoreIC_Initialize_Strict();
101 }
102
103 virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
104 return StoreDescriptor(isolate());
105 }
106
107 private:
108 virtual Major MajorKey() const OVERRIDE { return NoCache; }
109 virtual bool UseSpecialCache() OVERRIDE { return true; }
110
111 StrictMode strict_mode_;
112 };
113
114
115 JSGenericLowering::JSGenericLowering(CompilationInfo* info, JSGraph* jsgraph, 19 JSGenericLowering::JSGenericLowering(CompilationInfo* info, JSGraph* jsgraph,
116 MachineOperatorBuilder* machine) 20 MachineOperatorBuilder* machine)
117 : info_(info), 21 : info_(info),
118 jsgraph_(jsgraph), 22 jsgraph_(jsgraph),
119 linkage_(new (jsgraph->zone()) Linkage(info)), 23 linkage_(new (jsgraph->zone()) Linkage(info)),
120 machine_(machine) {} 24 machine_(machine) {}
121 25
122 26
123 void JSGenericLowering::PatchOperator(Node* node, const Operator* op) { 27 void JSGenericLowering::PatchOperator(Node* node, const Operator* op) {
124 node->set_op(op); 28 node->set_op(op);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 #undef DECLARE_CASE 72 #undef DECLARE_CASE
169 default: 73 default:
170 // Nothing to see. 74 // Nothing to see.
171 return NoChange(); 75 return NoChange();
172 } 76 }
173 DCHECK_EQ(node, replacement); 77 DCHECK_EQ(node, replacement);
174 return Changed(replacement); 78 return Changed(replacement);
175 } 79 }
176 80
177 81
178 #define REPLACE_BINARY_OP_IC_CALL(op, token) \ 82 #define REPLACE_BINARY_OP_IC_CALL(op, token) \
179 Node* JSGenericLowering::Lower##op(Node* node) { \ 83 Node* JSGenericLowering::Lower##op(Node* node) { \
180 BinaryOpICStub stub(isolate(), token); \ 84 ReplaceWithStubCall(node, CodeFactory::BinaryOpIC(isolate(), token), \
181 ReplaceWithStubCall(node, &stub, \ 85 CallDescriptor::kPatchableCallSiteWithNop); \
182 CallDescriptor::kPatchableCallSiteWithNop); \ 86 return node; \
183 return node; \
184 } 87 }
185 REPLACE_BINARY_OP_IC_CALL(JSBitwiseOr, Token::BIT_OR) 88 REPLACE_BINARY_OP_IC_CALL(JSBitwiseOr, Token::BIT_OR)
186 REPLACE_BINARY_OP_IC_CALL(JSBitwiseXor, Token::BIT_XOR) 89 REPLACE_BINARY_OP_IC_CALL(JSBitwiseXor, Token::BIT_XOR)
187 REPLACE_BINARY_OP_IC_CALL(JSBitwiseAnd, Token::BIT_AND) 90 REPLACE_BINARY_OP_IC_CALL(JSBitwiseAnd, Token::BIT_AND)
188 REPLACE_BINARY_OP_IC_CALL(JSShiftLeft, Token::SHL) 91 REPLACE_BINARY_OP_IC_CALL(JSShiftLeft, Token::SHL)
189 REPLACE_BINARY_OP_IC_CALL(JSShiftRight, Token::SAR) 92 REPLACE_BINARY_OP_IC_CALL(JSShiftRight, Token::SAR)
190 REPLACE_BINARY_OP_IC_CALL(JSShiftRightLogical, Token::SHR) 93 REPLACE_BINARY_OP_IC_CALL(JSShiftRightLogical, Token::SHR)
191 REPLACE_BINARY_OP_IC_CALL(JSAdd, Token::ADD) 94 REPLACE_BINARY_OP_IC_CALL(JSAdd, Token::ADD)
192 REPLACE_BINARY_OP_IC_CALL(JSSubtract, Token::SUB) 95 REPLACE_BINARY_OP_IC_CALL(JSSubtract, Token::SUB)
193 REPLACE_BINARY_OP_IC_CALL(JSMultiply, Token::MUL) 96 REPLACE_BINARY_OP_IC_CALL(JSMultiply, Token::MUL)
194 REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV) 97 REPLACE_BINARY_OP_IC_CALL(JSDivide, Token::DIV)
195 REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD) 98 REPLACE_BINARY_OP_IC_CALL(JSModulus, Token::MOD)
196 #undef REPLACE_BINARY_OP_IC_CALL 99 #undef REPLACE_BINARY_OP_IC_CALL
197 100
198 101
199 #define REPLACE_STUB_CALL(op, StubDeclaration) \ 102 #define REPLACE_FACTORY_CALL(op, FactoryDeclaration) \
200 Node* JSGenericLowering::Lower##op(Node* node) { \ 103 Node* JSGenericLowering::Lower##op(Node* node) { \
201 StubDeclaration; \ 104 Callable callable = FactoryDeclaration; \
202 ReplaceWithStubCall(node, &stub, CallDescriptor::kNoFlags); \ 105 ReplaceWithStubCall(node, callable, CallDescriptor::kNoFlags); \
203 return node; \ 106 return node; \
204 } 107 }
205 REPLACE_STUB_CALL(JSToNumber, ToNumberStub stub(isolate())) 108 REPLACE_FACTORY_CALL(JSToNumber, CodeFactory::ToNumber(isolate()))
206 #undef REPLACE_STUB_CALL 109 #undef REPLACE_FACTORY_CALL
207 110
208 111
209 #define REPLACE_COMPARE_IC_CALL(op, token, pure) \ 112 #define REPLACE_COMPARE_IC_CALL(op, token, pure) \
210 Node* JSGenericLowering::Lower##op(Node* node) { \ 113 Node* JSGenericLowering::Lower##op(Node* node) { \
211 ReplaceWithCompareIC(node, token, pure); \ 114 ReplaceWithCompareIC(node, token, pure); \
212 return node; \ 115 return node; \
213 } 116 }
214 REPLACE_COMPARE_IC_CALL(JSEqual, Token::EQ, false) 117 REPLACE_COMPARE_IC_CALL(JSEqual, Token::EQ, false)
215 REPLACE_COMPARE_IC_CALL(JSNotEqual, Token::NE, false) 118 REPLACE_COMPARE_IC_CALL(JSNotEqual, Token::NE, false)
216 REPLACE_COMPARE_IC_CALL(JSStrictEqual, Token::EQ_STRICT, true) 119 REPLACE_COMPARE_IC_CALL(JSStrictEqual, Token::EQ_STRICT, true)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 CallDescriptor::Flags result = CallDescriptor::kNoFlags; 156 CallDescriptor::Flags result = CallDescriptor::kNoFlags;
254 if (OperatorProperties::HasFrameStateInput(node->op())) { 157 if (OperatorProperties::HasFrameStateInput(node->op())) {
255 result |= CallDescriptor::kNeedsFrameState; 158 result |= CallDescriptor::kNeedsFrameState;
256 } 159 }
257 return result; 160 return result;
258 } 161 }
259 162
260 163
261 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token, 164 void JSGenericLowering::ReplaceWithCompareIC(Node* node, Token::Value token,
262 bool pure) { 165 bool pure) {
263 BinaryOpICStub stub(isolate(), Token::ADD); // TODO(mstarzinger): Hack. 166 Callable callable = CodeFactory::CompareIC(isolate(), token);
264 CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor();
265 bool has_frame_state = OperatorProperties::HasFrameStateInput(node->op()); 167 bool has_frame_state = OperatorProperties::HasFrameStateInput(node->op());
266 CallDescriptor* desc_compare = linkage()->GetStubCallDescriptor( 168 CallDescriptor* desc_compare = linkage()->GetStubCallDescriptor(
267 d, 0, CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node)); 169 callable.descriptor(), 0,
268 Handle<Code> ic = CompareIC::GetUninitialized(isolate(), token); 170 CallDescriptor::kPatchableCallSiteWithNop | FlagsForNode(node));
269 NodeVector inputs(zone()); 171 NodeVector inputs(zone());
270 inputs.reserve(node->InputCount() + 1); 172 inputs.reserve(node->InputCount() + 1);
271 inputs.push_back(CodeConstant(ic)); 173 inputs.push_back(CodeConstant(callable.code()));
272 inputs.push_back(NodeProperties::GetValueInput(node, 0)); 174 inputs.push_back(NodeProperties::GetValueInput(node, 0));
273 inputs.push_back(NodeProperties::GetValueInput(node, 1)); 175 inputs.push_back(NodeProperties::GetValueInput(node, 1));
274 inputs.push_back(NodeProperties::GetContextInput(node)); 176 inputs.push_back(NodeProperties::GetContextInput(node));
275 if (pure) { 177 if (pure) {
276 // A pure (strict) comparison doesn't have an effect, control or frame 178 // A pure (strict) comparison doesn't have an effect, control or frame
277 // state. But for the graph, we need to add control and effect inputs. 179 // state. But for the graph, we need to add control and effect inputs.
278 DCHECK(!has_frame_state); 180 DCHECK(!has_frame_state);
279 inputs.push_back(graph()->start()); 181 inputs.push_back(graph()->start());
280 inputs.push_back(graph()->start()); 182 inputs.push_back(graph()->start());
281 } else { 183 } else {
(...skipping 20 matching lines...) Expand all
302 node->ReplaceInput(dest, node->InputAt(i)); 204 node->ReplaceInput(dest, node->InputAt(i));
303 dest++; 205 dest++;
304 } 206 }
305 node->TrimInputCount(dest); 207 node->TrimInputCount(dest);
306 } 208 }
307 209
308 ReplaceWithRuntimeCall(node, Runtime::kBooleanize); 210 ReplaceWithRuntimeCall(node, Runtime::kBooleanize);
309 } 211 }
310 212
311 213
312 void JSGenericLowering::ReplaceWithStubCall(Node* node, HydrogenCodeStub* stub, 214 void JSGenericLowering::ReplaceWithStubCall(Node* node, Callable callable,
313 CallDescriptor::Flags flags) { 215 CallDescriptor::Flags flags) {
314 CallInterfaceDescriptor d = stub->GetCallInterfaceDescriptor(); 216 CallDescriptor* desc = linkage()->GetStubCallDescriptor(
315 CallDescriptor* desc = 217 callable.descriptor(), 0, flags | FlagsForNode(node));
316 linkage()->GetStubCallDescriptor(d, 0, flags | FlagsForNode(node)); 218 Node* stub_code = CodeConstant(callable.code());
317 Node* stub_code = CodeConstant(stub->GetCode());
318 PatchInsertInput(node, 0, stub_code); 219 PatchInsertInput(node, 0, stub_code);
319 PatchOperator(node, common()->Call(desc)); 220 PatchOperator(node, common()->Call(desc));
320 } 221 }
321 222
322 223
323 void JSGenericLowering::ReplaceWithBuiltinCall(Node* node, 224 void JSGenericLowering::ReplaceWithBuiltinCall(Node* node,
324 Builtins::JavaScript id, 225 Builtins::JavaScript id,
325 int nargs) { 226 int nargs) {
326 CallFunctionStub stub(isolate(), nargs - 1, NO_CALL_FUNCTION_FLAGS); 227 Callable callable =
327 CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor(); 228 CodeFactory::CallFunction(isolate(), nargs - 1, NO_CALL_FUNCTION_FLAGS);
328 CallDescriptor* desc = linkage()->GetStubCallDescriptor(d, nargs); 229 CallDescriptor* desc =
230 linkage()->GetStubCallDescriptor(callable.descriptor(), nargs);
329 // TODO(mstarzinger): Accessing the builtins object this way prevents sharing 231 // TODO(mstarzinger): Accessing the builtins object this way prevents sharing
330 // of code across native contexts. Fix this by loading from given context. 232 // of code across native contexts. Fix this by loading from given context.
331 Handle<JSFunction> function( 233 Handle<JSFunction> function(
332 JSFunction::cast(info()->context()->builtins()->javascript_builtin(id))); 234 JSFunction::cast(info()->context()->builtins()->javascript_builtin(id)));
333 Node* stub_code = CodeConstant(stub.GetCode()); 235 Node* stub_code = CodeConstant(callable.code());
334 Node* function_node = FunctionConstant(function); 236 Node* function_node = FunctionConstant(function);
335 PatchInsertInput(node, 0, stub_code); 237 PatchInsertInput(node, 0, stub_code);
336 PatchInsertInput(node, 1, function_node); 238 PatchInsertInput(node, 1, function_node);
337 PatchOperator(node, common()->Call(desc)); 239 PatchOperator(node, common()->Call(desc));
338 } 240 }
339 241
340 242
341 void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, 243 void JSGenericLowering::ReplaceWithRuntimeCall(Node* node,
342 Runtime::FunctionId f, 244 Runtime::FunctionId f,
343 int nargs_override) { 245 int nargs_override) {
(...skipping 21 matching lines...) Expand all
365 // poor-man's representation inference here and insert manual change. 267 // poor-man's representation inference here and insert manual change.
366 Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0), 268 Node* test = graph()->NewNode(machine()->WordEqual(), node->InputAt(0),
367 jsgraph()->TrueConstant()); 269 jsgraph()->TrueConstant());
368 node->ReplaceInput(0, test); 270 node->ReplaceInput(0, test);
369 } 271 }
370 return node; 272 return node;
371 } 273 }
372 274
373 275
374 Node* JSGenericLowering::LowerJSUnaryNot(Node* node) { 276 Node* JSGenericLowering::LowerJSUnaryNot(Node* node) {
375 ToBooleanStub stub(isolate(), ToBooleanStub::RESULT_AS_INVERSE_ODDBALL); 277 Callable callable = CodeFactory::ToBoolean(
376 ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite); 278 isolate(), ToBooleanStub::RESULT_AS_INVERSE_ODDBALL);
279 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite);
377 return node; 280 return node;
378 } 281 }
379 282
380 283
381 Node* JSGenericLowering::LowerJSToBoolean(Node* node) { 284 Node* JSGenericLowering::LowerJSToBoolean(Node* node) {
382 ToBooleanStub stub(isolate(), ToBooleanStub::RESULT_AS_ODDBALL); 285 Callable callable =
383 ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite); 286 CodeFactory::ToBoolean(isolate(), ToBooleanStub::RESULT_AS_ODDBALL);
287 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite);
384 return node; 288 return node;
385 } 289 }
386 290
387 291
388 Node* JSGenericLowering::LowerJSToString(Node* node) { 292 Node* JSGenericLowering::LowerJSToString(Node* node) {
389 ReplaceWithBuiltinCall(node, Builtins::TO_STRING, 1); 293 ReplaceWithBuiltinCall(node, Builtins::TO_STRING, 1);
390 return node; 294 return node;
391 } 295 }
392 296
393 297
394 Node* JSGenericLowering::LowerJSToObject(Node* node) { 298 Node* JSGenericLowering::LowerJSToObject(Node* node) {
395 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); 299 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1);
396 return node; 300 return node;
397 } 301 }
398 302
399 303
400 Node* JSGenericLowering::LowerJSLoadProperty(Node* node) { 304 Node* JSGenericLowering::LowerJSLoadProperty(Node* node) {
401 KeyedLoadICStubShim stub(isolate()); 305 Callable callable = CodeFactory::KeyedLoadIC(isolate());
402 ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite); 306 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite);
403 return node; 307 return node;
404 } 308 }
405 309
406 310
407 Node* JSGenericLowering::LowerJSLoadNamed(Node* node) { 311 Node* JSGenericLowering::LowerJSLoadNamed(Node* node) {
408 LoadNamedParameters p = OpParameter<LoadNamedParameters>(node); 312 LoadNamedParameters p = OpParameter<LoadNamedParameters>(node);
409 LoadICStubShim stub(isolate(), p.contextual_mode);
410 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name)); 313 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name));
411 ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite); 314 Callable callable = CodeFactory::LoadIC(isolate(), p.contextual_mode);
315 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite);
412 return node; 316 return node;
413 } 317 }
414 318
415 319
416 Node* JSGenericLowering::LowerJSStoreProperty(Node* node) { 320 Node* JSGenericLowering::LowerJSStoreProperty(Node* node) {
417 StrictMode strict_mode = OpParameter<StrictMode>(node); 321 StrictMode strict_mode = OpParameter<StrictMode>(node);
418 KeyedStoreICStubShim stub(isolate(), strict_mode); 322 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode);
419 ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite); 323 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite);
420 return node; 324 return node;
421 } 325 }
422 326
423 327
424 Node* JSGenericLowering::LowerJSStoreNamed(Node* node) { 328 Node* JSGenericLowering::LowerJSStoreNamed(Node* node) {
425 StoreNamedParameters params = OpParameter<StoreNamedParameters>(node); 329 StoreNamedParameters params = OpParameter<StoreNamedParameters>(node);
426 StoreICStubShim stub(isolate(), params.strict_mode); 330 Callable callable = CodeFactory::StoreIC(isolate(), params.strict_mode);
427 PatchInsertInput(node, 1, jsgraph()->HeapConstant(params.name)); 331 PatchInsertInput(node, 1, jsgraph()->HeapConstant(params.name));
428 ReplaceWithStubCall(node, &stub, CallDescriptor::kPatchableCallSite); 332 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite);
429 return node; 333 return node;
430 } 334 }
431 335
432 336
433 Node* JSGenericLowering::LowerJSDeleteProperty(Node* node) { 337 Node* JSGenericLowering::LowerJSDeleteProperty(Node* node) {
434 StrictMode strict_mode = OpParameter<StrictMode>(node); 338 StrictMode strict_mode = OpParameter<StrictMode>(node);
435 PatchInsertInput(node, 2, SmiConstant(strict_mode)); 339 PatchInsertInput(node, 2, SmiConstant(strict_mode));
436 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3); 340 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3);
437 return node; 341 return node;
438 } 342 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) { 432 Node* JSGenericLowering::LowerJSCallRuntime(Node* node) {
529 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node); 433 Runtime::FunctionId function = OpParameter<Runtime::FunctionId>(node);
530 int arity = OperatorProperties::GetValueInputCount(node->op()); 434 int arity = OperatorProperties::GetValueInputCount(node->op());
531 ReplaceWithRuntimeCall(node, function, arity); 435 ReplaceWithRuntimeCall(node, function, arity);
532 return node; 436 return node;
533 } 437 }
534 438
535 } // namespace compiler 439 } // namespace compiler
536 } // namespace internal 440 } // namespace internal
537 } // namespace v8 441 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.h ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698