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

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

Issue 6992072: Implement set trap for proxies, and revamp class hierarchy in preparation (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review. Created 9 years, 6 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 | « src/hydrogen.cc ('k') | 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 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 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 return target_.is_identical_to(b->target()); 1898 return target_.is_identical_to(b->target());
1899 } 1899 }
1900 1900
1901 private: 1901 private:
1902 Handle<JSFunction> target_; 1902 Handle<JSFunction> target_;
1903 }; 1903 };
1904 1904
1905 1905
1906 class HCheckInstanceType: public HUnaryOperation { 1906 class HCheckInstanceType: public HUnaryOperation {
1907 public: 1907 public:
1908 static HCheckInstanceType* NewIsJSObjectOrJSFunction(HValue* value) { 1908 static HCheckInstanceType* NewIsSpecObject(HValue* value) {
1909 return new HCheckInstanceType(value, IS_JS_OBJECT_OR_JS_FUNCTION); 1909 return new HCheckInstanceType(value, IS_SPEC_OBJECT);
1910 } 1910 }
1911 static HCheckInstanceType* NewIsJSArray(HValue* value) { 1911 static HCheckInstanceType* NewIsJSArray(HValue* value) {
1912 return new HCheckInstanceType(value, IS_JS_ARRAY); 1912 return new HCheckInstanceType(value, IS_JS_ARRAY);
1913 } 1913 }
1914 static HCheckInstanceType* NewIsString(HValue* value) { 1914 static HCheckInstanceType* NewIsString(HValue* value) {
1915 return new HCheckInstanceType(value, IS_STRING); 1915 return new HCheckInstanceType(value, IS_STRING);
1916 } 1916 }
1917 static HCheckInstanceType* NewIsSymbol(HValue* value) { 1917 static HCheckInstanceType* NewIsSymbol(HValue* value) {
1918 return new HCheckInstanceType(value, IS_SYMBOL); 1918 return new HCheckInstanceType(value, IS_SYMBOL);
1919 } 1919 }
(...skipping 27 matching lines...) Expand all
1947 // TODO(ager): It could be nice to allow the ommision of instance 1947 // TODO(ager): It could be nice to allow the ommision of instance
1948 // type checks if we have already performed an instance type check 1948 // type checks if we have already performed an instance type check
1949 // with a larger range. 1949 // with a larger range.
1950 virtual bool DataEquals(HValue* other) { 1950 virtual bool DataEquals(HValue* other) {
1951 HCheckInstanceType* b = HCheckInstanceType::cast(other); 1951 HCheckInstanceType* b = HCheckInstanceType::cast(other);
1952 return check_ == b->check_; 1952 return check_ == b->check_;
1953 } 1953 }
1954 1954
1955 private: 1955 private:
1956 enum Check { 1956 enum Check {
1957 IS_JS_OBJECT_OR_JS_FUNCTION, 1957 IS_SPEC_OBJECT,
1958 IS_JS_ARRAY, 1958 IS_JS_ARRAY,
1959 IS_STRING, 1959 IS_STRING,
1960 IS_SYMBOL, 1960 IS_SYMBOL,
1961 LAST_INTERVAL_CHECK = IS_JS_ARRAY 1961 LAST_INTERVAL_CHECK = IS_JS_ARRAY
1962 }; 1962 };
1963 1963
1964 HCheckInstanceType(HValue* value, Check check) 1964 HCheckInstanceType(HValue* value, Check check)
1965 : HUnaryOperation(value), check_(check) { 1965 : HUnaryOperation(value), check_(check) {
1966 set_representation(Representation::Tagged()); 1966 set_representation(Representation::Tagged());
1967 SetFlag(kUseGVN); 1967 SetFlag(kUseGVN);
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after
4032 4032
4033 DECLARE_CONCRETE_INSTRUCTION(In) 4033 DECLARE_CONCRETE_INSTRUCTION(In)
4034 }; 4034 };
4035 4035
4036 #undef DECLARE_INSTRUCTION 4036 #undef DECLARE_INSTRUCTION
4037 #undef DECLARE_CONCRETE_INSTRUCTION 4037 #undef DECLARE_CONCRETE_INSTRUCTION
4038 4038
4039 } } // namespace v8::internal 4039 } } // namespace v8::internal
4040 4040
4041 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 4041 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698