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

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

Issue 19504007: Calls to HCheckFunction can be eliminated if the value is an HConstant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Deobfuscate a predicate Created 7 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 | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2830 SetFlag(kUseGVN); 2830 SetFlag(kUseGVN);
2831 target_in_new_space_ = Isolate::Current()->heap()->InNewSpace(*function); 2831 target_in_new_space_ = Isolate::Current()->heap()->InNewSpace(*function);
2832 } 2832 }
2833 2833
2834 virtual Representation RequiredInputRepresentation(int index) { 2834 virtual Representation RequiredInputRepresentation(int index) {
2835 return Representation::Tagged(); 2835 return Representation::Tagged();
2836 } 2836 }
2837 virtual void PrintDataTo(StringStream* stream); 2837 virtual void PrintDataTo(StringStream* stream);
2838 virtual HType CalculateInferredType(); 2838 virtual HType CalculateInferredType();
2839 2839
2840 virtual HValue* Canonicalize();
2841
2840 #ifdef DEBUG 2842 #ifdef DEBUG
2841 virtual void Verify(); 2843 virtual void Verify();
2842 #endif 2844 #endif
2843 2845
2844 virtual void FinalizeUniqueValueId() { 2846 virtual void FinalizeUniqueValueId() {
2845 target_unique_id_ = UniqueValueId(target_); 2847 target_unique_id_ = UniqueValueId(target_);
2846 } 2848 }
2847 2849
2848 Handle<JSFunction> target() const { return target_; } 2850 Handle<JSFunction> target() const { return target_; }
2849 bool target_in_new_space() const { return target_in_new_space_; } 2851 bool target_in_new_space() const { return target_in_new_space_; }
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
3403 } 3405 }
3404 } 3406 }
3405 3407
3406 virtual void FinalizeUniqueValueId() { 3408 virtual void FinalizeUniqueValueId() {
3407 if (!has_double_value_) { 3409 if (!has_double_value_) {
3408 ASSERT(!handle_.is_null()); 3410 ASSERT(!handle_.is_null());
3409 unique_id_ = UniqueValueId(handle_); 3411 unique_id_ = UniqueValueId(handle_);
3410 } 3412 }
3411 } 3413 }
3412 3414
3415 bool UniqueValueIdsMatch(UniqueValueId other) {
3416 return !has_double_value_ && unique_id_ == other;
3417 }
3418
3413 #ifdef DEBUG 3419 #ifdef DEBUG
3414 virtual void Verify() { } 3420 virtual void Verify() { }
3415 #endif 3421 #endif
3416 3422
3417 DECLARE_CONCRETE_INSTRUCTION(Constant) 3423 DECLARE_CONCRETE_INSTRUCTION(Constant)
3418 3424
3419 protected: 3425 protected:
3420 virtual Range* InferRange(Zone* zone); 3426 virtual Range* InferRange(Zone* zone);
3421 3427
3422 virtual bool DataEquals(HValue* other) { 3428 virtual bool DataEquals(HValue* other) {
(...skipping 3215 matching lines...) Expand 10 before | Expand all | Expand 10 after
6638 virtual bool IsDeletable() const { return true; } 6644 virtual bool IsDeletable() const { return true; }
6639 }; 6645 };
6640 6646
6641 6647
6642 #undef DECLARE_INSTRUCTION 6648 #undef DECLARE_INSTRUCTION
6643 #undef DECLARE_CONCRETE_INSTRUCTION 6649 #undef DECLARE_CONCRETE_INSTRUCTION
6644 6650
6645 } } // namespace v8::internal 6651 } } // namespace v8::internal
6646 6652
6647 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6653 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698