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

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

Issue 6698015: Implement strict mode arguments caller/callee. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Kevin's feedback. Created 9 years, 9 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 ASSERT(mode != NO_ARGUMENTS_ALLOCATION); 594 ASSERT(mode != NO_ARGUMENTS_ALLOCATION);
595 595
596 Comment cmnt(masm_, "[ store arguments object"); 596 Comment cmnt(masm_, "[ store arguments object");
597 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) { 597 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) {
598 // When using lazy arguments allocation, we store the hole value 598 // When using lazy arguments allocation, we store the hole value
599 // as a sentinel indicating that the arguments object hasn't been 599 // as a sentinel indicating that the arguments object hasn't been
600 // allocated yet. 600 // allocated yet.
601 frame_->EmitPushRoot(Heap::kArgumentsMarkerRootIndex); 601 frame_->EmitPushRoot(Heap::kArgumentsMarkerRootIndex);
602 } else { 602 } else {
603 frame_->SpillAll(); 603 frame_->SpillAll();
604 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 604 ArgumentsAccessStub stub(is_strict_mode()
605 ? ArgumentsAccessStub::NEW_STRICT
606 : ArgumentsAccessStub::NEW_NON_STRICT);
605 __ ldr(r2, frame_->Function()); 607 __ ldr(r2, frame_->Function());
606 // The receiver is below the arguments, the return address, and the 608 // The receiver is below the arguments, the return address, and the
607 // frame pointer on the stack. 609 // frame pointer on the stack.
608 const int kReceiverDisplacement = 2 + scope()->num_parameters(); 610 const int kReceiverDisplacement = 2 + scope()->num_parameters();
609 __ add(r1, fp, Operand(kReceiverDisplacement * kPointerSize)); 611 __ add(r1, fp, Operand(kReceiverDisplacement * kPointerSize));
610 __ mov(r0, Operand(Smi::FromInt(scope()->num_parameters()))); 612 __ mov(r0, Operand(Smi::FromInt(scope()->num_parameters())));
611 frame_->Adjust(3); 613 frame_->Adjust(3);
612 __ Push(r2, r1, r0); 614 __ Push(r2, r1, r0);
613 frame_->CallStub(&stub, 3); 615 frame_->CallStub(&stub, 3);
614 frame_->EmitPush(r0); 616 frame_->EmitPush(r0);
(...skipping 6789 matching lines...) Expand 10 before | Expand all | Expand 10 after
7404 BinaryOpIC::GetName(runtime_operands_type_)); 7406 BinaryOpIC::GetName(runtime_operands_type_));
7405 return name_; 7407 return name_;
7406 } 7408 }
7407 7409
7408 7410
7409 #undef __ 7411 #undef __
7410 7412
7411 } } // namespace v8::internal 7413 } } // namespace v8::internal
7412 7414
7413 #endif // V8_TARGET_ARCH_ARM 7415 #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