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

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

Issue 14649015: Merged r13828, r13847 into 3.17 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.17
Patch Set: Created 7 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/version.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 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 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 void ArrayLengthStub::Generate(MacroAssembler* masm) { 2344 void ArrayLengthStub::Generate(MacroAssembler* masm) {
2345 Label miss; 2345 Label miss;
2346 Register receiver; 2346 Register receiver;
2347 if (kind() == Code::KEYED_LOAD_IC) { 2347 if (kind() == Code::KEYED_LOAD_IC) {
2348 // ----------- S t a t e ------------- 2348 // ----------- S t a t e -------------
2349 // -- rax : key 2349 // -- rax : key
2350 // -- rdx : receiver 2350 // -- rdx : receiver
2351 // -- rsp[0] : return address 2351 // -- rsp[0] : return address
2352 // ----------------------------------- 2352 // -----------------------------------
2353 __ Cmp(rax, masm->isolate()->factory()->length_symbol()); 2353 __ Cmp(rax, masm->isolate()->factory()->length_symbol());
2354 __ j(not_equal, &miss);
2354 receiver = rdx; 2355 receiver = rdx;
2355 } else { 2356 } else {
2356 ASSERT(kind() == Code::LOAD_IC); 2357 ASSERT(kind() == Code::LOAD_IC);
2357 // ----------- S t a t e ------------- 2358 // ----------- S t a t e -------------
2358 // -- rax : receiver 2359 // -- rax : receiver
2359 // -- rcx : name 2360 // -- rcx : name
2360 // -- rsp[0] : return address 2361 // -- rsp[0] : return address
2361 // ----------------------------------- 2362 // -----------------------------------
2362 receiver = rax; 2363 receiver = rax;
2363 } 2364 }
2364 2365
2365 StubCompiler::GenerateLoadArrayLength(masm, receiver, r8, &miss); 2366 StubCompiler::GenerateLoadArrayLength(masm, receiver, r8, &miss);
2366 __ bind(&miss); 2367 __ bind(&miss);
2367 StubCompiler::GenerateLoadMiss(masm, kind()); 2368 StubCompiler::GenerateLoadMiss(masm, kind());
2368 } 2369 }
2369 2370
2370 2371
2371 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 2372 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
2372 Label miss; 2373 Label miss;
2373 Register receiver; 2374 Register receiver;
2374 if (kind() == Code::KEYED_LOAD_IC) { 2375 if (kind() == Code::KEYED_LOAD_IC) {
2375 // ----------- S t a t e ------------- 2376 // ----------- S t a t e -------------
2376 // -- rax : key 2377 // -- rax : key
2377 // -- rdx : receiver 2378 // -- rdx : receiver
2378 // -- rsp[0] : return address 2379 // -- rsp[0] : return address
2379 // ----------------------------------- 2380 // -----------------------------------
2380 __ Cmp(rax, masm->isolate()->factory()->prototype_symbol()); 2381 __ Cmp(rax, masm->isolate()->factory()->prototype_symbol());
2382 __ j(not_equal, &miss);
2381 receiver = rdx; 2383 receiver = rdx;
2382 } else { 2384 } else {
2383 ASSERT(kind() == Code::LOAD_IC); 2385 ASSERT(kind() == Code::LOAD_IC);
2384 // ----------- S t a t e ------------- 2386 // ----------- S t a t e -------------
2385 // -- rax : receiver 2387 // -- rax : receiver
2386 // -- rcx : name 2388 // -- rcx : name
2387 // -- rsp[0] : return address 2389 // -- rsp[0] : return address
2388 // ----------------------------------- 2390 // -----------------------------------
2389 receiver = rax; 2391 receiver = rax;
2390 } 2392 }
2391 2393
2392 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss); 2394 StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss);
2393 __ bind(&miss); 2395 __ bind(&miss);
2394 StubCompiler::GenerateLoadMiss(masm, kind()); 2396 StubCompiler::GenerateLoadMiss(masm, kind());
2395 } 2397 }
2396 2398
2397 2399
2398 void StringLengthStub::Generate(MacroAssembler* masm) { 2400 void StringLengthStub::Generate(MacroAssembler* masm) {
2399 Label miss; 2401 Label miss;
2400 Register receiver; 2402 Register receiver;
2401 if (kind() == Code::KEYED_LOAD_IC) { 2403 if (kind() == Code::KEYED_LOAD_IC) {
2402 // ----------- S t a t e ------------- 2404 // ----------- S t a t e -------------
2403 // -- rax : key 2405 // -- rax : key
2404 // -- rdx : receiver 2406 // -- rdx : receiver
2405 // -- rsp[0] : return address 2407 // -- rsp[0] : return address
2406 // ----------------------------------- 2408 // -----------------------------------
2407 __ Cmp(rax, masm->isolate()->factory()->length_symbol()); 2409 __ Cmp(rax, masm->isolate()->factory()->length_symbol());
2410 __ j(not_equal, &miss);
2408 receiver = rdx; 2411 receiver = rdx;
2409 } else { 2412 } else {
2410 ASSERT(kind() == Code::LOAD_IC); 2413 ASSERT(kind() == Code::LOAD_IC);
2411 // ----------- S t a t e ------------- 2414 // ----------- S t a t e -------------
2412 // -- rax : receiver 2415 // -- rax : receiver
2413 // -- rcx : name 2416 // -- rcx : name
2414 // -- rsp[0] : return address 2417 // -- rsp[0] : return address
2415 // ----------------------------------- 2418 // -----------------------------------
2416 receiver = rax; 2419 receiver = rax;
2417 } 2420 }
(...skipping 18 matching lines...) Expand all
2436 // elements of FixedArray type). Value must be a number, but only smis are 2439 // elements of FixedArray type). Value must be a number, but only smis are
2437 // accepted as the most common case. 2440 // accepted as the most common case.
2438 2441
2439 Label miss; 2442 Label miss;
2440 2443
2441 Register receiver = rdx; 2444 Register receiver = rdx;
2442 Register value = rax; 2445 Register value = rax;
2443 Register scratch = rbx; 2446 Register scratch = rbx;
2444 if (kind() == Code::KEYED_STORE_IC) { 2447 if (kind() == Code::KEYED_STORE_IC) {
2445 __ Cmp(rcx, masm->isolate()->factory()->length_symbol()); 2448 __ Cmp(rcx, masm->isolate()->factory()->length_symbol());
2449 __ j(not_equal, &miss);
2446 } 2450 }
2447 2451
2448 // Check that the receiver isn't a smi. 2452 // Check that the receiver isn't a smi.
2449 __ JumpIfSmi(receiver, &miss); 2453 __ JumpIfSmi(receiver, &miss);
2450 2454
2451 // Check that the object is a JS array. 2455 // Check that the object is a JS array.
2452 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch); 2456 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch);
2453 __ j(not_equal, &miss); 2457 __ j(not_equal, &miss);
2454 2458
2455 // Check that elements are FixedArray. 2459 // Check that elements are FixedArray.
(...skipping 4237 matching lines...) Expand 10 before | Expand all | Expand 10 after
6693 #endif 6697 #endif
6694 6698
6695 __ Ret(); 6699 __ Ret();
6696 } 6700 }
6697 6701
6698 #undef __ 6702 #undef __
6699 6703
6700 } } // namespace v8::internal 6704 } } // namespace v8::internal
6701 6705
6702 #endif // V8_TARGET_ARCH_X64 6706 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698