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

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

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months 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 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2509 } 2509 }
2510 2510
2511 2511
2512 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { 2512 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
2513 CEntryStub::GenerateAheadOfTime(isolate); 2513 CEntryStub::GenerateAheadOfTime(isolate);
2514 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); 2514 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate);
2515 StubFailureTrampolineStub::GenerateAheadOfTime(isolate); 2515 StubFailureTrampolineStub::GenerateAheadOfTime(isolate);
2516 // It is important that the store buffer overflow stubs are generated first. 2516 // It is important that the store buffer overflow stubs are generated first.
2517 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 2517 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
2518 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); 2518 CreateAllocationSiteStub::GenerateAheadOfTime(isolate);
2519 if (Serializer::enabled()) { 2519 if (Serializer::enabled(isolate)) {
2520 PlatformFeatureScope sse2(isolate, SSE2); 2520 PlatformFeatureScope sse2(isolate, SSE2);
2521 BinaryOpICStub::GenerateAheadOfTime(isolate); 2521 BinaryOpICStub::GenerateAheadOfTime(isolate);
2522 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); 2522 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
2523 } else { 2523 } else {
2524 BinaryOpICStub::GenerateAheadOfTime(isolate); 2524 BinaryOpICStub::GenerateAheadOfTime(isolate);
2525 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); 2525 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
2526 } 2526 }
2527 } 2527 }
2528 2528
2529 2529
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
3151 3151
3152 __ bind(&done); 3152 __ bind(&done);
3153 } 3153 }
3154 3154
3155 3155
3156 void StringHelper::GenerateHashInit(MacroAssembler* masm, 3156 void StringHelper::GenerateHashInit(MacroAssembler* masm,
3157 Register hash, 3157 Register hash,
3158 Register character, 3158 Register character,
3159 Register scratch) { 3159 Register scratch) {
3160 // hash = (seed + character) + ((seed + character) << 10); 3160 // hash = (seed + character) + ((seed + character) << 10);
3161 if (Serializer::enabled()) { 3161 if (Serializer::enabled(masm->isolate())) {
3162 __ LoadRoot(scratch, Heap::kHashSeedRootIndex); 3162 __ LoadRoot(scratch, Heap::kHashSeedRootIndex);
3163 __ SmiUntag(scratch); 3163 __ SmiUntag(scratch);
3164 __ add(scratch, character); 3164 __ add(scratch, character);
3165 __ mov(hash, scratch); 3165 __ mov(hash, scratch);
3166 __ shl(scratch, 10); 3166 __ shl(scratch, 10);
3167 __ add(hash, scratch); 3167 __ add(hash, scratch);
3168 } else { 3168 } else {
3169 int32_t seed = masm->isolate()->heap()->HashSeed(); 3169 int32_t seed = masm->isolate()->heap()->HashSeed();
3170 __ lea(scratch, Operand(character, seed)); 3170 __ lea(scratch, Operand(character, seed));
3171 __ shl(scratch, 10); 3171 __ shl(scratch, 10);
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
4227 __ mov(result_, Immediate(0)); 4227 __ mov(result_, Immediate(0));
4228 __ Drop(1); 4228 __ Drop(1);
4229 __ ret(2 * kPointerSize); 4229 __ ret(2 * kPointerSize);
4230 } 4230 }
4231 4231
4232 4232
4233 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( 4233 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
4234 Isolate* isolate) { 4234 Isolate* isolate) {
4235 StoreBufferOverflowStub stub(isolate, kDontSaveFPRegs); 4235 StoreBufferOverflowStub stub(isolate, kDontSaveFPRegs);
4236 stub.GetCode(); 4236 stub.GetCode();
4237 if (CpuFeatures::IsSafeForSnapshot(SSE2)) { 4237 if (CpuFeatures::IsSafeForSnapshot(isolate, SSE2)) {
4238 StoreBufferOverflowStub stub2(isolate, kSaveFPRegs); 4238 StoreBufferOverflowStub stub2(isolate, kSaveFPRegs);
4239 stub2.GetCode(); 4239 stub2.GetCode();
4240 } 4240 }
4241 } 4241 }
4242 4242
4243 4243
4244 bool CodeStub::CanUseFPRegisters() { 4244 bool CodeStub::CanUseFPRegisters() {
4245 return CpuFeatures::IsSupported(SSE2); 4245 return CpuFeatures::IsSupported(SSE2);
4246 } 4246 }
4247 4247
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
5046 Operand(ebp, 7 * kPointerSize), 5046 Operand(ebp, 7 * kPointerSize),
5047 NULL); 5047 NULL);
5048 } 5048 }
5049 5049
5050 5050
5051 #undef __ 5051 #undef __
5052 5052
5053 } } // namespace v8::internal 5053 } } // namespace v8::internal
5054 5054
5055 #endif // V8_TARGET_ARCH_IA32 5055 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698