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

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

Issue 6814012: Strict mode fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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 2057 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 } 2068 }
2069 __ movq(Operand(temp, 0), value); 2069 __ movq(Operand(temp, 0), value);
2070 } 2070 }
2071 2071
2072 2072
2073 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { 2073 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
2074 ASSERT(ToRegister(instr->global_object()).is(rdx)); 2074 ASSERT(ToRegister(instr->global_object()).is(rdx));
2075 ASSERT(ToRegister(instr->value()).is(rax)); 2075 ASSERT(ToRegister(instr->value()).is(rax));
2076 2076
2077 __ Move(rcx, instr->name()); 2077 __ Move(rcx, instr->name());
2078 Handle<Code> ic = isolate()->builtins()->StoreIC_Initialize(); 2078 Handle<Code> ic = instr->strict_mode()
2079 ? isolate()->builtins()->StoreIC_Initialize_Strict()
2080 : isolate()->builtins()->StoreIC_Initialize();
2079 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); 2081 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr);
2080 } 2082 }
2081 2083
2082 2084
2083 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2085 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2084 Register context = ToRegister(instr->context()); 2086 Register context = ToRegister(instr->context());
2085 Register result = ToRegister(instr->result()); 2087 Register result = ToRegister(instr->result());
2086 __ movq(result, ContextOperand(context, instr->slot_index())); 2088 __ movq(result, ContextOperand(context, instr->slot_index()));
2087 } 2089 }
2088 2090
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
2935 } 2937 }
2936 } 2938 }
2937 } 2939 }
2938 2940
2939 2941
2940 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 2942 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
2941 ASSERT(ToRegister(instr->object()).is(rdx)); 2943 ASSERT(ToRegister(instr->object()).is(rdx));
2942 ASSERT(ToRegister(instr->value()).is(rax)); 2944 ASSERT(ToRegister(instr->value()).is(rax));
2943 2945
2944 __ Move(rcx, instr->hydrogen()->name()); 2946 __ Move(rcx, instr->hydrogen()->name());
2945 Handle<Code> ic = info_->is_strict_mode() 2947 Handle<Code> ic = instr->strict_mode()
2946 ? isolate()->builtins()->StoreIC_Initialize_Strict() 2948 ? isolate()->builtins()->StoreIC_Initialize_Strict()
2947 : isolate()->builtins()->StoreIC_Initialize(); 2949 : isolate()->builtins()->StoreIC_Initialize();
2948 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2950 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2949 } 2951 }
2950 2952
2951 2953
2952 void LCodeGen::DoStoreKeyedSpecializedArrayElement( 2954 void LCodeGen::DoStoreKeyedSpecializedArrayElement(
2953 LStoreKeyedSpecializedArrayElement* instr) { 2955 LStoreKeyedSpecializedArrayElement* instr) {
2954 Register external_pointer = ToRegister(instr->external_pointer()); 2956 Register external_pointer = ToRegister(instr->external_pointer());
2955 Register key = ToRegister(instr->key()); 2957 Register key = ToRegister(instr->key());
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 __ RecordWrite(elements, key, value); 3033 __ RecordWrite(elements, key, value);
3032 } 3034 }
3033 } 3035 }
3034 3036
3035 3037
3036 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 3038 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
3037 ASSERT(ToRegister(instr->object()).is(rdx)); 3039 ASSERT(ToRegister(instr->object()).is(rdx));
3038 ASSERT(ToRegister(instr->key()).is(rcx)); 3040 ASSERT(ToRegister(instr->key()).is(rcx));
3039 ASSERT(ToRegister(instr->value()).is(rax)); 3041 ASSERT(ToRegister(instr->value()).is(rax));
3040 3042
3041 Handle<Code> ic = info_->is_strict_mode() 3043 Handle<Code> ic = instr->strict_mode()
3042 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() 3044 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
3043 : isolate()->builtins()->KeyedStoreIC_Initialize(); 3045 : isolate()->builtins()->KeyedStoreIC_Initialize();
3044 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3046 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3045 } 3047 }
3046 3048
3047 3049
3048 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 3050 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
3049 class DeferredStringCharCodeAt: public LDeferredCode { 3051 class DeferredStringCharCodeAt: public LDeferredCode {
3050 public: 3052 public:
3051 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 3053 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
3961 RegisterEnvironmentForDeoptimization(environment); 3963 RegisterEnvironmentForDeoptimization(environment);
3962 ASSERT(osr_pc_offset_ == -1); 3964 ASSERT(osr_pc_offset_ == -1);
3963 osr_pc_offset_ = masm()->pc_offset(); 3965 osr_pc_offset_ = masm()->pc_offset();
3964 } 3966 }
3965 3967
3966 #undef __ 3968 #undef __
3967 3969
3968 } } // namespace v8::internal 3970 } } // namespace v8::internal
3969 3971
3970 #endif // V8_TARGET_ARCH_X64 3972 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698