Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(968)

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 97543002: Refactor BinaryOpIC to be able to use different stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 Isolate* isolate, 323 Isolate* isolate,
324 CodeStubInterfaceDescriptor* descriptor) { 324 CodeStubInterfaceDescriptor* descriptor) {
325 static Register registers[] = { eax, ebx, ecx, edx }; 325 static Register registers[] = { eax, ebx, ecx, edx };
326 descriptor->register_param_count_ = 4; 326 descriptor->register_param_count_ = 4;
327 descriptor->register_params_ = registers; 327 descriptor->register_params_ = registers;
328 descriptor->deoptimization_handler_ = 328 descriptor->deoptimization_handler_ =
329 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss); 329 FUNCTION_ADDR(ElementsTransitionAndStoreIC_Miss);
330 } 330 }
331 331
332 332
333 void BinaryOpStub::InitializeInterfaceDescriptor( 333 void BinaryOpICStub::InitializeInterfaceDescriptor(
334 Isolate* isolate, 334 Isolate* isolate,
335 CodeStubInterfaceDescriptor* descriptor) { 335 CodeStubInterfaceDescriptor* descriptor) {
336 static Register registers[] = { edx, eax }; 336 static Register registers[] = { edx, eax };
337 descriptor->register_param_count_ = 2; 337 descriptor->register_param_count_ = 2;
338 descriptor->register_params_ = registers; 338 descriptor->register_params_ = registers;
339 descriptor->deoptimization_handler_ = FUNCTION_ADDR(BinaryOpIC_Miss); 339 descriptor->deoptimization_handler_ = FUNCTION_ADDR(BinaryOpIC_Miss);
340 descriptor->SetMissHandler( 340 descriptor->SetMissHandler(
341 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate)); 341 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate));
342 } 342 }
343 343
(...skipping 2610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 2954
2955 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { 2955 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
2956 CEntryStub::GenerateAheadOfTime(isolate); 2956 CEntryStub::GenerateAheadOfTime(isolate);
2957 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); 2957 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate);
2958 StubFailureTrampolineStub::GenerateAheadOfTime(isolate); 2958 StubFailureTrampolineStub::GenerateAheadOfTime(isolate);
2959 // It is important that the store buffer overflow stubs are generated first. 2959 // It is important that the store buffer overflow stubs are generated first.
2960 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 2960 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
2961 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); 2961 CreateAllocationSiteStub::GenerateAheadOfTime(isolate);
2962 if (Serializer::enabled()) { 2962 if (Serializer::enabled()) {
2963 PlatformFeatureScope sse2(SSE2); 2963 PlatformFeatureScope sse2(SSE2);
2964 BinaryOpStub::GenerateAheadOfTime(isolate); 2964 BinaryOpICStub::GenerateAheadOfTime(isolate);
2965 } else { 2965 } else {
2966 BinaryOpStub::GenerateAheadOfTime(isolate); 2966 BinaryOpICStub::GenerateAheadOfTime(isolate);
2967 } 2967 }
2968 } 2968 }
2969 2969
2970 2970
2971 void CodeStub::GenerateFPStubs(Isolate* isolate) { 2971 void CodeStub::GenerateFPStubs(Isolate* isolate) {
2972 if (CpuFeatures::IsSupported(SSE2)) { 2972 if (CpuFeatures::IsSupported(SSE2)) {
2973 CEntryStub save_doubles(1, kSaveFPRegs); 2973 CEntryStub save_doubles(1, kSaveFPRegs);
2974 // Stubs might already be in the snapshot, detect that and don't regenerate, 2974 // Stubs might already be in the snapshot, detect that and don't regenerate,
2975 // which would lead to code stub initialization state being messed up. 2975 // which would lead to code stub initialization state being messed up.
2976 Code* save_doubles_code; 2976 Code* save_doubles_code;
(...skipping 3004 matching lines...) Expand 10 before | Expand all | Expand 10 after
5981 __ bind(&fast_elements_case); 5981 __ bind(&fast_elements_case);
5982 GenerateCase(masm, FAST_ELEMENTS); 5982 GenerateCase(masm, FAST_ELEMENTS);
5983 } 5983 }
5984 5984
5985 5985
5986 #undef __ 5986 #undef __
5987 5987
5988 } } // namespace v8::internal 5988 } } // namespace v8::internal
5989 5989
5990 #endif // V8_TARGET_ARCH_IA32 5990 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698