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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); | 279 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
280 if (FLAG_vector_ics) { | 280 if (FLAG_vector_ics) { |
281 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().index())); | 281 PatchInsertInput(node, 2, jsgraph()->SmiConstant(p.feedback().index())); |
282 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); | 282 PatchInsertInput(node, 3, jsgraph()->HeapConstant(p.feedback().vector())); |
283 } | 283 } |
284 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 284 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
285 } | 285 } |
286 | 286 |
287 | 287 |
288 void JSGenericLowering::LowerJSStoreProperty(Node* node) { | 288 void JSGenericLowering::LowerJSStoreProperty(Node* node) { |
289 StrictMode strict_mode = OpParameter<StrictMode>(node); | 289 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
290 Callable callable = CodeFactory::KeyedStoreIC(isolate(), strict_mode); | 290 Callable callable = CodeFactory::KeyedStoreIC(isolate(), language_mode); |
291 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 291 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
292 } | 292 } |
293 | 293 |
294 | 294 |
295 void JSGenericLowering::LowerJSStoreNamed(Node* node) { | 295 void JSGenericLowering::LowerJSStoreNamed(Node* node) { |
296 const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); | 296 const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); |
297 Callable callable = CodeFactory::StoreIC(isolate(), p.strict_mode()); | 297 Callable callable = CodeFactory::StoreIC(isolate(), p.language_mode()); |
298 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); | 298 PatchInsertInput(node, 1, jsgraph()->HeapConstant(p.name())); |
299 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); | 299 ReplaceWithStubCall(node, callable, CallDescriptor::kPatchableCallSite); |
300 } | 300 } |
301 | 301 |
302 | 302 |
303 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { | 303 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { |
304 StrictMode strict_mode = OpParameter<StrictMode>(node); | 304 LanguageMode language_mode = OpParameter<LanguageMode>(node); |
305 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3); | 305 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3); |
306 PatchInsertInput(node, 4, jsgraph()->SmiConstant(strict_mode)); | 306 PatchInsertInput(node, 4, jsgraph()->SmiConstant(language_mode)); |
307 } | 307 } |
308 | 308 |
309 | 309 |
310 void JSGenericLowering::LowerJSHasProperty(Node* node) { | 310 void JSGenericLowering::LowerJSHasProperty(Node* node) { |
311 ReplaceWithBuiltinCall(node, Builtins::IN, 2); | 311 ReplaceWithBuiltinCall(node, Builtins::IN, 2); |
312 } | 312 } |
313 | 313 |
314 | 314 |
315 void JSGenericLowering::LowerJSInstanceOf(Node* node) { | 315 void JSGenericLowering::LowerJSInstanceOf(Node* node) { |
316 InstanceofStub::Flags flags = static_cast<InstanceofStub::Flags>( | 316 InstanceofStub::Flags flags = static_cast<InstanceofStub::Flags>( |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 441 |
442 | 442 |
443 void JSGenericLowering::LowerJSCallRuntime(Node* node) { | 443 void JSGenericLowering::LowerJSCallRuntime(Node* node) { |
444 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); | 444 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); |
445 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); | 445 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); |
446 } | 446 } |
447 | 447 |
448 } // namespace compiler | 448 } // namespace compiler |
449 } // namespace internal | 449 } // namespace internal |
450 } // namespace v8 | 450 } // namespace v8 |
OLD | NEW |