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

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

Issue 141763002: De-virtualize GenerateNameCheck. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2509 } 2509 }
2510 2510
2511 2511
2512 Register* KeyedStoreStubCompiler::registers() { 2512 Register* KeyedStoreStubCompiler::registers() {
2513 // receiver, name, value, scratch1, scratch2, scratch3. 2513 // receiver, name, value, scratch1, scratch2, scratch3.
2514 static Register registers[] = { r2, r1, r0, r3, r4, r5 }; 2514 static Register registers[] = { r2, r1, r0, r3, r4, r5 };
2515 return registers; 2515 return registers;
2516 } 2516 }
2517 2517
2518 2518
2519 void KeyedLoadStubCompiler::GenerateNameCheck(Handle<Name> name,
2520 Register name_reg,
2521 Label* miss) {
2522 __ cmp(name_reg, Operand(name));
2523 __ b(ne, miss);
2524 }
2525
2526
2527 void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name,
2528 Register name_reg,
2529 Label* miss) {
2530 __ cmp(name_reg, Operand(name));
2531 __ b(ne, miss);
2532 }
2533
2534
2535 #undef __ 2519 #undef __
2536 #define __ ACCESS_MASM(masm) 2520 #define __ ACCESS_MASM(masm)
2537 2521
2538 2522
2539 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, 2523 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
2540 Register receiver, 2524 Register receiver,
2541 Handle<JSFunction> getter) { 2525 Handle<JSFunction> getter) {
2542 // ----------- S t a t e ------------- 2526 // ----------- S t a t e -------------
2543 // -- r0 : receiver 2527 // -- r0 : receiver
2544 // -- r2 : name 2528 // -- r2 : name
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2605 2589
2606 2590
2607 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( 2591 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
2608 TypeHandleList* types, 2592 TypeHandleList* types,
2609 CodeHandleList* handlers, 2593 CodeHandleList* handlers,
2610 Handle<Name> name, 2594 Handle<Name> name,
2611 Code::StubType type, 2595 Code::StubType type,
2612 IcCheckType check) { 2596 IcCheckType check) {
2613 Label miss; 2597 Label miss;
2614 2598
2615 if (check == PROPERTY) { 2599 if (check == PROPERTY &&
2616 GenerateNameCheck(name, this->name(), &miss); 2600 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) {
2601 __ cmp(this->name(), Operand(name));
2602 __ b(ne, &miss);
2617 } 2603 }
2618 2604
2619 Label number_case; 2605 Label number_case;
2620 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 2606 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
2621 __ JumpIfSmi(receiver(), smi_target); 2607 __ JumpIfSmi(receiver(), smi_target);
2622 2608
2623 Register map_reg = scratch1(); 2609 Register map_reg = scratch1();
2624 2610
2625 int receiver_count = types->length(); 2611 int receiver_count = types->length();
2626 int number_of_handled_maps = 0; 2612 int number_of_handled_maps = 0;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
2726 // ----------------------------------- 2712 // -----------------------------------
2727 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2713 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2728 } 2714 }
2729 2715
2730 2716
2731 #undef __ 2717 #undef __
2732 2718
2733 } } // namespace v8::internal 2719 } } // namespace v8::internal
2734 2720
2735 #endif // V8_TARGET_ARCH_ARM 2721 #endif // V8_TARGET_ARCH_ARM
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