OLD | NEW |
---|---|
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_COMPILER_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
482 void set_pointer_map(PointerMap* map) { | 482 void set_pointer_map(PointerMap* map) { |
483 ASSERT(NeedsPointerMap()); | 483 ASSERT(NeedsPointerMap()); |
484 ASSERT_EQ(NULL, pointer_map_); | 484 ASSERT_EQ(NULL, pointer_map_); |
485 pointer_map_ = map; | 485 pointer_map_ = map; |
486 } | 486 } |
487 | 487 |
488 // Placement new operator so that we can smash instructions into | 488 // Placement new operator so that we can smash instructions into |
489 // zone-allocated memory. | 489 // zone-allocated memory. |
490 void* operator new(size_t, void* location) { return location; } | 490 void* operator new(size_t, void* location) { return location; } |
491 | 491 |
492 void operator delete(void*, size_t) { UNREACHABLE(); } | |
Sven Panne
2014/07/31 06:45:51
I don't understand this commit: Why do we have to
| |
493 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } | |
494 | |
492 protected: | 495 protected: |
493 explicit Instruction(InstructionCode opcode) | 496 explicit Instruction(InstructionCode opcode) |
494 : opcode_(opcode), | 497 : opcode_(opcode), |
495 bit_field_(OutputCountField::encode(0) | InputCountField::encode(0) | | 498 bit_field_(OutputCountField::encode(0) | InputCountField::encode(0) | |
496 TempCountField::encode(0) | IsCallField::encode(false) | | 499 TempCountField::encode(0) | IsCallField::encode(false) | |
497 IsControlField::encode(false)), | 500 IsControlField::encode(false)), |
498 pointer_map_(NULL) {} | 501 pointer_map_(NULL) {} |
499 | 502 |
500 Instruction(InstructionCode opcode, size_t output_count, | 503 Instruction(InstructionCode opcode, size_t output_count, |
501 InstructionOperand** outputs, size_t input_count, | 504 InstructionOperand** outputs, size_t input_count, |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
834 DeoptimizationVector deoptimization_entries_; | 837 DeoptimizationVector deoptimization_entries_; |
835 }; | 838 }; |
836 | 839 |
837 OStream& operator<<(OStream& os, const InstructionSequence& code); | 840 OStream& operator<<(OStream& os, const InstructionSequence& code); |
838 | 841 |
839 } // namespace compiler | 842 } // namespace compiler |
840 } // namespace internal | 843 } // namespace internal |
841 } // namespace v8 | 844 } // namespace v8 |
842 | 845 |
843 #endif // V8_COMPILER_INSTRUCTION_H_ | 846 #endif // V8_COMPILER_INSTRUCTION_H_ |
OLD | NEW |