OLD | NEW |
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 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2415 private: | 2415 private: |
2416 const Runtime::Function* c_function_; | 2416 const Runtime::Function* c_function_; |
2417 Handle<String> name_; | 2417 Handle<String> name_; |
2418 }; | 2418 }; |
2419 | 2419 |
2420 | 2420 |
2421 class HFixedArrayBaseLength: public HUnaryOperation { | 2421 class HFixedArrayBaseLength: public HUnaryOperation { |
2422 public: | 2422 public: |
2423 explicit HFixedArrayBaseLength(HValue* value) : HUnaryOperation(value) { | 2423 explicit HFixedArrayBaseLength(HValue* value) : HUnaryOperation(value) { |
2424 set_type(HType::Smi()); | 2424 set_type(HType::Smi()); |
2425 set_representation(Representation::Tagged()); | 2425 set_representation(Representation::Smi()); |
2426 SetFlag(kUseGVN); | 2426 SetFlag(kUseGVN); |
2427 SetGVNFlag(kDependsOnArrayLengths); | 2427 SetGVNFlag(kDependsOnArrayLengths); |
2428 } | 2428 } |
2429 | 2429 |
2430 virtual Representation RequiredInputRepresentation(int index) { | 2430 virtual Representation RequiredInputRepresentation(int index) { |
2431 return Representation::Tagged(); | 2431 return Representation::Tagged(); |
2432 } | 2432 } |
2433 | 2433 |
2434 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength) | 2434 DECLARE_CONCRETE_INSTRUCTION(FixedArrayBaseLength) |
2435 | 2435 |
(...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5412 | 5412 |
5413 if (!is_external()) { | 5413 if (!is_external()) { |
5414 // I can detect the case between storing double (holey and fast) and | 5414 // I can detect the case between storing double (holey and fast) and |
5415 // smi/object by looking at elements_kind_. | 5415 // smi/object by looking at elements_kind_. |
5416 ASSERT(IsFastSmiOrObjectElementsKind(elements_kind) || | 5416 ASSERT(IsFastSmiOrObjectElementsKind(elements_kind) || |
5417 IsFastDoubleElementsKind(elements_kind)); | 5417 IsFastDoubleElementsKind(elements_kind)); |
5418 | 5418 |
5419 if (IsFastSmiOrObjectElementsKind(elements_kind)) { | 5419 if (IsFastSmiOrObjectElementsKind(elements_kind)) { |
5420 if (IsFastSmiElementsKind(elements_kind)) { | 5420 if (IsFastSmiElementsKind(elements_kind)) { |
5421 set_type(HType::Smi()); | 5421 set_type(HType::Smi()); |
| 5422 set_representation(Representation::Smi()); |
| 5423 } else { |
| 5424 set_representation(Representation::Tagged()); |
5422 } | 5425 } |
5423 | 5426 |
5424 set_representation(Representation::Tagged()); | |
5425 SetGVNFlag(kDependsOnArrayElements); | 5427 SetGVNFlag(kDependsOnArrayElements); |
5426 } else { | 5428 } else { |
5427 set_representation(Representation::Double()); | 5429 set_representation(Representation::Double()); |
5428 SetGVNFlag(kDependsOnDoubleArrayElements); | 5430 SetGVNFlag(kDependsOnDoubleArrayElements); |
5429 } | 5431 } |
5430 } else { | 5432 } else { |
5431 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || | 5433 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || |
5432 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { | 5434 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
5433 set_representation(Representation::Double()); | 5435 set_representation(Representation::Double()); |
5434 } else { | 5436 } else { |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6470 virtual bool IsDeletable() const { return true; } | 6472 virtual bool IsDeletable() const { return true; } |
6471 }; | 6473 }; |
6472 | 6474 |
6473 | 6475 |
6474 #undef DECLARE_INSTRUCTION | 6476 #undef DECLARE_INSTRUCTION |
6475 #undef DECLARE_CONCRETE_INSTRUCTION | 6477 #undef DECLARE_CONCRETE_INSTRUCTION |
6476 | 6478 |
6477 } } // namespace v8::internal | 6479 } } // namespace v8::internal |
6478 | 6480 |
6479 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6481 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |