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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 7096004: Fix receiver for calls to strict-mode and builtin functions that are (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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/arm/full-codegen-arm.cc ('k') | src/x64/full-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2223 2223
2224 // If fast case code has been generated, emit code to push the 2224 // If fast case code has been generated, emit code to push the
2225 // function and receiver and have the slow path jump around this 2225 // function and receiver and have the slow path jump around this
2226 // code. 2226 // code.
2227 if (done.is_linked()) { 2227 if (done.is_linked()) {
2228 Label call; 2228 Label call;
2229 __ jmp(&call); 2229 __ jmp(&call);
2230 __ bind(&done); 2230 __ bind(&done);
2231 // Push function. 2231 // Push function.
2232 __ push(eax); 2232 __ push(eax);
2233 // Push global receiver. 2233 // The receiver is implicitly the global receiver. Indicate this
2234 __ mov(ebx, GlobalObjectOperand()); 2234 // by passing the hole to the call function stub.
2235 __ push(FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); 2235 __ push(Immediate(isolate()->factory()->the_hole_value()));
2236 __ bind(&call); 2236 __ bind(&call);
2237 } 2237 }
2238 2238
2239 // The receiver is either the global receiver or an object found 2239 // The receiver is either the global receiver or an object found
2240 // by LoadContextSlot. That object could be the hole if the 2240 // by LoadContextSlot. That object could be the hole if the
2241 // receiver is implicitly the global object. 2241 // receiver is implicitly the global object.
2242 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT); 2242 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT);
2243 } else if (fun->AsProperty() != NULL) { 2243 } else if (fun->AsProperty() != NULL) {
2244 // Call to an object property. 2244 // Call to an object property.
2245 Property* prop = fun->AsProperty(); 2245 Property* prop = fun->AsProperty();
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
4330 // And return. 4330 // And return.
4331 __ ret(0); 4331 __ ret(0);
4332 } 4332 }
4333 4333
4334 4334
4335 #undef __ 4335 #undef __
4336 4336
4337 } } // namespace v8::internal 4337 } } // namespace v8::internal
4338 4338
4339 #endif // V8_TARGET_ARCH_IA32 4339 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698