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

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

Issue 6286043: Direct call to eval passes strict mode through. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code review feedback. Created 9 years, 10 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/codegen-arm.h ('k') | src/arm/full-codegen-arm.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 4159 matching lines...) Expand 10 before | Expand all | Expand 10 after
4170 frame_->EmitPush(r0); 4170 frame_->EmitPush(r0);
4171 if (arg_count > 0) { 4171 if (arg_count > 0) {
4172 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); 4172 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize));
4173 frame_->EmitPush(r1); 4173 frame_->EmitPush(r1);
4174 } else { 4174 } else {
4175 frame_->EmitPush(r2); 4175 frame_->EmitPush(r2);
4176 } 4176 }
4177 __ ldr(r1, frame_->Receiver()); 4177 __ ldr(r1, frame_->Receiver());
4178 frame_->EmitPush(r1); 4178 frame_->EmitPush(r1);
4179 4179
4180 frame_->CallRuntime(Runtime::kResolvePossiblyDirectEvalNoLookup, 3); 4180 // Push strict mode flag.
4181 frame_->EmitPush(Operand(Smi::FromInt(strict_mode_flag())));
4182
4183 frame_->CallRuntime(Runtime::kResolvePossiblyDirectEvalNoLookup, 4);
4181 4184
4182 done.Jump(); 4185 done.Jump();
4183 slow.Bind(); 4186 slow.Bind();
4184 } 4187 }
4185 4188
4186 // Prepare the stack for the call to ResolvePossiblyDirectEval by 4189 // Prepare the stack for the call to ResolvePossiblyDirectEval by
4187 // pushing the loaded function, the first argument to the eval 4190 // pushing the loaded function, the first argument to the eval
4188 // call and the receiver. 4191 // call and the receiver.
4189 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize + kPointerSize)); 4192 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize + kPointerSize));
4190 frame_->EmitPush(r1); 4193 frame_->EmitPush(r1);
4191 if (arg_count > 0) { 4194 if (arg_count > 0) {
4192 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); 4195 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize));
4193 frame_->EmitPush(r1); 4196 frame_->EmitPush(r1);
4194 } else { 4197 } else {
4195 frame_->EmitPush(r2); 4198 frame_->EmitPush(r2);
4196 } 4199 }
4197 __ ldr(r1, frame_->Receiver()); 4200 __ ldr(r1, frame_->Receiver());
4198 frame_->EmitPush(r1); 4201 frame_->EmitPush(r1);
4199 4202
4203 // Push strict mode flag.
4204 frame_->EmitPush(Operand(Smi::FromInt(strict_mode_flag())));
4205
4200 // Resolve the call. 4206 // Resolve the call.
4201 frame_->CallRuntime(Runtime::kResolvePossiblyDirectEval, 3); 4207 frame_->CallRuntime(Runtime::kResolvePossiblyDirectEval, 4);
4202 4208
4203 // If we generated fast-case code bind the jump-target where fast 4209 // If we generated fast-case code bind the jump-target where fast
4204 // and slow case merge. 4210 // and slow case merge.
4205 if (done.is_linked()) done.Bind(); 4211 if (done.is_linked()) done.Bind();
4206 4212
4207 // Touch up stack with the right values for the function and the receiver. 4213 // Touch up stack with the right values for the function and the receiver.
4208 __ str(r0, MemOperand(sp, (arg_count + 1) * kPointerSize)); 4214 __ str(r0, MemOperand(sp, (arg_count + 1) * kPointerSize));
4209 __ str(r1, MemOperand(sp, arg_count * kPointerSize)); 4215 __ str(r1, MemOperand(sp, arg_count * kPointerSize));
4210 4216
4211 // Call the function. 4217 // Call the function.
(...skipping 3151 matching lines...) Expand 10 before | Expand all | Expand 10 after
7363 BinaryOpIC::GetName(runtime_operands_type_)); 7369 BinaryOpIC::GetName(runtime_operands_type_));
7364 return name_; 7370 return name_;
7365 } 7371 }
7366 7372
7367 7373
7368 #undef __ 7374 #undef __
7369 7375
7370 } } // namespace v8::internal 7376 } } // namespace v8::internal
7371 7377
7372 #endif // V8_TARGET_ARCH_ARM 7378 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698