OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3355 HLoadContextSlot* b = HLoadContextSlot::cast(other); | 3355 HLoadContextSlot* b = HLoadContextSlot::cast(other); |
3356 return (slot_index() == b->slot_index()); | 3356 return (slot_index() == b->slot_index()); |
3357 } | 3357 } |
3358 | 3358 |
3359 private: | 3359 private: |
3360 int slot_index_; | 3360 int slot_index_; |
3361 }; | 3361 }; |
3362 | 3362 |
3363 | 3363 |
3364 static inline bool StoringValueNeedsWriteBarrier(HValue* value) { | 3364 static inline bool StoringValueNeedsWriteBarrier(HValue* value) { |
3365 return !value->type().IsSmi() && | 3365 return !value->type().IsBoolean() |
3366 !(value->IsConstant() && HConstant::cast(value)->InOldSpace()); | 3366 && !value->type().IsSmi() |
Kevin Millikin (Chromium)
2011/07/07 10:13:44
OK. The predicate here would be easier to read if
| |
3367 && !(value->IsConstant() && HConstant::cast(value)->InOldSpace()); | |
3367 } | 3368 } |
3368 | 3369 |
3369 | 3370 |
3370 class HStoreContextSlot: public HTemplateInstruction<2> { | 3371 class HStoreContextSlot: public HTemplateInstruction<2> { |
3371 public: | 3372 public: |
3372 HStoreContextSlot(HValue* context, int slot_index, HValue* value) | 3373 HStoreContextSlot(HValue* context, int slot_index, HValue* value) |
3373 : slot_index_(slot_index) { | 3374 : slot_index_(slot_index) { |
3374 SetOperandAt(0, context); | 3375 SetOperandAt(0, context); |
3375 SetOperandAt(1, value); | 3376 SetOperandAt(1, value); |
3376 SetFlag(kChangesContextSlots); | 3377 SetFlag(kChangesContextSlots); |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4152 | 4153 |
4153 DECLARE_CONCRETE_INSTRUCTION(In) | 4154 DECLARE_CONCRETE_INSTRUCTION(In) |
4154 }; | 4155 }; |
4155 | 4156 |
4156 #undef DECLARE_INSTRUCTION | 4157 #undef DECLARE_INSTRUCTION |
4157 #undef DECLARE_CONCRETE_INSTRUCTION | 4158 #undef DECLARE_CONCRETE_INSTRUCTION |
4158 | 4159 |
4159 } } // namespace v8::internal | 4160 } } // namespace v8::internal |
4160 | 4161 |
4161 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4162 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |