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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 159578: Merge r2538 and r2562 to branches/1.2. (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.2/
Patch Set: Created 11 years, 4 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
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 // Check that the receiver isn't a smi. 460 // Check that the receiver isn't a smi.
461 __ tst(receiver, Operand(kSmiTagMask)); 461 __ tst(receiver, Operand(kSmiTagMask));
462 __ b(eq, miss); 462 __ b(eq, miss);
463 463
464 // Check that the maps haven't changed. 464 // Check that the maps haven't changed.
465 Register reg = 465 Register reg =
466 CheckPrototypes(object, receiver, holder, scratch1, scratch2, name, miss); 466 CheckPrototypes(object, receiver, holder, scratch1, scratch2, name, miss);
467 467
468 // Push the arguments on the JS stack of the caller. 468 // Push the arguments on the JS stack of the caller.
469 __ push(receiver); // receiver 469 __ push(receiver); // receiver
470 __ push(reg); // holder
470 __ mov(ip, Operand(Handle<AccessorInfo>(callback))); // callback data 471 __ mov(ip, Operand(Handle<AccessorInfo>(callback))); // callback data
471 __ push(ip); 472 __ push(ip);
473 __ ldr(reg, FieldMemOperand(ip, AccessorInfo::kDataOffset));
474 __ push(reg);
472 __ push(name_reg); // name 475 __ push(name_reg); // name
473 __ push(reg); // holder
474 476
475 // Do tail-call to the runtime system. 477 // Do tail-call to the runtime system.
476 ExternalReference load_callback_property = 478 ExternalReference load_callback_property =
477 ExternalReference(IC_Utility(IC::kLoadCallbackProperty)); 479 ExternalReference(IC_Utility(IC::kLoadCallbackProperty));
478 __ TailCallRuntime(load_callback_property, 4); 480 __ TailCallRuntime(load_callback_property, 5);
479 } 481 }
480 482
481 483
482 void StubCompiler::GenerateLoadInterceptor(JSObject* object, 484 void StubCompiler::GenerateLoadInterceptor(JSObject* object,
483 JSObject* holder, 485 JSObject* holder,
484 Smi* lookup_hint, 486 Smi* lookup_hint,
485 Register receiver, 487 Register receiver,
486 Register name_reg, 488 Register name_reg,
487 Register scratch1, 489 Register scratch1,
488 Register scratch2, 490 Register scratch2,
489 String* name, 491 String* name,
490 Label* miss) { 492 Label* miss) {
491 // Check that the receiver isn't a smi. 493 // Check that the receiver isn't a smi.
492 __ tst(receiver, Operand(kSmiTagMask)); 494 __ tst(receiver, Operand(kSmiTagMask));
493 __ b(eq, miss); 495 __ b(eq, miss);
494 496
495 // Check that the maps haven't changed. 497 // Check that the maps haven't changed.
496 Register reg = 498 Register reg =
497 CheckPrototypes(object, receiver, holder, scratch1, scratch2, name, miss); 499 CheckPrototypes(object, receiver, holder, scratch1, scratch2, name, miss);
498 500
499 // Push the arguments on the JS stack of the caller. 501 // Push the arguments on the JS stack of the caller.
500 __ push(receiver); // receiver 502 __ push(receiver); // receiver
501 __ push(reg); // holder 503 __ push(reg); // holder
502 __ push(name_reg); // name 504 __ push(name_reg); // name
503 __ mov(scratch1, Operand(lookup_hint)); 505 __ mov(scratch1, Operand(lookup_hint));
504 __ push(scratch1); 506 __ push(scratch1);
505 507
508 InterceptorInfo* interceptor = holder->GetNamedInterceptor();
509 ASSERT(!Heap::InNewSpace(interceptor));
510 __ mov(scratch1, Operand(Handle<Object>(interceptor)));
511 __ push(scratch1);
512 __ ldr(scratch2, FieldMemOperand(scratch1, InterceptorInfo::kDataOffset));
513 __ push(scratch2);
514
506 // Do tail-call to the runtime system. 515 // Do tail-call to the runtime system.
507 ExternalReference load_ic_property = 516 ExternalReference load_ic_property =
508 ExternalReference(IC_Utility(IC::kLoadInterceptorProperty)); 517 ExternalReference(IC_Utility(IC::kLoadInterceptorProperty));
509 __ TailCallRuntime(load_ic_property, 4); 518 __ TailCallRuntime(load_ic_property, 6);
510 } 519 }
511 520
512 521
513 Object* StubCompiler::CompileLazyCompile(Code::Flags flags) { 522 Object* StubCompiler::CompileLazyCompile(Code::Flags flags) {
514 // ----------- S t a t e ------------- 523 // ----------- S t a t e -------------
515 // -- r1: function 524 // -- r1: function
516 // -- lr: return address 525 // -- lr: return address
517 // ----------------------------------- 526 // -----------------------------------
518 527
519 // Enter an internal frame. 528 // Enter an internal frame.
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 __ Jump(ic, RelocInfo::CODE_TARGET); 1337 __ Jump(ic, RelocInfo::CODE_TARGET);
1329 1338
1330 // Return the generated code. 1339 // Return the generated code.
1331 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name); 1340 return GetCode(transition == NULL ? FIELD : MAP_TRANSITION, name);
1332 } 1341 }
1333 1342
1334 1343
1335 #undef __ 1344 #undef __
1336 1345
1337 } } // namespace v8::internal 1346 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698