| 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_COMPILER_IA32_H_ | 5 #ifndef VM_FLOW_GRAPH_COMPILER_IA32_H_ |
| 6 #define VM_FLOW_GRAPH_COMPILER_IA32_H_ | 6 #define VM_FLOW_GRAPH_COMPILER_IA32_H_ |
| 7 | 7 |
| 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ | 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ |
| 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_ia32.h. | 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_ia32.h. |
| 10 #endif | 10 #endif |
| 11 | 11 |
| 12 #include "vm/assembler.h" | 12 #include "vm/assembler.h" |
| 13 #include "vm/assembler_macros.h" | 13 #include "vm/assembler_macros.h" |
| 14 #include "vm/code_descriptors.h" | 14 #include "vm/code_descriptors.h" |
| 15 #include "vm/code_generator.h" | 15 #include "vm/code_generator.h" |
| 16 #include "vm/flow_graph_compiler_shared.h" | 16 #include "vm/flow_graph_compiler_shared.h" |
| 17 #include "vm/intermediate_language.h" | 17 #include "vm/intermediate_language.h" |
| 18 | 18 |
| 19 namespace dart { | 19 namespace dart { |
| 20 | 20 |
| 21 class AbstractType; |
| 21 class Assembler; | 22 class Assembler; |
| 22 class Code; | 23 class Code; |
| 23 class DeoptimizationStub; | 24 class DeoptimizationStub; |
| 24 template <typename T> class GrowableArray; | 25 template <typename T> class GrowableArray; |
| 25 class ParsedFunction; | 26 class ParsedFunction; |
| 26 class StackMapBuilder; | 27 class StackMapBuilder; |
| 27 | 28 |
| 28 // Stubbed out implementation of graph compiler, bails out immediately if | 29 // Stubbed out implementation of graph compiler, bails out immediately if |
| 29 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED. | 30 // CompileGraph is called. The rest of the public API is UNIMPLEMENTED. |
| 30 class FlowGraphCompiler : public FlowGraphCompilerShared { | 31 class FlowGraphCompiler : public FlowGraphCompilerShared { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 52 intptr_t checked_argument_count); | 53 intptr_t checked_argument_count); |
| 53 void EmitStaticCall(intptr_t token_index, | 54 void EmitStaticCall(intptr_t token_index, |
| 54 intptr_t try_index, | 55 intptr_t try_index, |
| 55 const Function& function, | 56 const Function& function, |
| 56 intptr_t argument_count, | 57 intptr_t argument_count, |
| 57 const Array& argument_names); | 58 const Array& argument_names); |
| 58 void GenerateCall(intptr_t token_index, | 59 void GenerateCall(intptr_t token_index, |
| 59 intptr_t try_index, | 60 intptr_t try_index, |
| 60 const ExternalLabel* label, | 61 const ExternalLabel* label, |
| 61 PcDescriptors::Kind kind); | 62 PcDescriptors::Kind kind); |
| 63 void GenerateInstanceOf(intptr_t cid, |
| 64 intptr_t token_index, |
| 65 intptr_t try_index, |
| 66 const AbstractType& type, |
| 67 bool negate_result); |
| 68 void GenerateAssertAssignable(intptr_t cid, |
| 69 intptr_t token_index, |
| 70 intptr_t try_index, |
| 71 const AbstractType& dst_type, |
| 72 const String& dst_name); |
| 62 | 73 |
| 63 private: | 74 private: |
| 64 friend class DeoptimizationStub; | 75 friend class DeoptimizationStub; |
| 65 | 76 |
| 66 // Bail out of the flow graph compiler. Does not return to the caller. | 77 // Bail out of the flow graph compiler. Does not return to the caller. |
| 67 void Bailout(const char* reason); | 78 void Bailout(const char* reason); |
| 68 | 79 |
| 69 virtual void VisitBlocks(); | 80 virtual void VisitBlocks(); |
| 70 | 81 |
| 71 void CopyParameters(); | 82 void CopyParameters(); |
| 72 void EmitInstructionPrologue(Instruction* instr); | 83 void EmitInstructionPrologue(Instruction* instr); |
| 73 | 84 |
| 74 bool CanOptimize(); | 85 bool CanOptimize(); |
| 75 bool TryIntrinsify(); | 86 bool TryIntrinsify(); |
| 76 void IntrinsifyGetter(); | 87 void IntrinsifyGetter(); |
| 77 void IntrinsifySetter(); | 88 void IntrinsifySetter(); |
| 78 | 89 |
| 79 void EmitComment(Instruction* instr); | 90 void EmitComment(Instruction* instr); |
| 80 void BailoutOnInstruction(Instruction* instr); | 91 void BailoutOnInstruction(Instruction* instr); |
| 81 | 92 |
| 82 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); | 93 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); |
| 83 }; | 94 }; |
| 84 | 95 |
| 85 } // namespace dart | 96 } // namespace dart |
| 86 | 97 |
| 87 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_ | 98 #endif // VM_FLOW_GRAPH_COMPILER_IA32_H_ |
| OLD | NEW |