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

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

Issue 12221064: Implement many KeyedStoreStubs using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add runtime flag and address review feedback Created 7 years, 9 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
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 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after
2584 Handle<Map> receiver_map) { 2584 Handle<Map> receiver_map) {
2585 // ----------- S t a t e ------------- 2585 // ----------- S t a t e -------------
2586 // -- rax : value 2586 // -- rax : value
2587 // -- rcx : key 2587 // -- rcx : key
2588 // -- rdx : receiver 2588 // -- rdx : receiver
2589 // -- rsp[0] : return address 2589 // -- rsp[0] : return address
2590 // ----------------------------------- 2590 // -----------------------------------
2591 2591
2592 ElementsKind elements_kind = receiver_map->elements_kind(); 2592 ElementsKind elements_kind = receiver_map->elements_kind();
2593 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 2593 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
2594 Handle<Code> stub = 2594 if (FLAG_compiled_keyed_stores &&
2595 KeyedStoreElementStub(is_js_array, 2595 (receiver_map->has_fast_elements() ||
2596 elements_kind, 2596 receiver_map->has_external_array_elements())) {
2597 store_mode_).GetCode(isolate()); 2597 Handle<Code> stub = KeyedStoreFastElementStub(
2598 2598 is_js_array,
2599 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK); 2599 elements_kind,
2600 store_mode_).GetCode(isolate());
2601 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK);
2602 } else {
2603 Handle<Code> stub =
2604 KeyedStoreElementStub(is_js_array, elements_kind,
2605 store_mode_).GetCode(isolate());
2606 __ DispatchMap(rdx, receiver_map, stub, DO_SMI_CHECK);
2607 }
2600 2608
2601 TailCallBuiltin(masm(), MissBuiltin(kind())); 2609 TailCallBuiltin(masm(), MissBuiltin(kind()));
2602 2610
2603 // Return the generated code. 2611 // Return the generated code.
2604 return GetICCode(kind(), Code::NORMAL, factory()->empty_string()); 2612 return GetICCode(kind(), Code::NORMAL, factory()->empty_string());
2605 } 2613 }
2606 2614
2607 2615
2608 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic( 2616 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic(
2609 MapHandleList* receiver_maps, 2617 MapHandleList* receiver_maps,
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
3500 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3508 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3501 } 3509 }
3502 } 3510 }
3503 3511
3504 3512
3505 #undef __ 3513 #undef __
3506 3514
3507 } } // namespace v8::internal 3515 } } // namespace v8::internal
3508 3516
3509 #endif // V8_TARGET_ARCH_X64 3517 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ic.cc ('K') | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/elements-kind.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698