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

Side by Side Diff: src/x64/codegen-x64.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/x64/codegen-x64.h ('k') | src/x64/full-codegen-x64.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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 ArgumentsAllocationMode mode = ArgumentsMode(); 627 ArgumentsAllocationMode mode = ArgumentsMode();
628 ASSERT(mode != NO_ARGUMENTS_ALLOCATION); 628 ASSERT(mode != NO_ARGUMENTS_ALLOCATION);
629 629
630 Comment cmnt(masm_, "[ store arguments object"); 630 Comment cmnt(masm_, "[ store arguments object");
631 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) { 631 if (mode == LAZY_ARGUMENTS_ALLOCATION && initial) {
632 // When using lazy arguments allocation, we store the arguments marker value 632 // When using lazy arguments allocation, we store the arguments marker value
633 // as a sentinel indicating that the arguments object hasn't been 633 // as a sentinel indicating that the arguments object hasn't been
634 // allocated yet. 634 // allocated yet.
635 frame_->Push(Factory::arguments_marker()); 635 frame_->Push(Factory::arguments_marker());
636 } else { 636 } else {
637 ArgumentsAccessStub stub(ArgumentsAccessStub::NEW_OBJECT); 637 ArgumentsAccessStub stub(is_strict_mode()
638 ? ArgumentsAccessStub::NEW_STRICT
639 : ArgumentsAccessStub::NEW_NON_STRICT);
638 frame_->PushFunction(); 640 frame_->PushFunction();
639 frame_->PushReceiverSlotAddress(); 641 frame_->PushReceiverSlotAddress();
640 frame_->Push(Smi::FromInt(scope()->num_parameters())); 642 frame_->Push(Smi::FromInt(scope()->num_parameters()));
641 Result result = frame_->CallStub(&stub, 3); 643 Result result = frame_->CallStub(&stub, 3);
642 frame_->Push(&result); 644 frame_->Push(&result);
643 } 645 }
644 646
645 Variable* arguments = scope()->arguments(); 647 Variable* arguments = scope()->arguments();
646 Variable* shadow = scope()->arguments_shadow(); 648 Variable* shadow = scope()->arguments_shadow();
647 ASSERT(arguments != NULL && arguments->AsSlot() != NULL); 649 ASSERT(arguments != NULL && arguments->AsSlot() != NULL);
(...skipping 8187 matching lines...) Expand 10 before | Expand all | Expand 10 after
8835 } 8837 }
8836 8838
8837 #endif 8839 #endif
8838 8840
8839 8841
8840 #undef __ 8842 #undef __
8841 8843
8842 } } // namespace v8::internal 8844 } } // namespace v8::internal
8843 8845
8844 #endif // V8_TARGET_ARCH_X64 8846 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698