| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/code-stub-assembler.h" | 5 #include "src/compiler/code-stub-assembler.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 Node* CodeStubAssembler::IntPtrConstant(intptr_t value) { | 66 Node* CodeStubAssembler::IntPtrConstant(intptr_t value) { |
| 67 return raw_assembler_->IntPtrConstant(value); | 67 return raw_assembler_->IntPtrConstant(value); |
| 68 } | 68 } |
| 69 | 69 |
| 70 | 70 |
| 71 Node* CodeStubAssembler::NumberConstant(double value) { | 71 Node* CodeStubAssembler::NumberConstant(double value) { |
| 72 return raw_assembler_->NumberConstant(value); | 72 return raw_assembler_->NumberConstant(value); |
| 73 } | 73 } |
| 74 | 74 |
| 75 Node* CodeStubAssembler::SmiConstant(Smi* value) { |
| 76 return IntPtrConstant(bit_cast<intptr_t>(value)); |
| 77 } |
| 75 | 78 |
| 76 Node* CodeStubAssembler::HeapConstant(Handle<HeapObject> object) { | 79 Node* CodeStubAssembler::HeapConstant(Handle<HeapObject> object) { |
| 77 return raw_assembler_->HeapConstant(object); | 80 return raw_assembler_->HeapConstant(object); |
| 78 } | 81 } |
| 79 | 82 |
| 80 | 83 |
| 81 Node* CodeStubAssembler::BooleanConstant(bool value) { | 84 Node* CodeStubAssembler::BooleanConstant(bool value) { |
| 82 return raw_assembler_->BooleanConstant(value); | 85 return raw_assembler_->BooleanConstant(value); |
| 83 } | 86 } |
| 84 | 87 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 121 |
| 119 Node* CodeStubAssembler::SmiTag(Node* value) { | 122 Node* CodeStubAssembler::SmiTag(Node* value) { |
| 120 return raw_assembler_->WordShl(value, SmiShiftBitsConstant()); | 123 return raw_assembler_->WordShl(value, SmiShiftBitsConstant()); |
| 121 } | 124 } |
| 122 | 125 |
| 123 | 126 |
| 124 Node* CodeStubAssembler::SmiUntag(Node* value) { | 127 Node* CodeStubAssembler::SmiUntag(Node* value) { |
| 125 return raw_assembler_->WordSar(value, SmiShiftBitsConstant()); | 128 return raw_assembler_->WordSar(value, SmiShiftBitsConstant()); |
| 126 } | 129 } |
| 127 | 130 |
| 131 Node* CodeStubAssembler::SmiAdd(Node* a, Node* b) { return IntPtrAdd(a, b); } |
| 132 |
| 128 #define DEFINE_CODE_STUB_ASSEMBER_BINARY_OP(name) \ | 133 #define DEFINE_CODE_STUB_ASSEMBER_BINARY_OP(name) \ |
| 129 Node* CodeStubAssembler::name(Node* a, Node* b) { \ | 134 Node* CodeStubAssembler::name(Node* a, Node* b) { \ |
| 130 return raw_assembler_->name(a, b); \ | 135 return raw_assembler_->name(a, b); \ |
| 131 } | 136 } |
| 132 CODE_STUB_ASSEMBLER_BINARY_OP_LIST(DEFINE_CODE_STUB_ASSEMBER_BINARY_OP) | 137 CODE_STUB_ASSEMBLER_BINARY_OP_LIST(DEFINE_CODE_STUB_ASSEMBER_BINARY_OP) |
| 133 #undef DEFINE_CODE_STUB_ASSEMBER_BINARY_OP | 138 #undef DEFINE_CODE_STUB_ASSEMBER_BINARY_OP |
| 134 | 139 |
| 135 Node* CodeStubAssembler::ChangeInt32ToInt64(Node* value) { | 140 Node* CodeStubAssembler::ChangeInt32ToInt64(Node* value) { |
| 136 return raw_assembler_->ChangeInt32ToInt64(value); | 141 return raw_assembler_->ChangeInt32ToInt64(value); |
| 137 } | 142 } |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 } | 611 } |
| 607 } | 612 } |
| 608 } | 613 } |
| 609 | 614 |
| 610 bound_ = true; | 615 bound_ = true; |
| 611 } | 616 } |
| 612 | 617 |
| 613 } // namespace compiler | 618 } // namespace compiler |
| 614 } // namespace internal | 619 } // namespace internal |
| 615 } // namespace v8 | 620 } // namespace v8 |
| OLD | NEW |