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

Side by Side Diff: src/x64/ic-x64.cc

Issue 157543002: A64: Synchronize with r18581. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/x64/full-codegen-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('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 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 Label invoke, global; 991 Label invoke, global;
992 __ movq(rdx, args.GetReceiverOperand()); 992 __ movq(rdx, args.GetReceiverOperand());
993 __ JumpIfSmi(rdx, &invoke); 993 __ JumpIfSmi(rdx, &invoke);
994 __ CmpObjectType(rdx, JS_GLOBAL_OBJECT_TYPE, rcx); 994 __ CmpObjectType(rdx, JS_GLOBAL_OBJECT_TYPE, rcx);
995 __ j(equal, &global); 995 __ j(equal, &global);
996 __ CmpInstanceType(rcx, JS_BUILTINS_OBJECT_TYPE); 996 __ CmpInstanceType(rcx, JS_BUILTINS_OBJECT_TYPE);
997 __ j(not_equal, &invoke); 997 __ j(not_equal, &invoke);
998 998
999 // Patch the receiver on the stack. 999 // Patch the receiver on the stack.
1000 __ bind(&global); 1000 __ bind(&global);
1001 __ movq(rdx, FieldOperand(rdx, GlobalObject::kGlobalReceiverOffset)); 1001 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex);
1002 __ movq(args.GetReceiverOperand(), rdx); 1002 __ movq(args.GetReceiverOperand(), rdx);
1003 __ bind(&invoke); 1003 __ bind(&invoke);
1004 } 1004 }
1005 1005
1006 // Invoke the function. 1006 // Invoke the function.
1007 CallKind call_kind = CallICBase::Contextual::decode(extra_state) 1007 CallKind call_kind = CallICBase::Contextual::decode(extra_state)
1008 ? CALL_AS_FUNCTION 1008 ? CALL_AS_FUNCTION
1009 : CALL_AS_METHOD; 1009 : CALL_AS_METHOD;
1010 ParameterCount actual(argc); 1010 ParameterCount actual(argc);
1011 __ InvokeFunction(rdi, 1011 __ InvokeFunction(rdi,
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 GenerateUnmappedArgumentsLookup(masm, rcx, rbx, rax, &slow); 1338 GenerateUnmappedArgumentsLookup(masm, rcx, rbx, rax, &slow);
1339 __ CompareRoot(unmapped_location, Heap::kTheHoleValueRootIndex); 1339 __ CompareRoot(unmapped_location, Heap::kTheHoleValueRootIndex);
1340 __ j(equal, &slow); 1340 __ j(equal, &slow);
1341 __ movq(rdi, unmapped_location); 1341 __ movq(rdi, unmapped_location);
1342 GenerateFunctionTailCall(masm, argc, &slow); 1342 GenerateFunctionTailCall(masm, argc, &slow);
1343 __ bind(&slow); 1343 __ bind(&slow);
1344 GenerateMiss(masm, argc); 1344 GenerateMiss(masm, argc);
1345 } 1345 }
1346 1346
1347 1347
1348 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 1348 void LoadIC::GenerateMegamorphic(MacroAssembler* masm, ContextualMode mode) {
1349 // ----------- S t a t e ------------- 1349 // ----------- S t a t e -------------
1350 // -- rax : receiver 1350 // -- rax : receiver
1351 // -- rcx : name 1351 // -- rcx : name
1352 // -- rsp[0] : return address 1352 // -- rsp[0] : return address
1353 // ----------------------------------- 1353 // -----------------------------------
1354 1354
1355 // Probe the stub cache. 1355 // Probe the stub cache.
1356 ExtraICState extra_ic_state = IC::ComputeExtraICState(mode);
1356 Code::Flags flags = Code::ComputeFlags( 1357 Code::Flags flags = Code::ComputeFlags(
1357 Code::HANDLER, MONOMORPHIC, kNoExtraICState, 1358 Code::HANDLER, MONOMORPHIC, extra_ic_state,
1358 Code::NORMAL, Code::LOAD_IC); 1359 Code::NORMAL, Code::LOAD_IC);
1359 masm->isolate()->stub_cache()->GenerateProbe( 1360 masm->isolate()->stub_cache()->GenerateProbe(
1360 masm, flags, rax, rcx, rbx, rdx); 1361 masm, flags, rax, rcx, rbx, rdx);
1361 1362
1362 GenerateMiss(masm); 1363 GenerateMiss(masm);
1363 } 1364 }
1364 1365
1365 1366
1366 void LoadIC::GenerateNormal(MacroAssembler* masm) { 1367 void LoadIC::GenerateNormal(MacroAssembler* masm) {
1367 // ----------- S t a t e ------------- 1368 // ----------- S t a t e -------------
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1699 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1699 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1700 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1700 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1701 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1701 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1702 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1702 } 1703 }
1703 1704
1704 1705
1705 } } // namespace v8::internal 1706 } } // namespace v8::internal
1706 1707
1707 #endif // V8_TARGET_ARCH_X64 1708 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698