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

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: 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
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 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 return target_.is_identical_to(b->target()); 1822 return target_.is_identical_to(b->target());
1823 } 1823 }
1824 1824
1825 private: 1825 private:
1826 Handle<JSFunction> target_; 1826 Handle<JSFunction> target_;
1827 }; 1827 };
1828 1828
1829 1829
1830 class HCheckInstanceType: public HUnaryOperation { 1830 class HCheckInstanceType: public HUnaryOperation {
1831 public: 1831 public:
1832 static HCheckInstanceType* NewIsJSObjectOrJSFunction(HValue* value) { 1832 static HCheckInstanceType* NewIsObjectOrFunctionClass(HValue* value) {
1833 return new HCheckInstanceType(value, IS_JS_OBJECT_OR_JS_FUNCTION); 1833 return new HCheckInstanceType(value, IS_OBJECT_OR_FUNCTION_CLASS);
1834 } 1834 }
1835 static HCheckInstanceType* NewIsJSArray(HValue* value) { 1835 static HCheckInstanceType* NewIsJSArray(HValue* value) {
1836 return new HCheckInstanceType(value, IS_JS_ARRAY); 1836 return new HCheckInstanceType(value, IS_JS_ARRAY);
1837 } 1837 }
1838 static HCheckInstanceType* NewIsString(HValue* value) { 1838 static HCheckInstanceType* NewIsString(HValue* value) {
1839 return new HCheckInstanceType(value, IS_STRING); 1839 return new HCheckInstanceType(value, IS_STRING);
1840 } 1840 }
1841 static HCheckInstanceType* NewIsSymbol(HValue* value) { 1841 static HCheckInstanceType* NewIsSymbol(HValue* value) {
1842 return new HCheckInstanceType(value, IS_SYMBOL); 1842 return new HCheckInstanceType(value, IS_SYMBOL);
1843 } 1843 }
(...skipping 27 matching lines...) Expand all
1871 // TODO(ager): It could be nice to allow the ommision of instance 1871 // TODO(ager): It could be nice to allow the ommision of instance
1872 // type checks if we have already performed an instance type check 1872 // type checks if we have already performed an instance type check
1873 // with a larger range. 1873 // with a larger range.
1874 virtual bool DataEquals(HValue* other) { 1874 virtual bool DataEquals(HValue* other) {
1875 HCheckInstanceType* b = HCheckInstanceType::cast(other); 1875 HCheckInstanceType* b = HCheckInstanceType::cast(other);
1876 return check_ == b->check_; 1876 return check_ == b->check_;
1877 } 1877 }
1878 1878
1879 private: 1879 private:
1880 enum Check { 1880 enum Check {
1881 IS_JS_OBJECT_OR_JS_FUNCTION, 1881 IS_OBJECT_OR_FUNCTION_CLASS,
1882 IS_JS_ARRAY, 1882 IS_JS_ARRAY,
1883 IS_STRING, 1883 IS_STRING,
1884 IS_SYMBOL, 1884 IS_SYMBOL,
1885 LAST_INTERVAL_CHECK = IS_JS_ARRAY 1885 LAST_INTERVAL_CHECK = IS_JS_ARRAY
1886 }; 1886 };
1887 1887
1888 HCheckInstanceType(HValue* value, Check check) 1888 HCheckInstanceType(HValue* value, Check check)
1889 : HUnaryOperation(value), check_(check) { 1889 : HUnaryOperation(value), check_(check) {
1890 set_representation(Representation::Tagged()); 1890 set_representation(Representation::Tagged());
1891 SetFlag(kUseGVN); 1891 SetFlag(kUseGVN);
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after
3956 3956
3957 DECLARE_CONCRETE_INSTRUCTION(In) 3957 DECLARE_CONCRETE_INSTRUCTION(In)
3958 }; 3958 };
3959 3959
3960 #undef DECLARE_INSTRUCTION 3960 #undef DECLARE_INSTRUCTION
3961 #undef DECLARE_CONCRETE_INSTRUCTION 3961 #undef DECLARE_CONCRETE_INSTRUCTION
3962 3962
3963 } } // namespace v8::internal 3963 } } // namespace v8::internal
3964 3964
3965 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3965 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698