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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 7085034: Reapply change to Pass undefined to JS builtins when called with (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/compiler.h » ('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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 info_->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) { 139 info_->function()->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
140 __ stop("stop_at"); 140 __ stop("stop_at");
141 } 141 }
142 #endif 142 #endif
143 143
144 // r1: Callee's JS function. 144 // r1: Callee's JS function.
145 // cp: Callee's context. 145 // cp: Callee's context.
146 // fp: Caller's frame pointer. 146 // fp: Caller's frame pointer.
147 // lr: Caller's pc. 147 // lr: Caller's pc.
148 148
149 // Strict mode functions need to replace the receiver with undefined 149 // Strict mode functions and builtins need to replace the receiver
150 // when called as functions (without an explicit receiver 150 // with undefined when called as functions (without an explicit
151 // object). r5 is zero for method calls and non-zero for function 151 // receiver object). r5 is zero for method calls and non-zero for
152 // calls. 152 // function calls.
153 if (info_->is_strict_mode()) { 153 if (info_->is_strict_mode() || info_->is_native()) {
154 Label ok; 154 Label ok;
155 __ cmp(r5, Operand(0)); 155 __ cmp(r5, Operand(0));
156 __ b(eq, &ok); 156 __ b(eq, &ok);
157 int receiver_offset = scope()->num_parameters() * kPointerSize; 157 int receiver_offset = scope()->num_parameters() * kPointerSize;
158 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex); 158 __ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
159 __ str(r2, MemOperand(sp, receiver_offset)); 159 __ str(r2, MemOperand(sp, receiver_offset));
160 __ bind(&ok); 160 __ bind(&ok);
161 } 161 }
162 162
163 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); 163 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
(...skipping 4359 matching lines...) Expand 10 before | Expand all | Expand 10 after
4523 ASSERT(osr_pc_offset_ == -1); 4523 ASSERT(osr_pc_offset_ == -1);
4524 osr_pc_offset_ = masm()->pc_offset(); 4524 osr_pc_offset_ = masm()->pc_offset();
4525 } 4525 }
4526 4526
4527 4527
4528 4528
4529 4529
4530 #undef __ 4530 #undef __
4531 4531
4532 } } // namespace v8::internal 4532 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698