| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 | 170 |
| 171 void CompareNilICStub::InitializeInterfaceDescriptor( | 171 void CompareNilICStub::InitializeInterfaceDescriptor( |
| 172 Isolate* isolate, | 172 Isolate* isolate, |
| 173 CodeStubInterfaceDescriptor* descriptor) { | 173 CodeStubInterfaceDescriptor* descriptor) { |
| 174 static Register registers[] = { eax }; | 174 static Register registers[] = { eax }; |
| 175 descriptor->register_param_count_ = 1; | 175 descriptor->register_param_count_ = 1; |
| 176 descriptor->register_params_ = registers; | 176 descriptor->register_params_ = registers; |
| 177 descriptor->deoptimization_handler_ = | 177 descriptor->deoptimization_handler_ = |
| 178 FUNCTION_ADDR(CompareNilIC_Miss); | 178 FUNCTION_ADDR(CompareNilIC_Miss); |
| 179 descriptor->miss_handler_ = | 179 descriptor->SetMissHandler( |
| 180 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate); | 180 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate)); |
| 181 } | 181 } |
| 182 | 182 |
| 183 | 183 |
| 184 #define __ ACCESS_MASM(masm) | 184 #define __ ACCESS_MASM(masm) |
| 185 | 185 |
| 186 | 186 |
| 187 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 187 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
| 188 // Update the static counter each time a new code stub is generated. | 188 // Update the static counter each time a new code stub is generated. |
| 189 Isolate* isolate = masm->isolate(); | 189 Isolate* isolate = masm->isolate(); |
| 190 isolate->counters()->code_stubs()->Increment(); | 190 isolate->counters()->code_stubs()->Increment(); |
| 191 | 191 |
| 192 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); | 192 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); |
| 193 int param_count = descriptor->register_param_count_; | 193 int param_count = descriptor->register_param_count_; |
| 194 { | 194 { |
| 195 // Call the runtime system in a fresh internal frame. | 195 // Call the runtime system in a fresh internal frame. |
| 196 FrameScope scope(masm, StackFrame::INTERNAL); | 196 FrameScope scope(masm, StackFrame::INTERNAL); |
| 197 ASSERT(descriptor->register_param_count_ == 0 || | 197 ASSERT(descriptor->register_param_count_ == 0 || |
| 198 eax.is(descriptor->register_params_[param_count - 1])); | 198 eax.is(descriptor->register_params_[param_count - 1])); |
| 199 // Push arguments | 199 // Push arguments |
| 200 for (int i = 0; i < param_count; ++i) { | 200 for (int i = 0; i < param_count; ++i) { |
| 201 __ push(descriptor->register_params_[i]); | 201 __ push(descriptor->register_params_[i]); |
| 202 } | 202 } |
| 203 ExternalReference miss = descriptor->miss_handler_; | 203 ExternalReference miss = descriptor->miss_handler(); |
| 204 __ CallExternalReference(miss, descriptor->register_param_count_); | 204 __ CallExternalReference(miss, descriptor->register_param_count_); |
| 205 } | 205 } |
| 206 | 206 |
| 207 __ ret(0); | 207 __ ret(0); |
| 208 } | 208 } |
| 209 | 209 |
| 210 | 210 |
| 211 void ToNumberStub::Generate(MacroAssembler* masm) { | 211 void ToNumberStub::Generate(MacroAssembler* masm) { |
| 212 // The ToNumber stub takes one argument in eax. | 212 // The ToNumber stub takes one argument in eax. |
| 213 Label check_heap_number, call_builtin; | 213 Label check_heap_number, call_builtin; |
| (...skipping 7849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8063 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); | 8063 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 8064 } | 8064 } |
| 8065 } | 8065 } |
| 8066 | 8066 |
| 8067 | 8067 |
| 8068 #undef __ | 8068 #undef __ |
| 8069 | 8069 |
| 8070 } } // namespace v8::internal | 8070 } } // namespace v8::internal |
| 8071 | 8071 |
| 8072 #endif // V8_TARGET_ARCH_IA32 | 8072 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |