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

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

Issue 23537067: Add support for keyed-call on arrays of fast elements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 2 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 2168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 HValue* context() { return value(); } 2179 HValue* context() { return value(); }
2180 Handle<String> name() const { return name_; } 2180 Handle<String> name() const { return name_; }
2181 2181
2182 DECLARE_CONCRETE_INSTRUCTION(CallNamed) 2182 DECLARE_CONCRETE_INSTRUCTION(CallNamed)
2183 2183
2184 private: 2184 private:
2185 Handle<String> name_; 2185 Handle<String> name_;
2186 }; 2186 };
2187 2187
2188 2188
2189 enum CallMode {
2190 NORMAL_CALL,
2191 TAIL_CALL
2192 };
2193
2194
2189 class HCallFunction V8_FINAL : public HBinaryCall { 2195 class HCallFunction V8_FINAL : public HBinaryCall {
2190 public: 2196 public:
2191 HCallFunction(HValue* context, HValue* function, int argument_count) 2197 HCallFunction(HValue* context,
2192 : HBinaryCall(context, function, argument_count) { 2198 HValue* function,
2199 int argument_count,
2200 CallMode mode)
2201 : HBinaryCall(context, function, argument_count), call_mode_(mode) {
2193 } 2202 }
2194 2203
2195 static HCallFunction* New(Zone* zone, 2204 static HCallFunction* New(Zone* zone,
2196 HValue* context, 2205 HValue* context,
2197 HValue* function, 2206 HValue* function,
2198 int argument_count) { 2207 int argument_count,
2199 return new(zone) HCallFunction(context, function, argument_count); 2208 CallMode mode = NORMAL_CALL) {
2209 return new(zone) HCallFunction(context, function, argument_count, mode);
2200 } 2210 }
2201 2211
2212 bool IsTailCall() { return call_mode_ == TAIL_CALL; }
2213
2202 HValue* context() { return first(); } 2214 HValue* context() { return first(); }
2203 HValue* function() { return second(); } 2215 HValue* function() { return second(); }
2204 2216
2205 DECLARE_CONCRETE_INSTRUCTION(CallFunction) 2217 DECLARE_CONCRETE_INSTRUCTION(CallFunction)
2218
2219 private:
2220 bool call_mode_;
2206 }; 2221 };
2207 2222
2208 2223
2209 class HCallGlobal V8_FINAL : public HUnaryCall { 2224 class HCallGlobal V8_FINAL : public HUnaryCall {
2210 public: 2225 public:
2211 HCallGlobal(HValue* context, Handle<String> name, int argument_count) 2226 HCallGlobal(HValue* context, Handle<String> name, int argument_count)
2212 : HUnaryCall(context, argument_count), name_(name) { 2227 : HUnaryCall(context, argument_count), name_(name) {
2213 } 2228 }
2214 2229
2215 static HCallGlobal* New(Zone* zone, 2230 static HCallGlobal* New(Zone* zone,
(...skipping 4662 matching lines...) Expand 10 before | Expand all | Expand 10 after
6878 virtual HType CalculateInferredType() V8_OVERRIDE { 6893 virtual HType CalculateInferredType() V8_OVERRIDE {
6879 return HType::Tagged(); 6894 return HType::Tagged();
6880 } 6895 }
6881 6896
6882 HValue* value() { return OperandAt(0); } 6897 HValue* value() { return OperandAt(0); }
6883 HValue* map() { return OperandAt(1); } 6898 HValue* map() { return OperandAt(1); }
6884 6899
6885 DECLARE_CONCRETE_INSTRUCTION(CheckMapValue) 6900 DECLARE_CONCRETE_INSTRUCTION(CheckMapValue)
6886 6901
6887 protected: 6902 protected:
6903 virtual int RedefinedOperandIndex() { return 0; }
6904
6888 virtual bool DataEquals(HValue* other) V8_OVERRIDE { 6905 virtual bool DataEquals(HValue* other) V8_OVERRIDE {
6889 return true; 6906 return true;
6890 } 6907 }
6891 6908
6892 private: 6909 private:
6893 HCheckMapValue(HValue* value, 6910 HCheckMapValue(HValue* value,
6894 HValue* map) { 6911 HValue* map) {
6895 SetOperandAt(0, value); 6912 SetOperandAt(0, value);
6896 SetOperandAt(1, map); 6913 SetOperandAt(1, map);
6897 set_representation(Representation::Tagged()); 6914 set_representation(Representation::Tagged());
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
7006 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7023 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7007 }; 7024 };
7008 7025
7009 7026
7010 #undef DECLARE_INSTRUCTION 7027 #undef DECLARE_INSTRUCTION
7011 #undef DECLARE_CONCRETE_INSTRUCTION 7028 #undef DECLARE_CONCRETE_INSTRUCTION
7012 7029
7013 } } // namespace v8::internal 7030 } } // namespace v8::internal
7014 7031
7015 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7032 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | src/ia32/lithium-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698