OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3484 | 3484 |
3485 static HConstant* CreateAndInsertAfter(Zone* zone, | 3485 static HConstant* CreateAndInsertAfter(Zone* zone, |
3486 HValue* context, | 3486 HValue* context, |
3487 int32_t value, | 3487 int32_t value, |
3488 Representation representation, | 3488 Representation representation, |
3489 HInstruction* instruction) { | 3489 HInstruction* instruction) { |
3490 return instruction->Append(HConstant::New( | 3490 return instruction->Append(HConstant::New( |
3491 zone, context, value, representation)); | 3491 zone, context, value, representation)); |
3492 } | 3492 } |
3493 | 3493 |
| 3494 virtual Handle<Map> GetMonomorphicJSObjectMap() OVERRIDE { |
| 3495 Handle<Object> object = object_.handle(); |
| 3496 if (object->IsHeapObject()) { |
| 3497 return v8::internal::handle(HeapObject::cast(*object)->map()); |
| 3498 } |
| 3499 return Handle<Map>(); |
| 3500 } |
| 3501 |
3494 static HConstant* CreateAndInsertBefore(Zone* zone, | 3502 static HConstant* CreateAndInsertBefore(Zone* zone, |
3495 HValue* context, | 3503 HValue* context, |
3496 int32_t value, | 3504 int32_t value, |
3497 Representation representation, | 3505 Representation representation, |
3498 HInstruction* instruction) { | 3506 HInstruction* instruction) { |
3499 return instruction->Prepend(HConstant::New( | 3507 return instruction->Prepend(HConstant::New( |
3500 zone, context, value, representation)); | 3508 zone, context, value, representation)); |
3501 } | 3509 } |
3502 | 3510 |
3503 static HConstant* CreateAndInsertBefore(Zone* zone, | 3511 static HConstant* CreateAndInsertBefore(Zone* zone, |
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5505 } | 5513 } |
5506 | 5514 |
5507 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { | 5515 virtual Representation RequiredInputRepresentation(int index) OVERRIDE { |
5508 if (index == 0) { | 5516 if (index == 0) { |
5509 return Representation::Tagged(); | 5517 return Representation::Tagged(); |
5510 } else { | 5518 } else { |
5511 return Representation::Integer32(); | 5519 return Representation::Integer32(); |
5512 } | 5520 } |
5513 } | 5521 } |
5514 | 5522 |
5515 virtual Handle<Map> GetMonomorphicJSObjectMap() { | 5523 virtual Handle<Map> GetMonomorphicJSObjectMap() OVERRIDE { |
5516 return known_initial_map_; | 5524 return known_initial_map_; |
5517 } | 5525 } |
5518 | 5526 |
5519 void set_known_initial_map(Handle<Map> known_initial_map) { | 5527 void set_known_initial_map(Handle<Map> known_initial_map) { |
5520 known_initial_map_ = known_initial_map; | 5528 known_initial_map_ = known_initial_map; |
5521 } | 5529 } |
5522 | 5530 |
5523 bool IsNewSpaceAllocation() const { | 5531 bool IsNewSpaceAllocation() const { |
5524 return (flags_ & ALLOCATE_IN_NEW_SPACE) != 0; | 5532 return (flags_ & ALLOCATE_IN_NEW_SPACE) != 0; |
5525 } | 5533 } |
(...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7853 }; | 7861 }; |
7854 | 7862 |
7855 | 7863 |
7856 | 7864 |
7857 #undef DECLARE_INSTRUCTION | 7865 #undef DECLARE_INSTRUCTION |
7858 #undef DECLARE_CONCRETE_INSTRUCTION | 7866 #undef DECLARE_CONCRETE_INSTRUCTION |
7859 | 7867 |
7860 } } // namespace v8::internal | 7868 } } // namespace v8::internal |
7861 | 7869 |
7862 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7870 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |