Chromium Code Reviews| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 XMMRegister input, | 96 XMMRegister input, |
| 97 XMMRegister result, | 97 XMMRegister result, |
| 98 XMMRegister double_scratch, | 98 XMMRegister double_scratch, |
| 99 Register temp1, | 99 Register temp1, |
| 100 Register temp2); | 100 Register temp2); |
| 101 | 101 |
| 102 private: | 102 private: |
| 103 DISALLOW_COPY_AND_ASSIGN(MathExpGenerator); | 103 DISALLOW_COPY_AND_ASSIGN(MathExpGenerator); |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 | |
| 107 enum StackArgumentsAccessorReceiverMode { | |
| 108 ARGUMENTS_CONTAIN_RECEIVER, | |
| 109 ARGUMENTS_DONT_CONTAIN_RECEIVER | |
| 110 }; | |
| 111 | |
| 112 | |
| 113 class StackArgumentsAccessor BASE_EMBEDDED { | |
| 114 public: | |
| 115 StackArgumentsAccessor( | |
| 116 Register base_reg, | |
| 117 int argument_count_immediate, | |
| 118 StackArgumentsAccessorReceiverMode receiver_mode = | |
| 119 ARGUMENTS_CONTAIN_RECEIVER, | |
|
danno
2013/08/13 09:35:09
nit: four space indent from previous line.
haitao.feng
2013/08/13 11:13:50
Done.
| |
| 120 int extra_displacement_to_last_argument = 0) | |
| 121 : base_reg_(base_reg), | |
| 122 argument_count_reg_(no_reg), | |
| 123 argument_count_immediate_(argument_count_immediate), | |
| 124 receiver_mode_(receiver_mode), | |
| 125 extra_displacement_to_last_argument_( | |
| 126 extra_displacement_to_last_argument) { } | |
| 127 | |
| 128 StackArgumentsAccessor( | |
| 129 Register base_reg, | |
| 130 Register argument_count_reg, | |
| 131 StackArgumentsAccessorReceiverMode receiver_mode = | |
| 132 ARGUMENTS_CONTAIN_RECEIVER, | |
|
danno
2013/08/13 09:35:09
nit: four space indent from previous line.
haitao.feng
2013/08/13 11:13:50
Done.
| |
| 133 int extra_displacement_to_last_argument = 0) | |
| 134 : base_reg_(base_reg), | |
| 135 argument_count_reg_(argument_count_reg), | |
| 136 argument_count_immediate_(0), | |
| 137 receiver_mode_(receiver_mode), | |
| 138 extra_displacement_to_last_argument_( | |
| 139 extra_displacement_to_last_argument) { } | |
| 140 | |
| 141 StackArgumentsAccessor( | |
| 142 Register base_reg, | |
| 143 const ParameterCount& parameter_count, | |
| 144 StackArgumentsAccessorReceiverMode receiver_mode = | |
| 145 ARGUMENTS_CONTAIN_RECEIVER, | |
| 146 int extra_displacement_to_last_argument = 0) | |
|
danno
2013/08/13 09:35:09
nit: four space indent from previous line.
haitao.feng
2013/08/13 11:13:50
Done.
| |
| 147 : base_reg_(base_reg), | |
| 148 argument_count_reg_(parameter_count.is_reg() ? | |
| 149 parameter_count.reg() : no_reg), | |
| 150 argument_count_immediate_(parameter_count.is_immediate() ? | |
| 151 parameter_count.immediate() : 0), | |
| 152 receiver_mode_(receiver_mode), | |
| 153 extra_displacement_to_last_argument_( | |
| 154 extra_displacement_to_last_argument) { } | |
| 155 | |
| 156 Operand GetArgumentOperand(int index); | |
| 157 Operand GetReceiverOperand() { | |
| 158 ASSERT(receiver_mode_ == ARGUMENTS_CONTAIN_RECEIVER); | |
| 159 return GetArgumentOperand(0);; | |
| 160 } | |
| 161 | |
| 162 private: | |
| 163 const Register base_reg_; | |
| 164 const Register argument_count_reg_; | |
| 165 const int argument_count_immediate_; | |
| 166 const StackArgumentsAccessorReceiverMode receiver_mode_; | |
| 167 const int extra_displacement_to_last_argument_; | |
| 168 | |
| 169 DISALLOW_IMPLICIT_CONSTRUCTORS(StackArgumentsAccessor); | |
| 170 }; | |
| 171 | |
| 172 | |
| 106 } } // namespace v8::internal | 173 } } // namespace v8::internal |
| 107 | 174 |
| 108 #endif // V8_X64_CODEGEN_X64_H_ | 175 #endif // V8_X64_CODEGEN_X64_H_ |
| OLD | NEW |