OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // Class for intrinsifying functions. | 4 // Class for intrinsifying functions. |
5 | 5 |
6 #include "vm/assembler.h" | 6 #include "vm/assembler.h" |
7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
8 #include "vm/cpu.h" | 8 #include "vm/cpu.h" |
9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 Definition* AddDefinition(Definition* def) { | 303 Definition* AddDefinition(Definition* def) { |
304 def->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index()); | 304 def->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index()); |
305 AddInstruction(def); | 305 AddInstruction(def); |
306 return def; | 306 return def; |
307 } | 307 } |
308 | 308 |
309 Instruction* AddInstruction(Instruction* instr) { | 309 Instruction* AddInstruction(Instruction* instr) { |
310 if (instr->ComputeCanDeoptimize()) { | 310 if (instr->ComputeCanDeoptimize()) { |
311 // Since we use the presence of an environment to determine if an | 311 // Since we use the presence of an environment to determine if an |
312 // instructions can deoptimize, we need an empty enviroment for | 312 // instructions can deoptimize, we need an empty environment for |
313 // instructions that "deoptimize" to the intrinsic fall-through code. | 313 // instructions that "deoptimize" to the intrinsic fall-through code. |
314 instr->SetEnvironment(fall_through_env_); | 314 instr->SetEnvironment(fall_through_env_); |
315 } | 315 } |
316 current_ = current_->AppendInstruction(instr); | 316 current_ = current_->AppendInstruction(instr); |
317 return instr; | 317 return instr; |
318 } | 318 } |
319 | 319 |
320 void AddIntrinsicReturn(Value* value) { | 320 void AddIntrinsicReturn(Value* value) { |
321 ReturnInstr* instr = new ReturnInstr(TokenPos(), value); | 321 ReturnInstr* instr = new ReturnInstr(TokenPos(), value); |
322 AddInstruction(instr); | 322 AddInstruction(instr); |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 } | 1181 } |
1182 | 1182 |
1183 | 1183 |
1184 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { | 1184 void Intrinsifier::RegExp_ExecuteMatchSticky(Assembler* assembler) { |
1185 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); | 1185 IntrinsifyRegExpExecuteMatch(assembler, /*sticky=*/true); |
1186 } | 1186 } |
1187 #endif // !defined(TARGET_ARCH_DBC) | 1187 #endif // !defined(TARGET_ARCH_DBC) |
1188 | 1188 |
1189 | 1189 |
1190 } // namespace dart | 1190 } // namespace dart |
OLD | NEW |