OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 public: | 58 public: |
59 AssemblerBase(Isolate* isolate, void* buffer, int buffer_size); | 59 AssemblerBase(Isolate* isolate, void* buffer, int buffer_size); |
60 virtual ~AssemblerBase(); | 60 virtual ~AssemblerBase(); |
61 | 61 |
62 Isolate* isolate() const { return isolate_; } | 62 Isolate* isolate() const { return isolate_; } |
63 int jit_cookie() const { return jit_cookie_; } | 63 int jit_cookie() const { return jit_cookie_; } |
64 | 64 |
65 bool emit_debug_code() const { return emit_debug_code_; } | 65 bool emit_debug_code() const { return emit_debug_code_; } |
66 void set_emit_debug_code(bool value) { emit_debug_code_ = value; } | 66 void set_emit_debug_code(bool value) { emit_debug_code_ = value; } |
67 | 67 |
| 68 bool emit_allocations_tracking_code() const { |
| 69 return emit_allocations_tracking_code_; |
| 70 } |
| 71 void set_emit_allocations_tracking_code(bool value) { |
| 72 emit_allocations_tracking_code_ = value; |
| 73 } |
| 74 |
68 bool predictable_code_size() const { return predictable_code_size_; } | 75 bool predictable_code_size() const { return predictable_code_size_; } |
69 void set_predictable_code_size(bool value) { predictable_code_size_ = value; } | 76 void set_predictable_code_size(bool value) { predictable_code_size_ = value; } |
70 | 77 |
71 uint64_t enabled_cpu_features() const { return enabled_cpu_features_; } | 78 uint64_t enabled_cpu_features() const { return enabled_cpu_features_; } |
72 void set_enabled_cpu_features(uint64_t features) { | 79 void set_enabled_cpu_features(uint64_t features) { |
73 enabled_cpu_features_ = features; | 80 enabled_cpu_features_ = features; |
74 } | 81 } |
75 bool IsEnabled(CpuFeature f) { | 82 bool IsEnabled(CpuFeature f) { |
76 return (enabled_cpu_features_ & (static_cast<uint64_t>(1) << f)) != 0; | 83 return (enabled_cpu_features_ & (static_cast<uint64_t>(1) << f)) != 0; |
77 } | 84 } |
(...skipping 14 matching lines...) Expand all Loading... |
92 bool own_buffer_; | 99 bool own_buffer_; |
93 | 100 |
94 // The program counter, which points into the buffer above and moves forward. | 101 // The program counter, which points into the buffer above and moves forward. |
95 byte* pc_; | 102 byte* pc_; |
96 | 103 |
97 private: | 104 private: |
98 Isolate* isolate_; | 105 Isolate* isolate_; |
99 int jit_cookie_; | 106 int jit_cookie_; |
100 uint64_t enabled_cpu_features_; | 107 uint64_t enabled_cpu_features_; |
101 bool emit_debug_code_; | 108 bool emit_debug_code_; |
| 109 bool emit_allocations_tracking_code_; |
102 bool predictable_code_size_; | 110 bool predictable_code_size_; |
103 }; | 111 }; |
104 | 112 |
105 | 113 |
106 // Avoids using instructions that vary in size in unpredictable ways between the | 114 // Avoids using instructions that vary in size in unpredictable ways between the |
107 // snapshot and the running VM. | 115 // snapshot and the running VM. |
108 class PredictableCodeSizeScope { | 116 class PredictableCodeSizeScope { |
109 public: | 117 public: |
110 PredictableCodeSizeScope(AssemblerBase* assembler, int expected_size); | 118 PredictableCodeSizeScope(AssemblerBase* assembler, int expected_size); |
111 ~PredictableCodeSizeScope(); | 119 ~PredictableCodeSizeScope(); |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 Isolate* isolate); | 730 Isolate* isolate); |
723 static ExternalReference random_uint32_function(Isolate* isolate); | 731 static ExternalReference random_uint32_function(Isolate* isolate); |
724 static ExternalReference transcendental_cache_array_address(Isolate* isolate); | 732 static ExternalReference transcendental_cache_array_address(Isolate* isolate); |
725 static ExternalReference delete_handle_scope_extensions(Isolate* isolate); | 733 static ExternalReference delete_handle_scope_extensions(Isolate* isolate); |
726 | 734 |
727 static ExternalReference get_date_field_function(Isolate* isolate); | 735 static ExternalReference get_date_field_function(Isolate* isolate); |
728 static ExternalReference date_cache_stamp(Isolate* isolate); | 736 static ExternalReference date_cache_stamp(Isolate* isolate); |
729 | 737 |
730 static ExternalReference get_make_code_young_function(Isolate* isolate); | 738 static ExternalReference get_make_code_young_function(Isolate* isolate); |
731 | 739 |
| 740 // New heap objects tracking support. |
| 741 static ExternalReference record_object_allocation_function(Isolate* isolate); |
| 742 |
732 // Deoptimization support. | 743 // Deoptimization support. |
733 static ExternalReference new_deoptimizer_function(Isolate* isolate); | 744 static ExternalReference new_deoptimizer_function(Isolate* isolate); |
734 static ExternalReference compute_output_frames_function(Isolate* isolate); | 745 static ExternalReference compute_output_frames_function(Isolate* isolate); |
735 | 746 |
736 // Log support. | 747 // Log support. |
737 static ExternalReference log_enter_external_function(Isolate* isolate); | 748 static ExternalReference log_enter_external_function(Isolate* isolate); |
738 static ExternalReference log_leave_external_function(Isolate* isolate); | 749 static ExternalReference log_leave_external_function(Isolate* isolate); |
739 | 750 |
740 // Static data in the keyed lookup cache. | 751 // Static data in the keyed lookup cache. |
741 static ExternalReference keyed_lookup_cache_keys(Isolate* isolate); | 752 static ExternalReference keyed_lookup_cache_keys(Isolate* isolate); |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 public: | 1080 public: |
1070 NullCallWrapper() { } | 1081 NullCallWrapper() { } |
1071 virtual ~NullCallWrapper() { } | 1082 virtual ~NullCallWrapper() { } |
1072 virtual void BeforeCall(int call_size) const { } | 1083 virtual void BeforeCall(int call_size) const { } |
1073 virtual void AfterCall() const { } | 1084 virtual void AfterCall() const { } |
1074 }; | 1085 }; |
1075 | 1086 |
1076 } } // namespace v8::internal | 1087 } } // namespace v8::internal |
1077 | 1088 |
1078 #endif // V8_ASSEMBLER_H_ | 1089 #endif // V8_ASSEMBLER_H_ |
OLD | NEW |