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

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

Issue 581273005: X87: Convert KeyedLoad indexed interceptor case to a Handler. (Closed) Base URL: https://github.com/v8/v8.git@bleeding_edge
Patch Set: wq Created 6 years, 3 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 | « src/ic/x87/ic-x87.cc ('k') | no next file » | 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/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 Register receiver = LoadDescriptor::ReceiverRegister(); 324 Register receiver = LoadDescriptor::ReceiverRegister();
325 325
326 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax, 326 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax,
327 ebx, &miss); 327 ebx, &miss);
328 __ bind(&miss); 328 __ bind(&miss);
329 PropertyAccessCompiler::TailCallBuiltin( 329 PropertyAccessCompiler::TailCallBuiltin(
330 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 330 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
331 } 331 }
332 332
333 333
334 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
335 // Return address is on the stack.
336 Label slow;
337
338 Register receiver = LoadDescriptor::ReceiverRegister();
339 Register key = LoadDescriptor::NameRegister();
340 Register scratch = eax;
341 DCHECK(!scratch.is(receiver) && !scratch.is(key));
342
343 // Check that the key is an array index, that is Uint32.
344 __ test(key, Immediate(kSmiTagMask | kSmiSignMask));
345 __ j(not_zero, &slow);
346
347 // Everything is fine, call runtime.
348 __ pop(scratch);
349 __ push(receiver); // receiver
350 __ push(key); // key
351 __ push(scratch); // return address
352
353 // Perform tail call to the entry.
354 ExternalReference ref = ExternalReference(
355 IC_Utility(IC::kLoadElementWithInterceptor), masm->isolate());
356 __ TailCallExternalReference(ref, 2, 1);
357
358 __ bind(&slow);
359 PropertyAccessCompiler::TailCallBuiltin(
360 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
361 }
362
363
334 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 364 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
335 // The key is in edx and the parameter count is in eax. 365 // The key is in edx and the parameter count is in eax.
336 DCHECK(edx.is(ArgumentsAccessReadDescriptor::index())); 366 DCHECK(edx.is(ArgumentsAccessReadDescriptor::index()));
337 DCHECK(eax.is(ArgumentsAccessReadDescriptor::parameter_count())); 367 DCHECK(eax.is(ArgumentsAccessReadDescriptor::parameter_count()));
338 368
339 // The displacement is used for skipping the frame pointer on the 369 // The displacement is used for skipping the frame pointer on the
340 // stack. It is the offset of the last parameter (if any) relative 370 // stack. It is the offset of the last parameter (if any) relative
341 // to the frame pointer. 371 // to the frame pointer.
342 static const int kDisplacement = 1 * kPointerSize; 372 static const int kDisplacement = 1 * kPointerSize;
343 373
(...skipping 3973 matching lines...) Expand 10 before | Expand all | Expand 10 after
4317 Operand(ebp, 7 * kPointerSize), 4347 Operand(ebp, 7 * kPointerSize),
4318 NULL); 4348 NULL);
4319 } 4349 }
4320 4350
4321 4351
4322 #undef __ 4352 #undef __
4323 4353
4324 } } // namespace v8::internal 4354 } } // namespace v8::internal
4325 4355
4326 #endif // V8_TARGET_ARCH_X87 4356 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/ic/x87/ic-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698