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

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: Make double support consistent. Now DOUBLE always contains smi or heapnumber 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 StorageType storage) : storage_(storage) {
2190 inputs_[0] = obj; 2193 inputs_[0] = obj;
2191 inputs_[1] = val; 2194 inputs_[1] = val;
2192 temps_[0] = temp; 2195 temps_[0] = temp;
2193 temps_[1] = temp_map; 2196 temps_[1] = temp_map;
2194 } 2197 }
2195 2198
2196 LOperand* object() { return inputs_[0]; } 2199 LOperand* object() { return inputs_[0]; }
2197 LOperand* value() { return inputs_[1]; } 2200 LOperand* value() { return inputs_[1]; }
2198 LOperand* temp() { return temps_[0]; } 2201 LOperand* temp() { return temps_[0]; }
2199 LOperand* temp_map() { return temps_[1]; } 2202 LOperand* temp_map() { return temps_[1]; }
2200 2203
2201 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") 2204 DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
2202 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) 2205 DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
2203 2206
2204 virtual void PrintDataTo(StringStream* stream); 2207 virtual void PrintDataTo(StringStream* stream);
2205 2208
2206 Handle<Object> name() const { return hydrogen()->name(); } 2209 Handle<Object> name() const { return hydrogen()->name(); }
2207 bool is_in_object() { return hydrogen()->is_in_object(); } 2210 bool is_in_object() { return hydrogen()->is_in_object(); }
2208 int offset() { return hydrogen()->offset(); } 2211 int offset() { return hydrogen()->offset(); }
2209 Handle<Map> transition() const { return hydrogen()->transition(); } 2212 Handle<Map> transition() const { return hydrogen()->transition(); }
2213 StorageType storage_type() const { return storage_; }
2214
2215 private:
2216 StorageType storage_;
2210 }; 2217 };
2211 2218
2212 2219
2213 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { 2220 class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> {
2214 public: 2221 public:
2215 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { 2222 LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) {
2216 inputs_[0] = context; 2223 inputs_[0] = context;
2217 inputs_[1] = object; 2224 inputs_[1] = object;
2218 inputs_[2] = value; 2225 inputs_[2] = value;
2219 } 2226 }
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 2994
2988 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2995 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2989 }; 2996 };
2990 2997
2991 #undef DECLARE_HYDROGEN_ACCESSOR 2998 #undef DECLARE_HYDROGEN_ACCESSOR
2992 #undef DECLARE_CONCRETE_INSTRUCTION 2999 #undef DECLARE_CONCRETE_INSTRUCTION
2993 3000
2994 } } // namespace v8::internal 3001 } } // namespace v8::internal
2995 3002
2996 #endif // V8_IA32_LITHIUM_IA32_H_ 3003 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698