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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/ia32/full-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 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 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 2293
2294 // If fast case code has been generated, emit code to push the 2294 // If fast case code has been generated, emit code to push the
2295 // function and receiver and have the slow path jump around this 2295 // function and receiver and have the slow path jump around this
2296 // code. 2296 // code.
2297 if (done.is_linked()) { 2297 if (done.is_linked()) {
2298 Label call; 2298 Label call;
2299 __ b(&call); 2299 __ b(&call);
2300 __ bind(&done); 2300 __ bind(&done);
2301 // Push function. 2301 // Push function.
2302 __ push(r0); 2302 __ push(r0);
2303 // Push global receiver. 2303 // The receiver is implicitly the global receiver. Indicate this
2304 __ ldr(r1, GlobalObjectOperand()); 2304 // by passing the hole to the call function stub.
2305 __ ldr(r1, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset)); 2305 __ LoadRoot(r1, Heap::kTheHoleValueRootIndex);
2306 __ push(r1); 2306 __ push(r1);
2307 __ bind(&call); 2307 __ bind(&call);
2308 } 2308 }
2309 2309
2310 // The receiver is either the global receiver or an object found 2310 // The receiver is either the global receiver or an object found
2311 // by LoadContextSlot. That object could be the hole if the 2311 // by LoadContextSlot. That object could be the hole if the
2312 // receiver is implicitly the global object. 2312 // receiver is implicitly the global object.
2313 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT); 2313 EmitCallWithStub(expr, RECEIVER_MIGHT_BE_IMPLICIT);
2314 } else if (fun->AsProperty() != NULL) { 2314 } else if (fun->AsProperty() != NULL) {
2315 // Call to an object property. 2315 // Call to an object property.
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after
4367 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4367 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4368 __ add(pc, r1, Operand(masm_->CodeObject())); 4368 __ add(pc, r1, Operand(masm_->CodeObject()));
4369 } 4369 }
4370 4370
4371 4371
4372 #undef __ 4372 #undef __
4373 4373
4374 } } // namespace v8::internal 4374 } } // namespace v8::internal
4375 4375
4376 #endif // V8_TARGET_ARCH_ARM 4376 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698