| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_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" |
| (...skipping 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2534 private: | 2534 private: |
| 2535 Range* constraint_; | 2535 Range* constraint_; |
| 2536 TargetEntryInstr* target_; | 2536 TargetEntryInstr* target_; |
| 2537 | 2537 |
| 2538 DISALLOW_COPY_AND_ASSIGN(ConstraintInstr); | 2538 DISALLOW_COPY_AND_ASSIGN(ConstraintInstr); |
| 2539 }; | 2539 }; |
| 2540 | 2540 |
| 2541 | 2541 |
| 2542 class ConstantInstr : public TemplateDefinition<0, NoThrow, Pure> { | 2542 class ConstantInstr : public TemplateDefinition<0, NoThrow, Pure> { |
| 2543 public: | 2543 public: |
| 2544 explicit ConstantInstr(const Object& value); | 2544 ConstantInstr(const Object& value, |
| 2545 intptr_t token_pos = Scanner::kNoSourcePos); |
| 2545 | 2546 |
| 2546 DECLARE_INSTRUCTION(Constant) | 2547 DECLARE_INSTRUCTION(Constant) |
| 2547 virtual CompileType ComputeType() const; | 2548 virtual CompileType ComputeType() const; |
| 2548 | 2549 |
| 2549 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 2550 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 2550 | 2551 |
| 2551 const Object& value() const { return value_; } | 2552 const Object& value() const { return value_; } |
| 2552 | 2553 |
| 2553 virtual void PrintOperandsTo(BufferFormatter* f) const; | 2554 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 2554 | 2555 |
| 2555 virtual bool CanDeoptimize() const { return false; } | 2556 virtual bool CanDeoptimize() const { return false; } |
| 2556 | 2557 |
| 2557 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 2558 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 2558 | 2559 |
| 2559 virtual bool AttributesEqual(Instruction* other) const; | 2560 virtual bool AttributesEqual(Instruction* other) const; |
| 2560 | 2561 |
| 2561 private: | 2562 private: |
| 2562 const Object& value_; | 2563 const Object& value_; |
| 2564 const intptr_t token_pos_; |
| 2563 | 2565 |
| 2564 DISALLOW_COPY_AND_ASSIGN(ConstantInstr); | 2566 DISALLOW_COPY_AND_ASSIGN(ConstantInstr); |
| 2565 }; | 2567 }; |
| 2566 | 2568 |
| 2567 | 2569 |
| 2568 // Merged ConstantInstr -> UnboxedXXX into UnboxedConstantInstr. | 2570 // Merged ConstantInstr -> UnboxedXXX into UnboxedConstantInstr. |
| 2569 // TODO(srdjan): Implemented currently for doubles only, should implement | 2571 // TODO(srdjan): Implemented currently for doubles only, should implement |
| 2570 // for other unboxing instructions. | 2572 // for other unboxing instructions. |
| 2571 class UnboxedConstantInstr : public ConstantInstr { | 2573 class UnboxedConstantInstr : public ConstantInstr { |
| 2572 public: | 2574 public: |
| (...skipping 5545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8118 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8120 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8119 UNIMPLEMENTED(); \ | 8121 UNIMPLEMENTED(); \ |
| 8120 return NULL; \ | 8122 return NULL; \ |
| 8121 } \ | 8123 } \ |
| 8122 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8124 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8123 | 8125 |
| 8124 | 8126 |
| 8125 } // namespace dart | 8127 } // namespace dart |
| 8126 | 8128 |
| 8127 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8129 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |