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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 6594037: Strict Mode assignment to read only property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR 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/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/virtual-frame-ia32.h » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 2534 matching lines...) Expand 10 before | Expand all | Expand 10 after
2545 } 2545 }
2546 2546
2547 // Stub never generated for non-global objects that require access 2547 // Stub never generated for non-global objects that require access
2548 // checks. 2548 // checks.
2549 ASSERT(receiver->IsJSGlobalProxy() || !receiver->IsAccessCheckNeeded()); 2549 ASSERT(receiver->IsJSGlobalProxy() || !receiver->IsAccessCheckNeeded());
2550 2550
2551 __ pop(ebx); // remove the return address 2551 __ pop(ebx); // remove the return address
2552 __ push(edx); // receiver 2552 __ push(edx); // receiver
2553 __ push(ecx); // name 2553 __ push(ecx); // name
2554 __ push(eax); // value 2554 __ push(eax); // value
2555 __ push(Immediate(Smi::FromInt(strict_mode_)));
2555 __ push(ebx); // restore return address 2556 __ push(ebx); // restore return address
2556 2557
2557 // Do tail-call to the runtime system. 2558 // Do tail-call to the runtime system.
2558 ExternalReference store_ic_property = 2559 ExternalReference store_ic_property =
2559 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty)); 2560 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty));
2560 __ TailCallExternalReference(store_ic_property, 3, 1); 2561 __ TailCallExternalReference(store_ic_property, 4, 1);
2561 2562
2562 // Handle store cache miss. 2563 // Handle store cache miss.
2563 __ bind(&miss); 2564 __ bind(&miss);
2564 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); 2565 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss));
2565 __ jmp(ic, RelocInfo::CODE_TARGET); 2566 __ jmp(ic, RelocInfo::CODE_TARGET);
2566 2567
2567 // Return the generated code. 2568 // Return the generated code.
2568 return GetCode(INTERCEPTOR, name); 2569 return GetCode(INTERCEPTOR, name);
2569 } 2570 }
2570 2571
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
3705 // -- eax : value 3706 // -- eax : value
3706 // -- ecx : key 3707 // -- ecx : key
3707 // -- edx : receiver 3708 // -- edx : receiver
3708 // -- esp[0] : return address 3709 // -- esp[0] : return address
3709 // ----------------------------------- 3710 // -----------------------------------
3710 3711
3711 __ pop(ebx); 3712 __ pop(ebx);
3712 __ push(edx); 3713 __ push(edx);
3713 __ push(ecx); 3714 __ push(ecx);
3714 __ push(eax); 3715 __ push(eax);
3715 __ push(ebx); 3716 __ push(Immediate(Smi::FromInt(NONE))); // PropertyAttributes
3717 __ push(Immediate(Smi::FromInt(
3718 Code::ExtractExtraICStateFromFlags(flags) & kStrictMode)));
3719 __ push(ebx); // return address
3716 3720
3717 // Do tail-call to runtime routine. 3721 // Do tail-call to runtime routine.
3718 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); 3722 __ TailCallRuntime(Runtime::kSetProperty, 5, 1);
3719 3723
3720 return GetCode(flags); 3724 return GetCode(flags);
3721 } 3725 }
3722 3726
3723 3727
3724 #undef __ 3728 #undef __
3725 3729
3726 } } // namespace v8::internal 3730 } } // namespace v8::internal
3727 3731
3728 #endif // V8_TARGET_ARCH_IA32 3732 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ia32/virtual-frame-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698