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/flags.h" | 8 #include "vm/flags.h" |
9 #include "vm/flow_graph.h" | 9 #include "vm/flow_graph.h" |
10 #include "vm/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 intptr_t token_pos = builder->TokenPos(); | 297 intptr_t token_pos = builder->TokenPos(); |
298 builder->AddInstruction( | 298 builder->AddInstruction( |
299 new CheckSmiInstr(new Value(index), | 299 new CheckSmiInstr(new Value(index), |
300 Thread::kNoDeoptId, | 300 Thread::kNoDeoptId, |
301 token_pos)); | 301 token_pos)); |
302 | 302 |
303 Definition* length = builder->AddDefinition( | 303 Definition* length = builder->AddDefinition( |
304 new LoadFieldInstr(new Value(array), | 304 new LoadFieldInstr(new Value(array), |
305 length_offset, | 305 length_offset, |
306 Type::ZoneHandle(Type::SmiType()), | 306 Type::ZoneHandle(Type::SmiType()), |
307 Scanner::kNoSourcePos)); | 307 Token::kNoSourcePos)); |
308 builder->AddInstruction( | 308 builder->AddInstruction( |
309 new CheckArrayBoundInstr(new Value(length), | 309 new CheckArrayBoundInstr(new Value(length), |
310 new Value(index), | 310 new Value(index), |
311 Thread::kNoDeoptId)); | 311 Thread::kNoDeoptId)); |
312 } | 312 } |
313 | 313 |
314 | 314 |
315 bool Intrinsifier::Build_ObjectArrayGetIndexed(FlowGraph* flow_graph) { | 315 bool Intrinsifier::Build_ObjectArrayGetIndexed(FlowGraph* flow_graph) { |
316 GraphEntryInstr* graph_entry = flow_graph->graph_entry(); | 316 GraphEntryInstr* graph_entry = flow_graph->graph_entry(); |
317 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); | 317 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 new UnaryDoubleOpInstr(Token::kNEGATE, | 881 new UnaryDoubleOpInstr(Token::kNEGATE, |
882 new Value(unboxed_value), | 882 new Value(unboxed_value), |
883 Thread::kNoDeoptId)); | 883 Thread::kNoDeoptId)); |
884 Definition* result = builder.AddDefinition( | 884 Definition* result = builder.AddDefinition( |
885 BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result))); | 885 BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result))); |
886 builder.AddIntrinsicReturn(new Value(result)); | 886 builder.AddIntrinsicReturn(new Value(result)); |
887 return true; | 887 return true; |
888 } | 888 } |
889 | 889 |
890 } // namespace dart | 890 } // namespace dart |
OLD | NEW |