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 2890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2901 Handle<JSGlobalPropertyCell> cell_; | 2901 Handle<JSGlobalPropertyCell> cell_; |
2902 bool check_hole_value_; | 2902 bool check_hole_value_; |
2903 }; | 2903 }; |
2904 | 2904 |
2905 | 2905 |
2906 class HStoreGlobalGeneric: public HTemplateInstruction<3> { | 2906 class HStoreGlobalGeneric: public HTemplateInstruction<3> { |
2907 public: | 2907 public: |
2908 HStoreGlobalGeneric(HValue* context, | 2908 HStoreGlobalGeneric(HValue* context, |
2909 HValue* global_object, | 2909 HValue* global_object, |
2910 Handle<Object> name, | 2910 Handle<Object> name, |
2911 HValue* value) | 2911 HValue* value, |
2912 : name_(name) { | 2912 bool strict_mode) |
| 2913 : name_(name), |
| 2914 strict_mode_(strict_mode) { |
2913 SetOperandAt(0, context); | 2915 SetOperandAt(0, context); |
2914 SetOperandAt(1, global_object); | 2916 SetOperandAt(1, global_object); |
2915 SetOperandAt(2, value); | 2917 SetOperandAt(2, value); |
2916 set_representation(Representation::Tagged()); | 2918 set_representation(Representation::Tagged()); |
2917 SetAllSideEffects(); | 2919 SetAllSideEffects(); |
2918 } | 2920 } |
2919 | 2921 |
2920 HValue* context() { return OperandAt(0); } | 2922 HValue* context() { return OperandAt(0); } |
2921 HValue* global_object() { return OperandAt(1); } | 2923 HValue* global_object() { return OperandAt(1); } |
2922 Handle<Object> name() const { return name_; } | 2924 Handle<Object> name() const { return name_; } |
2923 HValue* value() { return OperandAt(2); } | 2925 HValue* value() { return OperandAt(2); } |
| 2926 bool strict_mode() { return strict_mode_; } |
2924 | 2927 |
2925 virtual void PrintDataTo(StringStream* stream); | 2928 virtual void PrintDataTo(StringStream* stream); |
2926 | 2929 |
2927 virtual Representation RequiredInputRepresentation(int index) const { | 2930 virtual Representation RequiredInputRepresentation(int index) const { |
2928 return Representation::Tagged(); | 2931 return Representation::Tagged(); |
2929 } | 2932 } |
2930 | 2933 |
2931 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store_global_generic") | 2934 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store_global_generic") |
2932 | 2935 |
2933 private: | 2936 private: |
2934 Handle<Object> name_; | 2937 Handle<Object> name_; |
| 2938 bool strict_mode_; |
2935 }; | 2939 }; |
2936 | 2940 |
2937 | 2941 |
2938 class HLoadContextSlot: public HUnaryOperation { | 2942 class HLoadContextSlot: public HUnaryOperation { |
2939 public: | 2943 public: |
2940 HLoadContextSlot(HValue* context , int slot_index) | 2944 HLoadContextSlot(HValue* context , int slot_index) |
2941 : HUnaryOperation(context), slot_index_(slot_index) { | 2945 : HUnaryOperation(context), slot_index_(slot_index) { |
2942 set_representation(Representation::Tagged()); | 2946 set_representation(Representation::Tagged()); |
2943 SetFlag(kUseGVN); | 2947 SetFlag(kUseGVN); |
2944 SetFlag(kDependsOnContextSlots); | 2948 SetFlag(kDependsOnContextSlots); |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3256 int offset_; | 3260 int offset_; |
3257 Handle<Map> transition_; | 3261 Handle<Map> transition_; |
3258 }; | 3262 }; |
3259 | 3263 |
3260 | 3264 |
3261 class HStoreNamedGeneric: public HTemplateInstruction<3> { | 3265 class HStoreNamedGeneric: public HTemplateInstruction<3> { |
3262 public: | 3266 public: |
3263 HStoreNamedGeneric(HValue* context, | 3267 HStoreNamedGeneric(HValue* context, |
3264 HValue* object, | 3268 HValue* object, |
3265 Handle<String> name, | 3269 Handle<String> name, |
3266 HValue* value) | 3270 HValue* value, |
3267 : name_(name) { | 3271 bool strict_mode) |
| 3272 : name_(name), |
| 3273 strict_mode_(strict_mode) { |
3268 SetOperandAt(0, object); | 3274 SetOperandAt(0, object); |
3269 SetOperandAt(1, value); | 3275 SetOperandAt(1, value); |
3270 SetOperandAt(2, context); | 3276 SetOperandAt(2, context); |
3271 SetAllSideEffects(); | 3277 SetAllSideEffects(); |
3272 } | 3278 } |
3273 | 3279 |
3274 HValue* object() { return OperandAt(0); } | 3280 HValue* object() { return OperandAt(0); } |
3275 HValue* value() { return OperandAt(1); } | 3281 HValue* value() { return OperandAt(1); } |
3276 HValue* context() { return OperandAt(2); } | 3282 HValue* context() { return OperandAt(2); } |
3277 Handle<String> name() { return name_; } | 3283 Handle<String> name() { return name_; } |
| 3284 bool strict_mode() { return strict_mode_; } |
3278 | 3285 |
3279 virtual void PrintDataTo(StringStream* stream); | 3286 virtual void PrintDataTo(StringStream* stream); |
3280 | 3287 |
3281 virtual Representation RequiredInputRepresentation(int index) const { | 3288 virtual Representation RequiredInputRepresentation(int index) const { |
3282 return Representation::Tagged(); | 3289 return Representation::Tagged(); |
3283 } | 3290 } |
3284 | 3291 |
3285 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store_named_generic") | 3292 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store_named_generic") |
3286 | 3293 |
3287 private: | 3294 private: |
3288 Handle<String> name_; | 3295 Handle<String> name_; |
| 3296 bool strict_mode_; |
3289 }; | 3297 }; |
3290 | 3298 |
3291 | 3299 |
3292 class HStoreKeyedFastElement: public HTemplateInstruction<3> { | 3300 class HStoreKeyedFastElement: public HTemplateInstruction<3> { |
3293 public: | 3301 public: |
3294 HStoreKeyedFastElement(HValue* obj, HValue* key, HValue* val) { | 3302 HStoreKeyedFastElement(HValue* obj, HValue* key, HValue* val) { |
3295 SetOperandAt(0, obj); | 3303 SetOperandAt(0, obj); |
3296 SetOperandAt(1, key); | 3304 SetOperandAt(1, key); |
3297 SetOperandAt(2, val); | 3305 SetOperandAt(2, val); |
3298 SetFlag(kChangesArrayElements); | 3306 SetFlag(kChangesArrayElements); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3356 private: | 3364 private: |
3357 ExternalArrayType array_type_; | 3365 ExternalArrayType array_type_; |
3358 }; | 3366 }; |
3359 | 3367 |
3360 | 3368 |
3361 class HStoreKeyedGeneric: public HTemplateInstruction<4> { | 3369 class HStoreKeyedGeneric: public HTemplateInstruction<4> { |
3362 public: | 3370 public: |
3363 HStoreKeyedGeneric(HValue* context, | 3371 HStoreKeyedGeneric(HValue* context, |
3364 HValue* object, | 3372 HValue* object, |
3365 HValue* key, | 3373 HValue* key, |
3366 HValue* value) { | 3374 HValue* value, |
| 3375 bool strict_mode) |
| 3376 : strict_mode_(strict_mode) { |
3367 SetOperandAt(0, object); | 3377 SetOperandAt(0, object); |
3368 SetOperandAt(1, key); | 3378 SetOperandAt(1, key); |
3369 SetOperandAt(2, value); | 3379 SetOperandAt(2, value); |
3370 SetOperandAt(3, context); | 3380 SetOperandAt(3, context); |
3371 SetAllSideEffects(); | 3381 SetAllSideEffects(); |
3372 } | 3382 } |
3373 | 3383 |
3374 HValue* object() { return OperandAt(0); } | 3384 HValue* object() { return OperandAt(0); } |
3375 HValue* key() { return OperandAt(1); } | 3385 HValue* key() { return OperandAt(1); } |
3376 HValue* value() { return OperandAt(2); } | 3386 HValue* value() { return OperandAt(2); } |
3377 HValue* context() { return OperandAt(3); } | 3387 HValue* context() { return OperandAt(3); } |
| 3388 bool strict_mode() { return strict_mode_; } |
3378 | 3389 |
3379 virtual Representation RequiredInputRepresentation(int index) const { | 3390 virtual Representation RequiredInputRepresentation(int index) const { |
3380 return Representation::Tagged(); | 3391 return Representation::Tagged(); |
3381 } | 3392 } |
3382 | 3393 |
3383 virtual void PrintDataTo(StringStream* stream); | 3394 virtual void PrintDataTo(StringStream* stream); |
3384 | 3395 |
3385 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store_keyed_generic") | 3396 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store_keyed_generic") |
| 3397 |
| 3398 private: |
| 3399 bool strict_mode_; |
3386 }; | 3400 }; |
3387 | 3401 |
3388 | 3402 |
3389 class HStringCharCodeAt: public HBinaryOperation { | 3403 class HStringCharCodeAt: public HBinaryOperation { |
3390 public: | 3404 public: |
3391 HStringCharCodeAt(HValue* string, HValue* index) | 3405 HStringCharCodeAt(HValue* string, HValue* index) |
3392 : HBinaryOperation(string, index) { | 3406 : HBinaryOperation(string, index) { |
3393 set_representation(Representation::Integer32()); | 3407 set_representation(Representation::Integer32()); |
3394 SetFlag(kUseGVN); | 3408 SetFlag(kUseGVN); |
3395 SetFlag(kDependsOnMaps); | 3409 SetFlag(kDependsOnMaps); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3648 HValue* object() { return left(); } | 3662 HValue* object() { return left(); } |
3649 HValue* key() { return right(); } | 3663 HValue* key() { return right(); } |
3650 }; | 3664 }; |
3651 | 3665 |
3652 #undef DECLARE_INSTRUCTION | 3666 #undef DECLARE_INSTRUCTION |
3653 #undef DECLARE_CONCRETE_INSTRUCTION | 3667 #undef DECLARE_CONCRETE_INSTRUCTION |
3654 | 3668 |
3655 } } // namespace v8::internal | 3669 } } // namespace v8::internal |
3656 | 3670 |
3657 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3671 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |