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

Side by Side Diff: src/x87/lithium-codegen-x87.cc

Issue 904373002: X87: Continue learning for calls in crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | src/x87/lithium-x87.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 4346 matching lines...) Expand 10 before | Expand all | Expand 10 after
4357 } 4357 }
4358 } 4358 }
4359 4359
4360 4360
4361 void LCodeGen::DoCallFunction(LCallFunction* instr) { 4361 void LCodeGen::DoCallFunction(LCallFunction* instr) {
4362 DCHECK(ToRegister(instr->context()).is(esi)); 4362 DCHECK(ToRegister(instr->context()).is(esi));
4363 DCHECK(ToRegister(instr->function()).is(edi)); 4363 DCHECK(ToRegister(instr->function()).is(edi));
4364 DCHECK(ToRegister(instr->result()).is(eax)); 4364 DCHECK(ToRegister(instr->result()).is(eax));
4365 4365
4366 int arity = instr->arity(); 4366 int arity = instr->arity();
4367 CallFunctionStub stub(isolate(), arity, instr->hydrogen()->function_flags()); 4367 CallFunctionFlags flags = instr->hydrogen()->function_flags();
4368 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4368 if (instr->hydrogen()->HasVectorAndSlot()) {
4369 Register slot_register = ToRegister(instr->temp_slot());
4370 Register vector_register = ToRegister(instr->temp_vector());
4371 DCHECK(slot_register.is(edx));
4372 DCHECK(vector_register.is(ebx));
4373
4374 AllowDeferredHandleDereference vector_structure_check;
4375 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector();
4376 int index = vector->GetIndex(instr->hydrogen()->slot());
4377
4378 __ mov(vector_register, vector);
4379 __ mov(slot_register, Immediate(Smi::FromInt(index)));
4380
4381 CallICState::CallType call_type =
4382 (flags & CALL_AS_METHOD) ? CallICState::METHOD : CallICState::FUNCTION;
4383
4384 Handle<Code> ic =
4385 CodeFactory::CallICInOptimizedCode(isolate(), arity, call_type).code();
4386 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4387 } else {
4388 CallFunctionStub stub(isolate(), arity, flags);
4389 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4390 }
4369 } 4391 }
4370 4392
4371 4393
4372 void LCodeGen::DoCallNew(LCallNew* instr) { 4394 void LCodeGen::DoCallNew(LCallNew* instr) {
4373 DCHECK(ToRegister(instr->context()).is(esi)); 4395 DCHECK(ToRegister(instr->context()).is(esi));
4374 DCHECK(ToRegister(instr->constructor()).is(edi)); 4396 DCHECK(ToRegister(instr->constructor()).is(edi));
4375 DCHECK(ToRegister(instr->result()).is(eax)); 4397 DCHECK(ToRegister(instr->result()).is(eax));
4376 4398
4377 // No cell in ebx for construct type feedback in optimized code 4399 // No cell in ebx for construct type feedback in optimized code
4378 __ mov(ebx, isolate()->factory()->undefined_value()); 4400 __ mov(ebx, isolate()->factory()->undefined_value());
(...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after
6358 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6380 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6359 RecordSafepoint(Safepoint::kNoLazyDeopt); 6381 RecordSafepoint(Safepoint::kNoLazyDeopt);
6360 } 6382 }
6361 6383
6362 6384
6363 #undef __ 6385 #undef __
6364 6386
6365 } } // namespace v8::internal 6387 } } // namespace v8::internal
6366 6388
6367 #endif // V8_TARGET_ARCH_X87 6389 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698