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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 6474026: Strict mode assignment to undefined reference. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix presubmit. 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
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 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 ASSERT(var != NULL); 1708 ASSERT(var != NULL);
1709 ASSERT(var->is_global() || var->AsSlot() != NULL); 1709 ASSERT(var->is_global() || var->AsSlot() != NULL);
1710 1710
1711 if (var->is_global()) { 1711 if (var->is_global()) {
1712 ASSERT(!var->is_this()); 1712 ASSERT(!var->is_this());
1713 // Assignment to a global variable. Use inline caching for the 1713 // Assignment to a global variable. Use inline caching for the
1714 // assignment. Right-hand-side value is passed in rax, variable name in 1714 // assignment. Right-hand-side value is passed in rax, variable name in
1715 // rcx, and the global object on the stack. 1715 // rcx, and the global object on the stack.
1716 __ Move(rcx, var->name()); 1716 __ Move(rcx, var->name());
1717 __ movq(rdx, GlobalObjectOperand()); 1717 __ movq(rdx, GlobalObjectOperand());
1718 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); 1718 Handle<Code> ic(Builtins::builtin(is_strict()
1719 EmitCallIC(ic, RelocInfo::CODE_TARGET); 1719 ? Builtins::StoreIC_Initialize_Strict
1720 : Builtins::StoreIC_Initialize));
1721 EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT);
1720 1722
1721 } else if (var->mode() != Variable::CONST || op == Token::INIT_CONST) { 1723 } else if (var->mode() != Variable::CONST || op == Token::INIT_CONST) {
1722 // Perform the assignment for non-const variables and for initialization 1724 // Perform the assignment for non-const variables and for initialization
1723 // of const variables. Const assignments are simply skipped. 1725 // of const variables. Const assignments are simply skipped.
1724 Label done; 1726 Label done;
1725 Slot* slot = var->AsSlot(); 1727 Slot* slot = var->AsSlot();
1726 switch (slot->type()) { 1728 switch (slot->type()) {
1727 case Slot::PARAMETER: 1729 case Slot::PARAMETER:
1728 case Slot::LOCAL: 1730 case Slot::LOCAL:
1729 if (op == Token::INIT_CONST) { 1731 if (op == Token::INIT_CONST) {
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
3740 __ ret(0); 3742 __ ret(0);
3741 } 3743 }
3742 3744
3743 3745
3744 #undef __ 3746 #undef __
3745 3747
3746 3748
3747 } } // namespace v8::internal 3749 } } // namespace v8::internal
3748 3750
3749 #endif // V8_TARGET_ARCH_X64 3751 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/stub-cache.h ('K') | « src/x64/codegen-x64.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698