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

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

Issue 7857027: NewGC: Clean up a TODO. Make the empty string one of the (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 3 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 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 2251
2252 bool ImmortalImmovable() const { 2252 bool ImmortalImmovable() const {
2253 Heap* heap = HEAP; 2253 Heap* heap = HEAP;
2254 if (*handle_ == heap->undefined_value()) return true; 2254 if (*handle_ == heap->undefined_value()) return true;
2255 if (*handle_ == heap->null_value()) return true; 2255 if (*handle_ == heap->null_value()) return true;
2256 if (*handle_ == heap->true_value()) return true; 2256 if (*handle_ == heap->true_value()) return true;
2257 if (*handle_ == heap->false_value()) return true; 2257 if (*handle_ == heap->false_value()) return true;
2258 if (*handle_ == heap->the_hole_value()) return true; 2258 if (*handle_ == heap->the_hole_value()) return true;
2259 if (*handle_ == heap->minus_zero_value()) return true; 2259 if (*handle_ == heap->minus_zero_value()) return true;
2260 if (*handle_ == heap->nan_value()) return true; 2260 if (*handle_ == heap->nan_value()) return true;
2261 if (*handle_ == heap->empty_string()) return true;
2261 return false; 2262 return false;
2262 } 2263 }
2263 2264
2264 virtual Representation RequiredInputRepresentation(int index) const { 2265 virtual Representation RequiredInputRepresentation(int index) const {
2265 return Representation::None(); 2266 return Representation::None();
2266 } 2267 }
2267 2268
2268 virtual bool IsConvertibleToInteger() const { 2269 virtual bool IsConvertibleToInteger() const {
2269 if (handle_->IsSmi()) return true; 2270 if (handle_->IsSmi()) return true;
2270 if (handle_->IsHeapNumber() && 2271 if (handle_->IsHeapNumber() &&
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
3335 HLoadContextSlot* b = HLoadContextSlot::cast(other); 3336 HLoadContextSlot* b = HLoadContextSlot::cast(other);
3336 return (slot_index() == b->slot_index()); 3337 return (slot_index() == b->slot_index());
3337 } 3338 }
3338 3339
3339 private: 3340 private:
3340 int slot_index_; 3341 int slot_index_;
3341 }; 3342 };
3342 3343
3343 3344
3344 static inline bool StoringValueNeedsWriteBarrier(HValue* value) { 3345 static inline bool StoringValueNeedsWriteBarrier(HValue* value) {
3345 // TODO(gc) On bleeding edge we omit write barrier when we are
3346 // storing old space constant. We can't allow such an optimization
3347 // on GC branch.
3348 return !value->type().IsBoolean() 3346 return !value->type().IsBoolean()
3349 && !value->type().IsSmi() 3347 && !value->type().IsSmi()
3350 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable()); 3348 && !(value->IsConstant() && HConstant::cast(value)->ImmortalImmovable());
3351 } 3349 }
3352 3350
3353 3351
3354 class HStoreContextSlot: public HTemplateInstruction<2> { 3352 class HStoreContextSlot: public HTemplateInstruction<2> {
3355 public: 3353 public:
3356 HStoreContextSlot(HValue* context, int slot_index, HValue* value) 3354 HStoreContextSlot(HValue* context, int slot_index, HValue* value)
3357 : slot_index_(slot_index) { 3355 : slot_index_(slot_index) {
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
4206 4204
4207 DECLARE_CONCRETE_INSTRUCTION(In) 4205 DECLARE_CONCRETE_INSTRUCTION(In)
4208 }; 4206 };
4209 4207
4210 #undef DECLARE_INSTRUCTION 4208 #undef DECLARE_INSTRUCTION
4211 #undef DECLARE_CONCRETE_INSTRUCTION 4209 #undef DECLARE_CONCRETE_INSTRUCTION
4212 4210
4213 } } // namespace v8::internal 4211 } } // namespace v8::internal
4214 4212
4215 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4213 #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