OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 4548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4559 assembler->Return(value); | 4559 assembler->Return(value); |
4560 | 4560 |
4561 assembler->Bind(&miss); | 4561 assembler->Bind(&miss); |
4562 { | 4562 { |
4563 assembler->Comment("Miss"); | 4563 assembler->Comment("Miss"); |
4564 assembler->TailCallRuntime(Runtime::kStoreIC_Miss, context, receiver, name, | 4564 assembler->TailCallRuntime(Runtime::kStoreIC_Miss, context, receiver, name, |
4565 value, slot, vector); | 4565 value, slot, vector); |
4566 } | 4566 } |
4567 } | 4567 } |
4568 | 4568 |
| 4569 void KeyedLoadSloppyArgumentsStub::GenerateAssembly( |
| 4570 CodeStubAssembler* assembler) const { |
| 4571 typedef CodeStubAssembler::Label Label; |
| 4572 typedef compiler::Node Node; |
| 4573 |
| 4574 Node* receiver = assembler->Parameter(Descriptor::kReceiver); |
| 4575 Node* key = assembler->Parameter(Descriptor::kName); |
| 4576 Node* slot = assembler->Parameter(Descriptor::kSlot); |
| 4577 Node* vector = assembler->Parameter(Descriptor::kVector); |
| 4578 Node* context = assembler->Parameter(Descriptor::kContext); |
| 4579 |
| 4580 Label miss(assembler); |
| 4581 |
| 4582 Node* result = assembler->LoadKeyedSloppyArguments(receiver, key, &miss); |
| 4583 assembler->Return(result); |
| 4584 |
| 4585 assembler->Bind(&miss); |
| 4586 { |
| 4587 assembler->Comment("Miss"); |
| 4588 assembler->TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver, |
| 4589 key, slot, vector); |
| 4590 } |
| 4591 } |
| 4592 |
| 4593 void KeyedStoreSloppyArgumentsStub::GenerateAssembly( |
| 4594 CodeStubAssembler* assembler) const { |
| 4595 typedef CodeStubAssembler::Label Label; |
| 4596 typedef compiler::Node Node; |
| 4597 |
| 4598 Node* receiver = assembler->Parameter(Descriptor::kReceiver); |
| 4599 Node* key = assembler->Parameter(Descriptor::kName); |
| 4600 Node* value = assembler->Parameter(Descriptor::kValue); |
| 4601 Node* slot = assembler->Parameter(Descriptor::kSlot); |
| 4602 Node* vector = assembler->Parameter(Descriptor::kVector); |
| 4603 Node* context = assembler->Parameter(Descriptor::kContext); |
| 4604 |
| 4605 Label miss(assembler); |
| 4606 |
| 4607 assembler->StoreKeyedSloppyArguments(receiver, key, value, &miss); |
| 4608 assembler->Return(value); |
| 4609 |
| 4610 assembler->Bind(&miss); |
| 4611 { |
| 4612 assembler->Comment("Miss"); |
| 4613 assembler->TailCallRuntime(Runtime::kKeyedStoreIC_Miss, context, receiver, |
| 4614 key, value, slot, vector); |
| 4615 } |
| 4616 } |
| 4617 |
4569 // static | 4618 // static |
4570 compiler::Node* LessThanStub::Generate(CodeStubAssembler* assembler, | 4619 compiler::Node* LessThanStub::Generate(CodeStubAssembler* assembler, |
4571 compiler::Node* lhs, compiler::Node* rhs, | 4620 compiler::Node* lhs, compiler::Node* rhs, |
4572 compiler::Node* context) { | 4621 compiler::Node* context) { |
4573 return GenerateAbstractRelationalComparison(assembler, kLessThan, lhs, rhs, | 4622 return GenerateAbstractRelationalComparison(assembler, kLessThan, lhs, rhs, |
4574 context); | 4623 context); |
4575 } | 4624 } |
4576 | 4625 |
4577 // static | 4626 // static |
4578 compiler::Node* LessThanOrEqualStub::Generate(CodeStubAssembler* assembler, | 4627 compiler::Node* LessThanOrEqualStub::Generate(CodeStubAssembler* assembler, |
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5981 | 6030 |
5982 if (type == MachineType::Pointer()) { | 6031 if (type == MachineType::Pointer()) { |
5983 return Representation::External(); | 6032 return Representation::External(); |
5984 } | 6033 } |
5985 | 6034 |
5986 return Representation::Tagged(); | 6035 return Representation::Tagged(); |
5987 } | 6036 } |
5988 | 6037 |
5989 } // namespace internal | 6038 } // namespace internal |
5990 } // namespace v8 | 6039 } // namespace v8 |
OLD | NEW |