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

Side by Side Diff: src/ia32/ic-ia32.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/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 __ JumpIfSmi(edx, &invoke, Label::kNear); 1105 __ JumpIfSmi(edx, &invoke, Label::kNear);
1106 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset)); 1106 __ mov(ebx, FieldOperand(edx, HeapObject::kMapOffset));
1107 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset)); 1107 __ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
1108 __ cmp(ebx, JS_GLOBAL_OBJECT_TYPE); 1108 __ cmp(ebx, JS_GLOBAL_OBJECT_TYPE);
1109 __ j(equal, &global, Label::kNear); 1109 __ j(equal, &global, Label::kNear);
1110 __ cmp(ebx, JS_BUILTINS_OBJECT_TYPE); 1110 __ cmp(ebx, JS_BUILTINS_OBJECT_TYPE);
1111 __ j(not_equal, &invoke, Label::kNear); 1111 __ j(not_equal, &invoke, Label::kNear);
1112 1112
1113 // Patch the receiver on the stack. 1113 // Patch the receiver on the stack.
1114 __ bind(&global); 1114 __ bind(&global);
1115 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); 1115 CallStubCompiler::FetchGlobalProxy(masm, edx, edi);
1116 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx); 1116 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx);
1117
1117 __ bind(&invoke); 1118 __ bind(&invoke);
1118 } 1119 }
1119 1120
1120 // Invoke the function. 1121 // Invoke the function.
1121 CallKind call_kind = CallICBase::Contextual::decode(extra_state) 1122 CallKind call_kind = CallICBase::Contextual::decode(extra_state)
1122 ? CALL_AS_FUNCTION 1123 ? CALL_AS_FUNCTION
1123 : CALL_AS_METHOD; 1124 : CALL_AS_METHOD;
1124 ParameterCount actual(argc); 1125 ParameterCount actual(argc);
1125 __ InvokeFunction(edi, 1126 __ InvokeFunction(edi,
1126 actual, 1127 actual,
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1676 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1677 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1677 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1678 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1678 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1679 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1679 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1680 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1680 } 1681 }
1681 1682
1682 1683
1683 } } // namespace v8::internal 1684 } } // namespace v8::internal
1684 1685
1685 #endif // V8_TARGET_ARCH_IA32 1686 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698