OLD | NEW |
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-factory.h" |
6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
10 #include "src/compiler/node-aux-data-inl.h" | 10 #include "src/compiler/node-aux-data-inl.h" |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); | 280 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
281 if (FLAG_vector_ics) { | 281 if (FLAG_vector_ics) { |
282 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().index())); | 282 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().index())); |
283 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); | 283 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); |
284 } | 284 } |
285 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 285 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
286 } | 286 } |
287 | 287 |
288 | 288 |
289 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 289 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
290 StrictMode strict_mode = OpParameter<StrictMode>(node); | 290 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
291 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode); | 291 Callable callable = CodeFactory::KeyedStoreIC(isolate(), language_mode); |
292 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 292 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
293 } | 293 } |
294 | 294 |
295 | 295 |
296 void JSGenericLowering::LowerJSStoreNamed(Node* node) { | 296 void JSGenericLowering::LowerJSStoreNamed(Node* node) { |
297 const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); | 297 const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); |
298 Callable callable = CodeFactory::StoreIC(isolate(), p.strict_mode()); | 298 Callable callable = CodeFactory::StoreIC(isolate(), p.language_mode()); |
299 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); | 299 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
300 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 300 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
301 } | 301 } |
302 | 302 |
303 | 303 |
304 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 304 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { |
305 StrictMode strict_mode = OpParameter<StrictMode>(node); | 305 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
306 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3); | 306 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3); |
307 PatchInsertInput(node, 4, jsgraph()->SmiConstant(strict_mode)); | 307 PatchInsertInput(node, 4, jsgraph()->SmiConstant(language_mode)); |
308 } | 308 } |
309 | 309 |
310 | 310 |
311 void JSGenericLowering::LowerJSHasProperty(Node* node) { | 311 void JSGenericLowering::LowerJSHasProperty(Node* node) { |
312 ReplaceWithBuiltinCall(node, Builtins::IN, 2); | 312 ReplaceWithBuiltinCall(node, Builtins::IN, 2); |
313 } | 313 } |
314 | 314 |
315 | 315 |
316 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 316 void JSGenericLowering::LowerJSInstanceOf(Node* node) { |
317 InstanceofStub::Flags flags = static_cast<InstanceofStub::Flags>( | 317 InstanceofStub::Flags flags = static_cast<InstanceofStub::Flags>( |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 | 436 |
437 void JSGenericLowering::LowerJSCallRuntime(Node* node) { | 437 void JSGenericLowering::LowerJSCallRuntime(Node* node) { |
438 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); | 438 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); |
439 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); | 439 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); |
440 } | 440 } |
441 | 441 |
442 } // namespace compiler | 442 } // namespace compiler |
443 } // namespace internal | 443 } // namespace internal |
444 } // namespace v8 | 444 } // namespace v8 |
OLD | NEW |