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

Side by Side Diff: src/x64/full-codegen-x64.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/ia32/full-codegen-ia32.cc ('k') | test/mjsunit/regress/regress-124.js » ('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 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 2199
2200 // If fast case code has been generated, emit code to push the 2200 // If fast case code has been generated, emit code to push the
2201 // function and receiver and have the slow path jump around this 2201 // function and receiver and have the slow path jump around this
2202 // code. 2202 // code.
2203 if (done.is_linked()) { 2203 if (done.is_linked()) {
2204 Label call; 2204 Label call;
2205 __ jmp(&call, Label::kNear); 2205 __ jmp(&call, Label::kNear);
2206 __ bind(&done); 2206 __ bind(&done);
2207 // Push function. 2207 // Push function.
2208 __ push(rax); 2208 __ push(rax);
2209 // Push global receiver. 2209 // The receiver is implicitly the global receiver. Indicate this
2210 __ movq(rbx, GlobalObjectOperand()); 2210 // by passing the hole to the call function stub.
2211 __ push(FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); 2211 __ PushRoot(Heap::kTheHoleValueRootIndex);
2212 __ bind(&call); 2212 __ bind(&call);
2213 } 2213 }
2214 2214
2215 // The receiver is either the global receiver or an object found 2215 // The receiver is either the global receiver or an object found
2216 // by LoadContextSlot. That object could be the hole if the 2216 // by LoadContextSlot. That object could be the hole if the
2217 // receiver is implicitly the global object. 2217 // receiver is implicitly the global object.
2218 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT); 2218 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT);
2219 } else if (fun->AsProperty() != NULL) { 2219 } else if (fun->AsProperty() != NULL) {
2220 // Call to an object property. 2220 // Call to an object property.
2221 Property* prop = fun->AsProperty(); 2221 Property* prop = fun->AsProperty();
(...skipping 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after
4310 __ ret(0); 4310 __ ret(0);
4311 } 4311 }
4312 4312
4313 4313
4314 #undef __ 4314 #undef __
4315 4315
4316 4316
4317 } } // namespace v8::internal 4317 } } // namespace v8::internal
4318 4318
4319 #endif // V8_TARGET_ARCH_X64 4319 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | test/mjsunit/regress/regress-124.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698