| 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_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 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2277 }; | 2277 }; |
| 2278 | 2278 |
| 2279 | 2279 |
| 2280 class EqualityCompareInstr : public ComparisonInstr { | 2280 class EqualityCompareInstr : public ComparisonInstr { |
| 2281 public: | 2281 public: |
| 2282 EqualityCompareInstr(intptr_t token_pos, | 2282 EqualityCompareInstr(intptr_t token_pos, |
| 2283 Token::Kind kind, | 2283 Token::Kind kind, |
| 2284 Value* left, | 2284 Value* left, |
| 2285 Value* right) | 2285 Value* right) |
| 2286 : ComparisonInstr(kind, left, right), | 2286 : ComparisonInstr(kind, left, right), |
| 2287 ic_data_(Isolate::Current()->GetICDataForDeoptId(deopt_id())), | |
| 2288 token_pos_(token_pos), | 2287 token_pos_(token_pos), |
| 2289 receiver_class_id_(kIllegalCid) { | 2288 receiver_class_id_(kIllegalCid) { |
| 2289 // deopt_id() checks receiver_class_id_ value. |
| 2290 ic_data_ = Isolate::Current()->GetICDataForDeoptId(deopt_id()); |
| 2290 ASSERT((kind == Token::kEQ) || (kind == Token::kNE)); | 2291 ASSERT((kind == Token::kEQ) || (kind == Token::kNE)); |
| 2291 } | 2292 } |
| 2292 | 2293 |
| 2293 DECLARE_INSTRUCTION(EqualityCompare) | 2294 DECLARE_INSTRUCTION(EqualityCompare) |
| 2294 virtual RawAbstractType* CompileType() const; | 2295 virtual RawAbstractType* CompileType() const; |
| 2295 | 2296 |
| 2296 const ICData* ic_data() const { return ic_data_; } | 2297 const ICData* ic_data() const { return ic_data_; } |
| 2297 bool HasICData() const { | 2298 bool HasICData() const { |
| 2298 return (ic_data() != NULL) && !ic_data()->IsNull(); | 2299 return (ic_data() != NULL) && !ic_data()->IsNull(); |
| 2299 } | 2300 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2344 }; | 2345 }; |
| 2345 | 2346 |
| 2346 | 2347 |
| 2347 class RelationalOpInstr : public ComparisonInstr { | 2348 class RelationalOpInstr : public ComparisonInstr { |
| 2348 public: | 2349 public: |
| 2349 RelationalOpInstr(intptr_t token_pos, | 2350 RelationalOpInstr(intptr_t token_pos, |
| 2350 Token::Kind kind, | 2351 Token::Kind kind, |
| 2351 Value* left, | 2352 Value* left, |
| 2352 Value* right) | 2353 Value* right) |
| 2353 : ComparisonInstr(kind, left, right), | 2354 : ComparisonInstr(kind, left, right), |
| 2354 ic_data_(Isolate::Current()->GetICDataForDeoptId(deopt_id())), | |
| 2355 token_pos_(token_pos), | 2355 token_pos_(token_pos), |
| 2356 operands_class_id_(kIllegalCid) { | 2356 operands_class_id_(kIllegalCid) { |
| 2357 // deopt_id() checks operands_class_id_ value. |
| 2358 ic_data_ = Isolate::Current()->GetICDataForDeoptId(deopt_id()); |
| 2357 ASSERT(Token::IsRelationalOperator(kind)); | 2359 ASSERT(Token::IsRelationalOperator(kind)); |
| 2358 } | 2360 } |
| 2359 | 2361 |
| 2360 DECLARE_INSTRUCTION(RelationalOp) | 2362 DECLARE_INSTRUCTION(RelationalOp) |
| 2361 virtual RawAbstractType* CompileType() const; | 2363 virtual RawAbstractType* CompileType() const; |
| 2362 | 2364 |
| 2363 const ICData* ic_data() const { return ic_data_; } | 2365 const ICData* ic_data() const { return ic_data_; } |
| 2364 bool HasICData() const { | 2366 bool HasICData() const { |
| 2365 return (ic_data() != NULL) && !ic_data()->IsNull(); | 2367 return (ic_data() != NULL) && !ic_data()->IsNull(); |
| 2366 } | 2368 } |
| (...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4394 ForwardInstructionIterator* current_iterator_; | 4396 ForwardInstructionIterator* current_iterator_; |
| 4395 | 4397 |
| 4396 private: | 4398 private: |
| 4397 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4399 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4398 }; | 4400 }; |
| 4399 | 4401 |
| 4400 | 4402 |
| 4401 } // namespace dart | 4403 } // namespace dart |
| 4402 | 4404 |
| 4403 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4405 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |