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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 12545004: Fix Array.length, String.length and Function.prototype LoadICs on x64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2568.js » ('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 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 void ArrayLengthStub::Generate(MacroAssembler* masm) { 2382 void ArrayLengthStub::Generate(MacroAssembler* masm) {
2383 Label miss; 2383 Label miss;
2384 Register receiver; 2384 Register receiver;
2385 if (kind() == Code::KEYED_LOAD_IC) { 2385 if (kind() == Code::KEYED_LOAD_IC) {
2386 // ----------- S t a t e ------------- 2386 // ----------- S t a t e -------------
2387 // -- rax : key 2387 // -- rax : key
2388 // -- rdx : receiver 2388 // -- rdx : receiver
2389 // -- rsp[0] : return address 2389 // -- rsp[0] : return address
2390 // ----------------------------------- 2390 // -----------------------------------
2391 __ Cmp(rax, masm->isolate()->factory()->length_string()); 2391 __ Cmp(rax, masm->isolate()->factory()->length_string());
2392 __ j(not_equal, &miss);
2392 receiver = rdx; 2393 receiver = rdx;
2393 } else { 2394 } else {
2394 ASSERT(kind() == Code::LOAD_IC); 2395 ASSERT(kind() == Code::LOAD_IC);
2395 // ----------- S t a t e ------------- 2396 // ----------- S t a t e -------------
2396 // -- rax : receiver 2397 // -- rax : receiver
2397 // -- rcx : name 2398 // -- rcx : name
2398 // -- rsp[0] : return address 2399 // -- rsp[0] : return address
2399 // ----------------------------------- 2400 // -----------------------------------
2400 receiver = rax; 2401 receiver = rax;
2401 } 2402 }
2402 2403
2403 StubCompiler::GenerateLoadArrayLength(masm, receiver, r8, &miss); 2404 StubCompiler::GenerateLoadArrayLength(masm, receiver, r8, &miss);
2404 __ bind(&miss); 2405 __ bind(&miss);
2405 StubCompiler::GenerateLoadMiss(masm, kind()); 2406 StubCompiler::GenerateLoadMiss(masm, kind());
2406 } 2407 }
2407 2408
2408 2409
2409 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 2410 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
2410 Label miss; 2411 Label miss;
2411 Register receiver; 2412 Register receiver;
2412 if (kind() == Code::KEYED_LOAD_IC) { 2413 if (kind() == Code::KEYED_LOAD_IC) {
2413 // ----------- S t a t e ------------- 2414 // ----------- S t a t e -------------
2414 // -- rax : key 2415 // -- rax : key
2415 // -- rdx : receiver 2416 // -- rdx : receiver
2416 // -- rsp[0] : return address 2417 // -- rsp[0] : return address
2417 // ----------------------------------- 2418 // -----------------------------------
2418 __ Cmp(rax, masm->isolate()->factory()->prototype_string()); 2419 __ Cmp(rax, masm->isolate()->factory()->prototype_string());
2420 __ j(not_equal, &miss);
2419 receiver = rdx; 2421 receiver = rdx;
2420 } else { 2422 } else {
2421 ASSERT(kind() == Code::LOAD_IC); 2423 ASSERT(kind() == Code::LOAD_IC);
2422 // ----------- S t a t e ------------- 2424 // ----------- S t a t e -------------
2423 // -- rax : receiver 2425 // -- rax : receiver
2424 // -- rcx : name 2426 // -- rcx : name
2425 // -- rsp[0] : return address 2427 // -- rsp[0] : return address
2426 // ----------------------------------- 2428 // -----------------------------------
2427 receiver = rax; 2429 receiver = rax;
2428 } 2430 }
2429 2431
2430 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss); 2432 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss);
2431 __ bind(&miss); 2433 __ bind(&miss);
2432 StubCompiler::GenerateLoadMiss(masm, kind()); 2434 StubCompiler::GenerateLoadMiss(masm, kind());
2433 } 2435 }
2434 2436
2435 2437
2436 void StringLengthStub::Generate(MacroAssembler* masm) { 2438 void StringLengthStub::Generate(MacroAssembler* masm) {
2437 Label miss; 2439 Label miss;
2438 Register receiver; 2440 Register receiver;
2439 if (kind() == Code::KEYED_LOAD_IC) { 2441 if (kind() == Code::KEYED_LOAD_IC) {
2440 // ----------- S t a t e ------------- 2442 // ----------- S t a t e -------------
2441 // -- rax : key 2443 // -- rax : key
2442 // -- rdx : receiver 2444 // -- rdx : receiver
2443 // -- rsp[0] : return address 2445 // -- rsp[0] : return address
2444 // ----------------------------------- 2446 // -----------------------------------
2445 __ Cmp(rax, masm->isolate()->factory()->length_string()); 2447 __ Cmp(rax, masm->isolate()->factory()->length_string());
2448 __ j(not_equal, &miss);
2446 receiver = rdx; 2449 receiver = rdx;
2447 } else { 2450 } else {
2448 ASSERT(kind() == Code::LOAD_IC); 2451 ASSERT(kind() == Code::LOAD_IC);
2449 // ----------- S t a t e ------------- 2452 // ----------- S t a t e -------------
2450 // -- rax : receiver 2453 // -- rax : receiver
2451 // -- rcx : name 2454 // -- rcx : name
2452 // -- rsp[0] : return address 2455 // -- rsp[0] : return address
2453 // ----------------------------------- 2456 // -----------------------------------
2454 receiver = rax; 2457 receiver = rax;
2455 } 2458 }
(...skipping 4426 matching lines...) Expand 10 before | Expand all | Expand 10 after
6882 #endif 6885 #endif
6883 6886
6884 __ Ret(); 6887 __ Ret();
6885 } 6888 }
6886 6889
6887 #undef __ 6890 #undef __
6888 6891
6889 } } // namespace v8::internal 6892 } } // namespace v8::internal
6890 6893
6891 #endif // V8_TARGET_ARCH_X64 6894 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2568.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698