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

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

Issue 111613003: Load the global proxy from the context of the target function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also fix bug on ARM. Created 6 years, 11 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 CallStubCompiler::FetchGlobalProxy(masm, rdx, rdi);
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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1698 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1699 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1699 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1700 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1700 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1701 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1701 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1702 } 1702 }
1703 1703
1704 1704
1705 } } // namespace v8::internal 1705 } } // namespace v8::internal
1706 1706
1707 #endif // V8_TARGET_ARCH_X64 1707 #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