| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include "v8.h" | 8 #include "v8.h" |
| 9 | 9 |
| 10 #include "allocation.h" | 10 #include "allocation.h" |
| (...skipping 6593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6604 | 6604 |
| 6605 Handle<Map> transition_map() const { | 6605 Handle<Map> transition_map() const { |
| 6606 if (has_transition()) { | 6606 if (has_transition()) { |
| 6607 return Handle<Map>::cast( | 6607 return Handle<Map>::cast( |
| 6608 HConstant::cast(transition())->handle(Isolate::Current())); | 6608 HConstant::cast(transition())->handle(Isolate::Current())); |
| 6609 } else { | 6609 } else { |
| 6610 return Handle<Map>(); | 6610 return Handle<Map>(); |
| 6611 } | 6611 } |
| 6612 } | 6612 } |
| 6613 | 6613 |
| 6614 void SetTransition(HConstant* map_constant, CompilationInfo* info) { | 6614 void SetTransition(HConstant* transition) { |
| 6615 ASSERT(!has_transition()); // Only set once. | 6615 ASSERT(!has_transition()); // Only set once. |
| 6616 Handle<Map> map = Handle<Map>::cast(map_constant->handle(info->isolate())); | 6616 SetOperandAt(2, transition); |
| 6617 if (map->CanBeDeprecated()) { | |
| 6618 Map::AddDependentCompilationInfo( | |
| 6619 map, DependentCode::kTransitionGroup, info); | |
| 6620 } | |
| 6621 SetOperandAt(2, map_constant); | |
| 6622 has_transition_ = true; | 6617 has_transition_ = true; |
| 6623 } | 6618 } |
| 6624 | 6619 |
| 6625 bool NeedsWriteBarrier() { | 6620 bool NeedsWriteBarrier() { |
| 6626 ASSERT(!field_representation().IsDouble() || !has_transition()); | 6621 ASSERT(!field_representation().IsDouble() || !has_transition()); |
| 6627 if (IsSkipWriteBarrier()) return false; | 6622 if (IsSkipWriteBarrier()) return false; |
| 6628 if (field_representation().IsDouble()) return false; | 6623 if (field_representation().IsDouble()) return false; |
| 6629 if (field_representation().IsSmi()) return false; | 6624 if (field_representation().IsSmi()) return false; |
| 6630 if (field_representation().IsInteger32()) return false; | 6625 if (field_representation().IsInteger32()) return false; |
| 6631 if (field_representation().IsExternal()) return false; | 6626 if (field_representation().IsExternal()) return false; |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7561 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7556 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7562 }; | 7557 }; |
| 7563 | 7558 |
| 7564 | 7559 |
| 7565 #undef DECLARE_INSTRUCTION | 7560 #undef DECLARE_INSTRUCTION |
| 7566 #undef DECLARE_CONCRETE_INSTRUCTION | 7561 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7567 | 7562 |
| 7568 } } // namespace v8::internal | 7563 } } // namespace v8::internal |
| 7569 | 7564 |
| 7570 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7565 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |