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

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 14146005: Track representations of fields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Only verify representation while transitioning Created 7 years, 8 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 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 LConstantOperand* constant_parameter_count() { 1482 LConstantOperand* constant_parameter_count() {
1483 ASSERT(has_constant_parameter_count()); 1483 ASSERT(has_constant_parameter_count());
1484 return LConstantOperand::cast(parameter_count()); 1484 return LConstantOperand::cast(parameter_count());
1485 } 1485 }
1486 LOperand* parameter_count() { return inputs_[2]; } 1486 LOperand* parameter_count() { return inputs_[2]; }
1487 1487
1488 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 1488 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
1489 }; 1489 };
1490 1490
1491 1491
1492 class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { 1492 class LLoadNamedField: public LTemplateInstruction<1, 1, 1> {
1493 public: 1493 public:
1494 explicit LLoadNamedField(LOperand* object) { 1494 explicit LLoadNamedField(LOperand* object, LOperand* temp) {
1495 inputs_[0] = object; 1495 inputs_[0] = object;
1496 temps_[0] = temp;
1496 } 1497 }
1497 1498
1498 LOperand* object() { return inputs_[0]; } 1499 LOperand* object() { return inputs_[0]; }
1500 LOperand* temp() { return temps_[0]; }
1499 1501
1500 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field") 1502 DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
1501 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField) 1503 DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
1502 }; 1504 };
1503 1505
1504 1506
1505 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 2, 0> { 1507 class LLoadNamedFieldPolymorphic: public LTemplateInstruction<1, 2, 0> {
1506 public: 1508 public:
1507 LLoadNamedFieldPolymorphic(LOperand* context, LOperand* object) { 1509 LLoadNamedFieldPolymorphic(LOperand* context, LOperand* object) {
1508 inputs_[0] = context; 1510 inputs_[0] = context;
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 private: 2181 private:
2180 bool needs_check_; 2182 bool needs_check_;
2181 }; 2183 };
2182 2184
2183 2185
2184 class LStoreNamedField: public LTemplateInstruction<0, 2, 2> { 2186 class LStoreNamedField: public LTemplateInstruction<0, 2, 2> {
2185 public: 2187 public:
2186 LStoreNamedField(LOperand* obj, 2188 LStoreNamedField(LOperand* obj,
2187 LOperand* val, 2189 LOperand* val,
2188 LOperand* temp, 2190 LOperand* temp,
2189 LOperand* temp_map) { 2191 LOperand* temp_map,
2192 Representation representation)
2193 : representation_(representation) {
2190 inputs_[0] = obj; 2194 inputs_[0] = obj;
2191 inputs_[1] = val; 2195 inputs_[1] = val;
2192 temps_[0] = temp; 2196 temps_[0] = temp;
2193 temps_[1] = temp_map; 2197 temps_[1] = temp_map;
2194 } 2198 }
2195 2199
2196 LOperand* object() { return inputs_[0]; } 2200 LOperand* object() { return inputs_[0]; }
2197 LOperand* value() { return inputs_[1]; } 2201 LOperand* value() { return inputs_[1]; }
2198 LOperand* temp() { return temps_[0]; } 2202 LOperand* temp() { return temps_[0]; }
2199 LOperand* temp_map() { return temps_[1]; } 2203 LOperand* temp_map() { return temps_[1]; }
2200 2204
2201 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 2205 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
2202 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 2206 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
2203 2207
2204 virtual void PrintDataTo(StringStream* stream); 2208 virtual void PrintDataTo(StringStream* stream);
2205 2209
2206 Handle<Object> name() const { return hydrogen()->name(); } 2210 Handle<Object> name() const { return hydrogen()->name(); }
2207 bool is_in_object() { return hydrogen()->is_in_object(); } 2211 bool is_in_object() { return hydrogen()->is_in_object(); }
2208 int offset() { return hydrogen()->offset(); } 2212 int offset() { return hydrogen()->offset(); }
2209 Handle<Map> transition() const { return hydrogen()->transition(); } 2213 Handle<Map> transition() const { return hydrogen()->transition(); }
2214 Representation representation() const { return representation_; }
2215
2216 private:
2217 Representation representation_;
2210 }; 2218 };
2211 2219
2212 2220
2213 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { 2221 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> {
2214 public: 2222 public:
2215 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { 2223 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
2216 inputs_[0] = context; 2224 inputs_[0] = context;
2217 inputs_[1] = object; 2225 inputs_[1] = object;
2218 inputs_[2] = value; 2226 inputs_[2] = value;
2219 } 2227 }
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 2995
2988 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2996 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2989 }; 2997 };
2990 2998
2991 #undef DECLARE_HYDROGEN_ACCESSOR 2999 #undef DECLARE_HYDROGEN_ACCESSOR
2992 #undef DECLARE_CONCRETE_INSTRUCTION 3000 #undef DECLARE_CONCRETE_INSTRUCTION
2993 3001
2994 } } // namespace v8::internal 3002 } } // namespace v8::internal
2995 3003
2996 #endif // V8_IA32_LITHIUM_IA32_H_ 3004 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698