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

Side by Side Diff: src/ic-arm.cc

Issue 7420: No more failures than before. It is ready to be reviewed. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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 | « src/codegen-arm.cc ('k') | src/macro-assembler-arm.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 // Check that the receiver is a valid JS object. 359 // Check that the receiver is a valid JS object.
360 __ ldr(r0, FieldMemOperand(r1, HeapObject::kMapOffset)); 360 __ ldr(r0, FieldMemOperand(r1, HeapObject::kMapOffset));
361 __ ldrb(r0, FieldMemOperand(r0, Map::kInstanceTypeOffset)); 361 __ ldrb(r0, FieldMemOperand(r0, Map::kInstanceTypeOffset));
362 __ cmp(r0, Operand(FIRST_JS_OBJECT_TYPE)); 362 __ cmp(r0, Operand(FIRST_JS_OBJECT_TYPE));
363 __ b(lt, &miss); 363 __ b(lt, &miss);
364 364
365 // If this assert fails, we have to check upper bound too. 365 // If this assert fails, we have to check upper bound too.
366 ASSERT(LAST_TYPE == JS_FUNCTION_TYPE); 366 ASSERT(LAST_TYPE == JS_FUNCTION_TYPE);
367 367
368 // Check for access to global object (unlikely). 368 // Check for access to global object (unlikely).
369 __ cmp(r0, Operand(JS_GLOBAL_OBJECT_TYPE)); 369 __ cmp(r0, Operand(JS_GLOBAL_PROXY_TYPE));
370 __ b(eq, &global); 370 __ b(eq, &global);
371 371
372 // Search the dictionary placing the result in r1. 372 // Search the dictionary placing the result in r1.
373 __ bind(&probe); 373 __ bind(&probe);
374 GenerateDictionaryLoad(masm, &done, &miss, r0, r1); 374 GenerateDictionaryLoad(masm, &done, &miss, r0, r1);
375 375
376 // Check that the value isn't a smi. 376 // Check that the value isn't a smi.
377 __ tst(r1, Operand(kSmiTagMask)); 377 __ tst(r1, Operand(kSmiTagMask));
378 __ b(eq, &miss); 378 __ b(eq, &miss);
379 379
380 // Check that the value is a JSFunction. 380 // Check that the value is a JSFunction.
381 __ ldr(r0, FieldMemOperand(r1, HeapObject::kMapOffset)); 381 __ ldr(r0, FieldMemOperand(r1, HeapObject::kMapOffset));
382 __ ldrb(r0, FieldMemOperand(r0, Map::kInstanceTypeOffset)); 382 __ ldrb(r0, FieldMemOperand(r0, Map::kInstanceTypeOffset));
383 __ cmp(r0, Operand(JS_FUNCTION_TYPE)); 383 __ cmp(r0, Operand(JS_FUNCTION_TYPE));
384 __ b(ne, &miss); 384 __ b(ne, &miss);
385 385
386 // Patch the function on the stack; 1 ~ receiver. 386 // Patch the function on the stack; 1 ~ receiver.
387 __ str(r1, MemOperand(sp, (argc + 1) * kPointerSize)); 387 __ str(r1, MemOperand(sp, (argc + 1) * kPointerSize));
388 388
389 // Invoke the function. 389 // Invoke the function.
390 ParameterCount actual(argc); 390 ParameterCount actual(argc);
391 __ InvokeFunction(r1, actual, JUMP_FUNCTION); 391 __ InvokeFunction(r1, actual, JUMP_FUNCTION);
392 392
393 // Global object access: Check access rights. 393 // Global object access: Check access rights.
394 __ bind(&global); 394 __ bind(&global);
395 __ CheckAccessGlobal(r1, r0, &miss); 395 __ CheckAccessGlobalProxy(r1, r0, &miss);
396 __ b(&probe); 396 __ b(&probe);
397 397
398 // Cache miss: Jump to runtime. 398 // Cache miss: Jump to runtime.
399 __ bind(&miss); 399 __ bind(&miss);
400 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss))); 400 Generate(masm, argc, ExternalReference(IC_Utility(kCallIC_Miss)));
401 } 401 }
402 402
403 403
404 void CallIC::Generate(MacroAssembler* masm, 404 void CallIC::Generate(MacroAssembler* masm,
405 int argc, 405 int argc,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 475
476 // Check that the receiver is a valid JS object. 476 // Check that the receiver is a valid JS object.
477 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset)); 477 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
478 __ ldrb(r1, FieldMemOperand(r1, Map::kInstanceTypeOffset)); 478 __ ldrb(r1, FieldMemOperand(r1, Map::kInstanceTypeOffset));
479 __ cmp(r1, Operand(FIRST_JS_OBJECT_TYPE)); 479 __ cmp(r1, Operand(FIRST_JS_OBJECT_TYPE));
480 __ b(lt, &miss); 480 __ b(lt, &miss);
481 // If this assert fails, we have to check upper bound too. 481 // If this assert fails, we have to check upper bound too.
482 ASSERT(LAST_TYPE == JS_FUNCTION_TYPE); 482 ASSERT(LAST_TYPE == JS_FUNCTION_TYPE);
483 483
484 // Check for access to global object (unlikely). 484 // Check for access to global object (unlikely).
485 __ cmp(r1, Operand(JS_GLOBAL_OBJECT_TYPE)); 485 __ cmp(r1, Operand(JS_GLOBAL_PROXY_TYPE));
486 __ b(eq, &global); 486 __ b(eq, &global);
487 487
488 488
489 __ bind(&probe); 489 __ bind(&probe);
490 GenerateDictionaryLoad(masm, &done, &miss, r1, r0); 490 GenerateDictionaryLoad(masm, &done, &miss, r1, r0);
491 __ Ret(); 491 __ Ret();
492 492
493 // Global object access: Check access rights. 493 // Global object access: Check access rights.
494 __ bind(&global); 494 __ bind(&global);
495 __ CheckAccessGlobal(r0, r1, &miss); 495 __ CheckAccessGlobalProxy(r0, r1, &miss);
496 __ b(&probe); 496 __ b(&probe);
497 497
498 // Cache miss: Restore receiver from stack and jump to runtime. 498 // Cache miss: Restore receiver from stack and jump to runtime.
499 __ bind(&miss); 499 __ bind(&miss);
500 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); 500 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
501 } 501 }
502 502
503 503
504 void LoadIC::GenerateMiss(MacroAssembler* masm) { 504 void LoadIC::GenerateMiss(MacroAssembler* masm) {
505 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss))); 505 Generate(masm, ExternalReference(IC_Utility(kLoadIC_Miss)));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 591
592 // Perform tail call to the entry. 592 // Perform tail call to the entry.
593 __ TailCallRuntime(f, 3); 593 __ TailCallRuntime(f, 3);
594 } 594 }
595 595
596 596
597 #undef __ 597 #undef __
598 598
599 599
600 } } // namespace v8::internal 600 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen-arm.cc ('k') | src/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698