| 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-assembler.h" | 5 #include "src/compiler/code-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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 return value; | 227 return value; |
| 228 } | 228 } |
| 229 | 229 |
| 230 Node* CodeAssembler::ChangeInt32ToIntPtr(Node* value) { | 230 Node* CodeAssembler::ChangeInt32ToIntPtr(Node* value) { |
| 231 if (raw_assembler_->machine()->Is64()) { | 231 if (raw_assembler_->machine()->Is64()) { |
| 232 value = raw_assembler_->ChangeInt32ToInt64(value); | 232 value = raw_assembler_->ChangeInt32ToInt64(value); |
| 233 } | 233 } |
| 234 return value; | 234 return value; |
| 235 } | 235 } |
| 236 | 236 |
| 237 Node* CodeAssembler::RoundIntPtrToFloat64(Node* value) { |
| 238 if (raw_assembler_->machine()->Is64()) { |
| 239 return raw_assembler_->RoundInt64ToFloat64(value); |
| 240 } |
| 241 return raw_assembler_->ChangeInt32ToFloat64(value); |
| 242 } |
| 243 |
| 237 #define DEFINE_CODE_ASSEMBLER_UNARY_OP(name) \ | 244 #define DEFINE_CODE_ASSEMBLER_UNARY_OP(name) \ |
| 238 Node* CodeAssembler::name(Node* a) { return raw_assembler_->name(a); } | 245 Node* CodeAssembler::name(Node* a) { return raw_assembler_->name(a); } |
| 239 CODE_ASSEMBLER_UNARY_OP_LIST(DEFINE_CODE_ASSEMBLER_UNARY_OP) | 246 CODE_ASSEMBLER_UNARY_OP_LIST(DEFINE_CODE_ASSEMBLER_UNARY_OP) |
| 240 #undef DEFINE_CODE_ASSEMBLER_UNARY_OP | 247 #undef DEFINE_CODE_ASSEMBLER_UNARY_OP |
| 241 | 248 |
| 242 Node* CodeAssembler::Load(MachineType rep, Node* base) { | 249 Node* CodeAssembler::Load(MachineType rep, Node* base) { |
| 243 return raw_assembler_->Load(rep, base); | 250 return raw_assembler_->Load(rep, base); |
| 244 } | 251 } |
| 245 | 252 |
| 246 Node* CodeAssembler::Load(MachineType rep, Node* base, Node* index) { | 253 Node* CodeAssembler::Load(MachineType rep, Node* base, Node* index) { |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 } | 1079 } |
| 1073 } | 1080 } |
| 1074 } | 1081 } |
| 1075 | 1082 |
| 1076 bound_ = true; | 1083 bound_ = true; |
| 1077 } | 1084 } |
| 1078 | 1085 |
| 1079 } // namespace compiler | 1086 } // namespace compiler |
| 1080 } // namespace internal | 1087 } // namespace internal |
| 1081 } // namespace v8 | 1088 } // namespace v8 |
| OLD | NEW |