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

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

Issue 368263003: Use a stub in crankshaft for grow store arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed remaining issues. Created 6 years, 5 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 Representation::Tagged(), // callee 326 Representation::Tagged(), // callee
327 Representation::Tagged(), // call_data 327 Representation::Tagged(), // call_data
328 Representation::Tagged(), // holder 328 Representation::Tagged(), // holder
329 Representation::External(), // api_function_address 329 Representation::External(), // api_function_address
330 }; 330 };
331 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations); 331 descriptor->Initialize(ARRAY_SIZE(registers), registers, representations);
332 } 332 }
333 } 333 }
334 334
335 335
336 // IC register specifications
337 const Register GrowArrayElementsStub::ObjectRegister() { return eax; }
338 const Register GrowArrayElementsStub::KeyRegister() { return ebx; }
339 const Register GrowArrayElementsStub::CapacityRegister() { return ecx; }
340
341
336 #define __ ACCESS_MASM(masm) 342 #define __ ACCESS_MASM(masm)
337 343
338 344
339 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { 345 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
340 // Update the static counter each time a new code stub is generated. 346 // Update the static counter each time a new code stub is generated.
341 isolate()->counters()->code_stubs()->Increment(); 347 isolate()->counters()->code_stubs()->Increment();
342 348
343 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(); 349 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor();
344 int param_count = descriptor->GetEnvironmentParameterCount(); 350 int param_count = descriptor->GetEnvironmentParameterCount();
345 { 351 {
(...skipping 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 2513
2508 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { 2514 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
2509 CEntryStub::GenerateAheadOfTime(isolate); 2515 CEntryStub::GenerateAheadOfTime(isolate);
2510 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); 2516 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate);
2511 StubFailureTrampolineStub::GenerateAheadOfTime(isolate); 2517 StubFailureTrampolineStub::GenerateAheadOfTime(isolate);
2512 // It is important that the store buffer overflow stubs are generated first. 2518 // It is important that the store buffer overflow stubs are generated first.
2513 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 2519 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
2514 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); 2520 CreateAllocationSiteStub::GenerateAheadOfTime(isolate);
2515 BinaryOpICStub::GenerateAheadOfTime(isolate); 2521 BinaryOpICStub::GenerateAheadOfTime(isolate);
2516 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate); 2522 BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime(isolate);
2523 GrowArrayElementsStub::GenerateAheadOfTime(isolate);
2517 } 2524 }
2518 2525
2519 2526
2520 void CodeStub::GenerateFPStubs(Isolate* isolate) { 2527 void CodeStub::GenerateFPStubs(Isolate* isolate) {
2521 CEntryStub save_doubles(isolate, 1, kSaveFPRegs); 2528 CEntryStub save_doubles(isolate, 1, kSaveFPRegs);
2522 // Stubs might already be in the snapshot, detect that and don't regenerate, 2529 // Stubs might already be in the snapshot, detect that and don't regenerate,
2523 // which would lead to code stub initialization state being messed up. 2530 // which would lead to code stub initialization state being messed up.
2524 Code* save_doubles_code; 2531 Code* save_doubles_code;
2525 if (!save_doubles.FindCodeInCache(&save_doubles_code)) { 2532 if (!save_doubles.FindCodeInCache(&save_doubles_code)) {
2526 save_doubles_code = *(save_doubles.GetCode()); 2533 save_doubles_code = *(save_doubles.GetCode());
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after
4976 Operand(ebp, 7 * kPointerSize), 4983 Operand(ebp, 7 * kPointerSize),
4977 NULL); 4984 NULL);
4978 } 4985 }
4979 4986
4980 4987
4981 #undef __ 4988 #undef __
4982 4989
4983 } } // namespace v8::internal 4990 } } // namespace v8::internal
4984 4991
4985 #endif // V8_TARGET_ARCH_IA32 4992 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/isolate.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698