Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: src/hydrogen-instructions.h

Issue 7312022: Don't emit a write barrier when storing boolean-typed values. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698