| 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 | 4 |
| 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_ | 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_ |
| 6 #define VM_FLOW_GRAPH_BUILDER_H_ | 6 #define VM_FLOW_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| 11 #include "vm/intermediate_language.h" | 11 #include "vm/intermediate_language.h" |
| 12 | 12 |
| 13 namespace dart { | 13 namespace dart { |
| 14 | 14 |
| 15 class FlowGraph; | 15 class FlowGraph; |
| 16 class Instruction; | 16 class Instruction; |
| 17 class ParsedFunction; | 17 class ParsedFunction; |
| 18 | 18 |
| 19 // List of recognized list factories: | 19 // List of recognized list factories: |
| 20 // (factory-name-symbol, result-cid, fingerprint). | 20 // (factory-name-symbol, result-cid, fingerprint). |
| 21 // TODO(srdjan): Store the values in the snapshot instead. | 21 // TODO(srdjan): Store the values in the snapshot instead. |
| 22 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ | 22 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ |
| 23 V(ObjectArrayFactory, kArrayCid, 97987288) \ | 23 V(ObjectArrayFactory, kArrayCid, 97987288) \ |
| 24 V(GrowableObjectArrayWithData, kGrowableObjectArrayCid, 816132033) \ | 24 V(GrowableObjectArrayWithData, kGrowableObjectArrayCid, 816132033) \ |
| 25 V(GrowableObjectArrayFactory, kGrowableObjectArrayCid, 552407276) \ | 25 V(GrowableObjectArrayFactory, kGrowableObjectArrayCid, 552407276) \ |
| 26 V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 974805301) \ | 26 V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 1168404493) \ |
| 27 V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 839639001) \ | 27 V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 2094565809) \ |
| 28 V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 1947193032) \ | 28 V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 1449285088) \ |
| 29 V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 1492289327) \ | 29 V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 1430476167) \ |
| 30 V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 358109132) \ | 30 V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 996241892) \ |
| 31 V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 1238390459) \ | 31 V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 360797715) \ |
| 32 V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 1091191177) \ | 32 V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 995053409) \ |
| 33 V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 569474614) \ | 33 V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 570248142) \ |
| 34 V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 1778132384) \ | 34 V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 1114332856) \ |
| 35 V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 740945295) \ | 35 V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 1896334311) \ |
| 36 V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 630024167) \ | 36 V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 1719636031) \ |
| 37 V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 1881134784) \ | 37 V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 1768466392) \ |
| 38 | 38 |
| 39 | 39 |
| 40 // An class to collect the exits from an inlined function during graph | 40 // An class to collect the exits from an inlined function during graph |
| 41 // construction so they can be plugged into the caller's flow graph. | 41 // construction so they can be plugged into the caller's flow graph. |
| 42 class InlineExitCollector: public ZoneAllocated { | 42 class InlineExitCollector: public ZoneAllocated { |
| 43 public: | 43 public: |
| 44 InlineExitCollector(FlowGraph* caller_graph, Definition* call) | 44 InlineExitCollector(FlowGraph* caller_graph, Definition* call) |
| 45 : caller_graph_(caller_graph), call_(call), exits_(4) { } | 45 : caller_graph_(caller_graph), call_(call), exits_(4) { } |
| 46 | 46 |
| 47 void AddExit(ReturnInstr* exit); | 47 void AddExit(ReturnInstr* exit); |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // Output parameters. | 478 // Output parameters. |
| 479 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 479 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
| 480 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 480 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
| 481 | 481 |
| 482 intptr_t condition_token_pos_; | 482 intptr_t condition_token_pos_; |
| 483 }; | 483 }; |
| 484 | 484 |
| 485 } // namespace dart | 485 } // namespace dart |
| 486 | 486 |
| 487 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 487 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |