| 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 4889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4900 }; | 4900 }; |
| 4901 | 4901 |
| 4902 | 4902 |
| 4903 class UnboxUint32Instr : public UnboxInteger32Instr { | 4903 class UnboxUint32Instr : public UnboxInteger32Instr { |
| 4904 public: | 4904 public: |
| 4905 UnboxUint32Instr(Value* value, intptr_t deopt_id) | 4905 UnboxUint32Instr(Value* value, intptr_t deopt_id) |
| 4906 : UnboxInteger32Instr(kUnboxedUint32, kTruncate, value, deopt_id) { | 4906 : UnboxInteger32Instr(kUnboxedUint32, kTruncate, value, deopt_id) { |
| 4907 ASSERT(is_truncating()); | 4907 ASSERT(is_truncating()); |
| 4908 } | 4908 } |
| 4909 | 4909 |
| 4910 virtual bool CanDeoptimize() const { | 4910 virtual bool CanDeoptimize() const; |
| 4911 ASSERT(is_truncating()); | |
| 4912 return (value()->Type()->ToCid() != kSmiCid) | |
| 4913 && (value()->Type()->ToCid() != kMintCid); | |
| 4914 } | |
| 4915 | 4911 |
| 4916 virtual void InferRange(RangeAnalysis* analysis, Range* range); | 4912 virtual void InferRange(RangeAnalysis* analysis, Range* range); |
| 4917 | 4913 |
| 4918 DECLARE_INSTRUCTION_NO_BACKEND(UnboxUint32) | 4914 DECLARE_INSTRUCTION_NO_BACKEND(UnboxUint32) |
| 4919 | 4915 |
| 4920 private: | 4916 private: |
| 4921 DISALLOW_COPY_AND_ASSIGN(UnboxUint32Instr); | 4917 DISALLOW_COPY_AND_ASSIGN(UnboxUint32Instr); |
| 4922 }; | 4918 }; |
| 4923 | 4919 |
| 4924 | 4920 |
| (...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6221 virtual void PrintOperandsTo(BufferFormatter* f) const; | 6217 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 6222 | 6218 |
| 6223 virtual bool CanDeoptimize() const { return false; } | 6219 virtual bool CanDeoptimize() const { return false; } |
| 6224 | 6220 |
| 6225 virtual Representation representation() const { | 6221 virtual Representation representation() const { |
| 6226 return kUnboxedInt32x4; | 6222 return kUnboxedInt32x4; |
| 6227 } | 6223 } |
| 6228 | 6224 |
| 6229 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6225 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6230 ASSERT((idx >= 0) && (idx < 4)); | 6226 ASSERT((idx >= 0) && (idx < 4)); |
| 6231 return kUnboxedUint32; | 6227 return kUnboxedInt32; |
| 6232 } | 6228 } |
| 6233 | 6229 |
| 6234 virtual intptr_t DeoptimizationTarget() const { | 6230 virtual intptr_t DeoptimizationTarget() const { |
| 6235 // Direct access since this instruction cannot deoptimize, and the deopt-id | 6231 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 6236 // was inherited from another instruction that could deoptimize. | 6232 // was inherited from another instruction that could deoptimize. |
| 6237 return GetDeoptId(); | 6233 return GetDeoptId(); |
| 6238 } | 6234 } |
| 6239 | 6235 |
| 6240 DECLARE_INSTRUCTION(Int32x4Constructor) | 6236 DECLARE_INSTRUCTION(Int32x4Constructor) |
| 6241 virtual CompileType ComputeType() const; | 6237 virtual CompileType ComputeType() const; |
| (...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8102 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8098 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8103 UNIMPLEMENTED(); \ | 8099 UNIMPLEMENTED(); \ |
| 8104 return NULL; \ | 8100 return NULL; \ |
| 8105 } \ | 8101 } \ |
| 8106 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8102 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8107 | 8103 |
| 8108 | 8104 |
| 8109 } // namespace dart | 8105 } // namespace dart |
| 8110 | 8106 |
| 8111 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8107 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |