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

Side by Side Diff: src/arm/full-codegen-arm.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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 ASSERT(var != NULL); 1690 ASSERT(var != NULL);
1691 ASSERT(var->is_global() || var->AsSlot() != NULL); 1691 ASSERT(var->is_global() || var->AsSlot() != NULL);
1692 1692
1693 if (var->is_global()) { 1693 if (var->is_global()) {
1694 ASSERT(!var->is_this()); 1694 ASSERT(!var->is_this());
1695 // Assignment to a global variable. Use inline caching for the 1695 // Assignment to a global variable. Use inline caching for the
1696 // assignment. Right-hand-side value is passed in r0, variable name in 1696 // assignment. Right-hand-side value is passed in r0, variable name in
1697 // r2, and the global object in r1. 1697 // r2, and the global object in r1.
1698 __ mov(r2, Operand(var->name())); 1698 __ mov(r2, Operand(var->name()));
1699 __ ldr(r1, GlobalObjectOperand()); 1699 __ ldr(r1, GlobalObjectOperand());
1700 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); 1700 Handle<Code> ic(Builtins::builtin(is_strict()
1701 EmitCallIC(ic, RelocInfo::CODE_TARGET); 1701 ? Builtins::StoreIC_Initialize_Strict
1702 : Builtins::StoreIC_Initialize));
1703 EmitCallIC(ic, RelocInfo::CODE_TARGET_CONTEXT);
1702 1704
1703 } else if (var->mode() != Variable::CONST || op == Token::INIT_CONST) { 1705 } else if (var->mode() != Variable::CONST || op == Token::INIT_CONST) {
1704 // Perform the assignment for non-const variables and for initialization 1706 // Perform the assignment for non-const variables and for initialization
1705 // of const variables. Const assignments are simply skipped. 1707 // of const variables. Const assignments are simply skipped.
1706 Label done; 1708 Label done;
1707 Slot* slot = var->AsSlot(); 1709 Slot* slot = var->AsSlot();
1708 switch (slot->type()) { 1710 switch (slot->type()) {
1709 case Slot::PARAMETER: 1711 case Slot::PARAMETER:
1710 case Slot::LOCAL: 1712 case Slot::LOCAL:
1711 if (op == Token::INIT_CONST) { 1713 if (op == Token::INIT_CONST) {
(...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after
3701 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3703 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3702 __ add(pc, r1, Operand(masm_->CodeObject())); 3704 __ add(pc, r1, Operand(masm_->CodeObject()));
3703 } 3705 }
3704 3706
3705 3707
3706 #undef __ 3708 #undef __
3707 3709
3708 } } // namespace v8::internal 3710 } } // namespace v8::internal
3709 3711
3710 #endif // V8_TARGET_ARCH_ARM 3712 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/ic-arm.cc » ('j') | src/stub-cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698