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

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

Issue 23866016: Implement local check elimination on basic blocks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 return !has_double_value_ && !has_external_reference_value_ && 3475 return !has_double_value_ && !has_external_reference_value_ &&
3476 unique_id_ == other; 3476 unique_id_ == other;
3477 } 3477 }
3478 3478
3479 Unique<Object> GetUnique() const { 3479 Unique<Object> GetUnique() const {
3480 // TODO(titzer): store a Unique<HeapObject> inside the HConstant. 3480 // TODO(titzer): store a Unique<HeapObject> inside the HConstant.
3481 Address raw_address = reinterpret_cast<Address>(unique_id_.Hashcode()); 3481 Address raw_address = reinterpret_cast<Address>(unique_id_.Hashcode());
3482 return Unique<Object>(raw_address, handle_); 3482 return Unique<Object>(raw_address, handle_);
3483 } 3483 }
3484 3484
3485 template<typename T>
3486 Unique<T> GetCastedUnique() const {
3487 // TODO(titzer): store a Unique<HeapObject> inside the HConstant.
3488 Address raw_address = reinterpret_cast<Address>(unique_id_.Hashcode());
3489 return Unique<T>(raw_address, Handle<T>::cast(handle_));
3490 }
3491
3485 #ifdef DEBUG 3492 #ifdef DEBUG
3486 virtual void Verify() V8_OVERRIDE { } 3493 virtual void Verify() V8_OVERRIDE { }
3487 #endif 3494 #endif
3488 3495
3489 DECLARE_CONCRETE_INSTRUCTION(Constant) 3496 DECLARE_CONCRETE_INSTRUCTION(Constant)
3490 3497
3491 protected: 3498 protected:
3492 virtual Range* InferRange(Zone* zone) V8_OVERRIDE; 3499 virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
3493 3500
3494 virtual bool DataEquals(HValue* other) V8_OVERRIDE { 3501 virtual bool DataEquals(HValue* other) V8_OVERRIDE {
(...skipping 3569 matching lines...) Expand 10 before | Expand all | Expand 10 after
7064 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7071 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7065 }; 7072 };
7066 7073
7067 7074
7068 #undef DECLARE_INSTRUCTION 7075 #undef DECLARE_INSTRUCTION
7069 #undef DECLARE_CONCRETE_INSTRUCTION 7076 #undef DECLARE_CONCRETE_INSTRUCTION
7070 7077
7071 } } // namespace v8::internal 7078 } } // namespace v8::internal
7072 7079
7073 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7080 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698