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

Side by Side Diff: src/mips/stub-cache-mips.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 | « src/ia32/stub-cache-ia32.cc ('k') | src/stub-cache.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 // 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[] = { a2, a1, a0, a3, t0, t1 }; 2514 static Register registers[] = { a2, a1, a0, a3, t0, t1 };
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 __ Branch(miss, ne, name_reg, Operand(name));
2523 }
2524
2525
2526 void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name,
2527 Register name_reg,
2528 Label* miss) {
2529 __ Branch(miss, ne, name_reg, Operand(name));
2530 }
2531
2532
2533 #undef __ 2519 #undef __
2534 #define __ ACCESS_MASM(masm) 2520 #define __ ACCESS_MASM(masm)
2535 2521
2536 2522
2537 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, 2523 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
2538 Register receiver, 2524 Register receiver,
2539 Handle<JSFunction> getter) { 2525 Handle<JSFunction> getter) {
2540 // ----------- S t a t e ------------- 2526 // ----------- S t a t e -------------
2541 // -- a0 : receiver 2527 // -- a0 : receiver
2542 // -- a2 : name 2528 // -- a2 : name
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 2588
2603 2589
2604 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( 2590 Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC(
2605 TypeHandleList* types, 2591 TypeHandleList* types,
2606 CodeHandleList* handlers, 2592 CodeHandleList* handlers,
2607 Handle<Name> name, 2593 Handle<Name> name,
2608 Code::StubType type, 2594 Code::StubType type,
2609 IcCheckType check) { 2595 IcCheckType check) {
2610 Label miss; 2596 Label miss;
2611 2597
2612 if (check == PROPERTY) { 2598 if (check == PROPERTY &&
2613 GenerateNameCheck(name, this->name(), &miss); 2599 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) {
2600 __ Branch(&miss, ne, this->name(), Operand(name));
2614 } 2601 }
2615 2602
2616 Label number_case; 2603 Label number_case;
2617 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 2604 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
2618 __ JumpIfSmi(receiver(), smi_target); 2605 __ JumpIfSmi(receiver(), smi_target);
2619 2606
2620 Register map_reg = scratch1(); 2607 Register map_reg = scratch1();
2621 2608
2622 int receiver_count = types->length(); 2609 int receiver_count = types->length();
2623 int number_of_handled_maps = 0; 2610 int number_of_handled_maps = 0;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
2723 // ----------------------------------- 2710 // -----------------------------------
2724 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2711 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2725 } 2712 }
2726 2713
2727 2714
2728 #undef __ 2715 #undef __
2729 2716
2730 } } // namespace v8::internal 2717 } } // namespace v8::internal
2731 2718
2732 #endif // V8_TARGET_ARCH_MIPS 2719 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698