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

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

Issue 6974008: Add missing SMI checks to fix reliability bots (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix whitespace Created 9 years, 7 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') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 2494
2495 2495
2496 MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement( 2496 MaybeObject* KeyedStoreStubCompiler::CompileStoreFastElement(
2497 Map* receiver_map) { 2497 Map* receiver_map) {
2498 // ----------- S t a t e ------------- 2498 // ----------- S t a t e -------------
2499 // -- rax : value 2499 // -- rax : value
2500 // -- rcx : key 2500 // -- rcx : key
2501 // -- rdx : receiver 2501 // -- rdx : receiver
2502 // -- rsp[0] : return address 2502 // -- rsp[0] : return address
2503 // ----------------------------------- 2503 // -----------------------------------
2504 Label miss;
2505 __ JumpIfSmi(rdx, &miss);
2506
2504 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 2507 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
2505 MaybeObject* maybe_stub = 2508 MaybeObject* maybe_stub =
2506 KeyedStoreFastElementStub(is_js_array).TryGetCode(); 2509 KeyedStoreFastElementStub(is_js_array).TryGetCode();
2507 Code* stub; 2510 Code* stub;
2508 if (!maybe_stub->To(&stub)) return maybe_stub; 2511 if (!maybe_stub->To(&stub)) return maybe_stub;
2509 __ DispatchMap(rdx, 2512 __ DispatchMap(rdx,
2510 Handle<Map>(receiver_map), 2513 Handle<Map>(receiver_map),
2511 Handle<Code>(stub), 2514 Handle<Code>(stub),
2512 DO_SMI_CHECK); 2515 DO_SMI_CHECK);
2513 2516
2517 __ bind(&miss);
2514 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss(); 2518 Handle<Code> ic = isolate()->builtins()->KeyedStoreIC_Miss();
2515 __ jmp(ic, RelocInfo::CODE_TARGET); 2519 __ jmp(ic, RelocInfo::CODE_TARGET);
2516 2520
2517 // Return the generated code. 2521 // Return the generated code.
2518 return GetCode(NORMAL, NULL); 2522 return GetCode(NORMAL, NULL);
2519 } 2523 }
2520 2524
2521 2525
2522 MaybeObject* KeyedStoreStubCompiler::CompileStoreMegamorphic( 2526 MaybeObject* KeyedStoreStubCompiler::CompileStoreMegamorphic(
2523 MapList* receiver_maps, 2527 MapList* receiver_maps,
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2952 return GetCode(CALLBACKS, name); 2956 return GetCode(CALLBACKS, name);
2953 } 2957 }
2954 2958
2955 2959
2956 MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) { 2960 MaybeObject* KeyedLoadStubCompiler::CompileLoadFastElement(Map* receiver_map) {
2957 // ----------- S t a t e ------------- 2961 // ----------- S t a t e -------------
2958 // -- rax : key 2962 // -- rax : key
2959 // -- rdx : receiver 2963 // -- rdx : receiver
2960 // -- rsp[0] : return address 2964 // -- rsp[0] : return address
2961 // ----------------------------------- 2965 // -----------------------------------
2966 Label miss;
2967 __ JumpIfSmi(rdx, &miss);
2968
2962 MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode(); 2969 MaybeObject* maybe_stub = KeyedLoadFastElementStub().TryGetCode();
2963 Code* stub; 2970 Code* stub;
2964 if (!maybe_stub->To(&stub)) return maybe_stub; 2971 if (!maybe_stub->To(&stub)) return maybe_stub;
2965 __ DispatchMap(rdx, 2972 __ DispatchMap(rdx,
2966 Handle<Map>(receiver_map), 2973 Handle<Map>(receiver_map),
2967 Handle<Code>(stub), 2974 Handle<Code>(stub),
2968 DO_SMI_CHECK); 2975 DO_SMI_CHECK);
2969 2976
2977 __ bind(&miss);
2970 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss(); 2978 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Miss();
2971 __ jmp(ic, RelocInfo::CODE_TARGET); 2979 __ jmp(ic, RelocInfo::CODE_TARGET);
2972 2980
2973 // Return the generated code. 2981 // Return the generated code.
2974 return GetCode(NORMAL, NULL); 2982 return GetCode(NORMAL, NULL);
2975 } 2983 }
2976 2984
2977 2985
2978 MaybeObject* KeyedLoadStubCompiler::CompileLoadMegamorphic( 2986 MaybeObject* KeyedLoadStubCompiler::CompileLoadMegamorphic(
2979 MapList* receiver_maps, 2987 MapList* receiver_maps,
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
3588 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 3596 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
3589 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); 3597 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET);
3590 } 3598 }
3591 3599
3592 3600
3593 #undef __ 3601 #undef __
3594 3602
3595 } } // namespace v8::internal 3603 } } // namespace v8::internal
3596 3604
3597 #endif // V8_TARGET_ARCH_X64 3605 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698