| OLD | NEW |
| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 V(StorePixelArrayElement) \ | 149 V(StorePixelArrayElement) \ |
| 150 V(StoreKeyedGeneric) \ | 150 V(StoreKeyedGeneric) \ |
| 151 V(StoreNamedField) \ | 151 V(StoreNamedField) \ |
| 152 V(StoreNamedGeneric) \ | 152 V(StoreNamedGeneric) \ |
| 153 V(StringCharCodeAt) \ | 153 V(StringCharCodeAt) \ |
| 154 V(StringCharFromCode) \ | 154 V(StringCharFromCode) \ |
| 155 V(StringLength) \ | 155 V(StringLength) \ |
| 156 V(Sub) \ | 156 V(Sub) \ |
| 157 V(Test) \ | 157 V(Test) \ |
| 158 V(Throw) \ | 158 V(Throw) \ |
| 159 V(ToFastProperties) \ |
| 159 V(Typeof) \ | 160 V(Typeof) \ |
| 160 V(TypeofIs) \ | 161 V(TypeofIs) \ |
| 161 V(UnaryMathOperation) \ | 162 V(UnaryMathOperation) \ |
| 162 V(UnknownOSRValue) \ | 163 V(UnknownOSRValue) \ |
| 163 V(ValueOf) | 164 V(ValueOf) |
| 164 | 165 |
| 165 #define GVN_FLAG_LIST(V) \ | 166 #define GVN_FLAG_LIST(V) \ |
| 166 V(Calls) \ | 167 V(Calls) \ |
| 167 V(InobjectFields) \ | 168 V(InobjectFields) \ |
| 168 V(BackingStoreFields) \ | 169 V(BackingStoreFields) \ |
| (...skipping 3206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3375 Handle<FixedArray> constant_elements_; | 3376 Handle<FixedArray> constant_elements_; |
| 3376 }; | 3377 }; |
| 3377 | 3378 |
| 3378 | 3379 |
| 3379 class HObjectLiteral: public HMaterializedLiteral<1> { | 3380 class HObjectLiteral: public HMaterializedLiteral<1> { |
| 3380 public: | 3381 public: |
| 3381 HObjectLiteral(HValue* context, | 3382 HObjectLiteral(HValue* context, |
| 3382 Handle<FixedArray> constant_properties, | 3383 Handle<FixedArray> constant_properties, |
| 3383 bool fast_elements, | 3384 bool fast_elements, |
| 3384 int literal_index, | 3385 int literal_index, |
| 3385 int depth) | 3386 int depth, |
| 3387 bool has_function) |
| 3386 : HMaterializedLiteral<1>(literal_index, depth), | 3388 : HMaterializedLiteral<1>(literal_index, depth), |
| 3387 constant_properties_(constant_properties), | 3389 constant_properties_(constant_properties), |
| 3388 fast_elements_(fast_elements) { | 3390 fast_elements_(fast_elements), |
| 3391 has_function_(has_function) { |
| 3389 SetOperandAt(0, context); | 3392 SetOperandAt(0, context); |
| 3390 } | 3393 } |
| 3391 | 3394 |
| 3392 HValue* context() { return OperandAt(0); } | 3395 HValue* context() { return OperandAt(0); } |
| 3393 Handle<FixedArray> constant_properties() const { | 3396 Handle<FixedArray> constant_properties() const { |
| 3394 return constant_properties_; | 3397 return constant_properties_; |
| 3395 } | 3398 } |
| 3396 bool fast_elements() const { return fast_elements_; } | 3399 bool fast_elements() const { return fast_elements_; } |
| 3400 bool has_function() const { return has_function_; } |
| 3397 | 3401 |
| 3398 virtual Representation RequiredInputRepresentation(int index) const { | 3402 virtual Representation RequiredInputRepresentation(int index) const { |
| 3399 return Representation::Tagged(); | 3403 return Representation::Tagged(); |
| 3400 } | 3404 } |
| 3401 | 3405 |
| 3402 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object_literal") | 3406 DECLARE_CONCRETE_INSTRUCTION(ObjectLiteral, "object_literal") |
| 3403 | 3407 |
| 3404 private: | 3408 private: |
| 3405 Handle<FixedArray> constant_properties_; | 3409 Handle<FixedArray> constant_properties_; |
| 3406 bool fast_elements_; | 3410 bool fast_elements_; |
| 3411 bool has_function_; |
| 3407 }; | 3412 }; |
| 3408 | 3413 |
| 3409 | 3414 |
| 3410 class HRegExpLiteral: public HMaterializedLiteral<0> { | 3415 class HRegExpLiteral: public HMaterializedLiteral<0> { |
| 3411 public: | 3416 public: |
| 3412 HRegExpLiteral(Handle<String> pattern, | 3417 HRegExpLiteral(Handle<String> pattern, |
| 3413 Handle<String> flags, | 3418 Handle<String> flags, |
| 3414 int literal_index) | 3419 int literal_index) |
| 3415 : HMaterializedLiteral<0>(literal_index, 0), | 3420 : HMaterializedLiteral<0>(literal_index, 0), |
| 3416 pattern_(pattern), | 3421 pattern_(pattern), |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3460 } | 3465 } |
| 3461 | 3466 |
| 3462 virtual Representation RequiredInputRepresentation(int index) const { | 3467 virtual Representation RequiredInputRepresentation(int index) const { |
| 3463 return Representation::Tagged(); | 3468 return Representation::Tagged(); |
| 3464 } | 3469 } |
| 3465 | 3470 |
| 3466 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") | 3471 DECLARE_CONCRETE_INSTRUCTION(Typeof, "typeof") |
| 3467 }; | 3472 }; |
| 3468 | 3473 |
| 3469 | 3474 |
| 3475 class HToFastProperties: public HUnaryOperation { |
| 3476 public: |
| 3477 explicit HToFastProperties(HValue* value) : HUnaryOperation(value) { |
| 3478 // This instruction is not marked as having side effects, but |
| 3479 // changes the map of the input operand. Use it only when creating |
| 3480 // object literals. |
| 3481 ASSERT(value->IsObjectLiteral()); |
| 3482 set_representation(Representation::Tagged()); |
| 3483 } |
| 3484 |
| 3485 virtual Representation RequiredInputRepresentation(int index) const { |
| 3486 return Representation::Tagged(); |
| 3487 } |
| 3488 |
| 3489 DECLARE_CONCRETE_INSTRUCTION(ToFastProperties, "to_fast_properties") |
| 3490 }; |
| 3491 |
| 3492 |
| 3470 class HValueOf: public HUnaryOperation { | 3493 class HValueOf: public HUnaryOperation { |
| 3471 public: | 3494 public: |
| 3472 explicit HValueOf(HValue* value) : HUnaryOperation(value) { | 3495 explicit HValueOf(HValue* value) : HUnaryOperation(value) { |
| 3473 set_representation(Representation::Tagged()); | 3496 set_representation(Representation::Tagged()); |
| 3474 } | 3497 } |
| 3475 | 3498 |
| 3476 virtual Representation RequiredInputRepresentation(int index) const { | 3499 virtual Representation RequiredInputRepresentation(int index) const { |
| 3477 return Representation::Tagged(); | 3500 return Representation::Tagged(); |
| 3478 } | 3501 } |
| 3479 | 3502 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3498 HValue* object() { return left(); } | 3521 HValue* object() { return left(); } |
| 3499 HValue* key() { return right(); } | 3522 HValue* key() { return right(); } |
| 3500 }; | 3523 }; |
| 3501 | 3524 |
| 3502 #undef DECLARE_INSTRUCTION | 3525 #undef DECLARE_INSTRUCTION |
| 3503 #undef DECLARE_CONCRETE_INSTRUCTION | 3526 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3504 | 3527 |
| 3505 } } // namespace v8::internal | 3528 } } // namespace v8::internal |
| 3506 | 3529 |
| 3507 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3530 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |