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

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

Issue 6805005: Fix opmitized external array access for compound assignments (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove unchanged file 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 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 break; 2304 break;
2305 case kExternalUnsignedIntArray: 2305 case kExternalUnsignedIntArray:
2306 __ mov(result, Operand(external_pointer, key, times_4, 0)); 2306 __ mov(result, Operand(external_pointer, key, times_4, 0));
2307 __ test(result, Operand(result)); 2307 __ test(result, Operand(result));
2308 // TODO(danno): we could be more clever here, perhaps having a special 2308 // TODO(danno): we could be more clever here, perhaps having a special
2309 // version of the stub that detects if the overflow case actually 2309 // version of the stub that detects if the overflow case actually
2310 // happens, and generate code that returns a double rather than int. 2310 // happens, and generate code that returns a double rather than int.
2311 DeoptimizeIf(negative, instr->environment()); 2311 DeoptimizeIf(negative, instr->environment());
2312 break; 2312 break;
2313 case kExternalFloatArray: 2313 case kExternalFloatArray:
2314 default:
Mads Ager (chromium) 2011/04/06 16:45:15 Why do you want a default case here? Isn't it bett
2314 UNREACHABLE(); 2315 UNREACHABLE();
2315 break; 2316 break;
2316 } 2317 }
2317 } 2318 }
2318 } 2319 }
2319 2320
2320 2321
2321 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 2322 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
2322 ASSERT(ToRegister(instr->context()).is(esi)); 2323 ASSERT(ToRegister(instr->context()).is(esi));
2323 ASSERT(ToRegister(instr->object()).is(edx)); 2324 ASSERT(ToRegister(instr->object()).is(edx));
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2973 break; 2974 break;
2974 case kExternalShortArray: 2975 case kExternalShortArray:
2975 case kExternalUnsignedShortArray: 2976 case kExternalUnsignedShortArray:
2976 __ mov_w(Operand(external_pointer, key, times_2, 0), value); 2977 __ mov_w(Operand(external_pointer, key, times_2, 0), value);
2977 break; 2978 break;
2978 case kExternalIntArray: 2979 case kExternalIntArray:
2979 case kExternalUnsignedIntArray: 2980 case kExternalUnsignedIntArray:
2980 __ mov(Operand(external_pointer, key, times_4, 0), value); 2981 __ mov(Operand(external_pointer, key, times_4, 0), value);
2981 break; 2982 break;
2982 case kExternalFloatArray: 2983 case kExternalFloatArray:
2984 default:
Mads Ager (chromium) 2011/04/06 16:45:15 Ditto.
2983 UNREACHABLE(); 2985 UNREACHABLE();
2984 break; 2986 break;
2985 } 2987 }
2986 } 2988 }
2987 } 2989 }
2988 2990
2989 2991
2990 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) { 2992 void LCodeGen::DoStoreKeyedFastElement(LStoreKeyedFastElement* instr) {
2991 Register value = ToRegister(instr->value()); 2993 Register value = ToRegister(instr->value());
2992 Register elements = ToRegister(instr->object()); 2994 Register elements = ToRegister(instr->object());
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
4103 ASSERT(osr_pc_offset_ == -1); 4105 ASSERT(osr_pc_offset_ == -1);
4104 osr_pc_offset_ = masm()->pc_offset(); 4106 osr_pc_offset_ = masm()->pc_offset();
4105 } 4107 }
4106 4108
4107 4109
4108 #undef __ 4110 #undef __
4109 4111
4110 } } // namespace v8::internal 4112 } } // namespace v8::internal
4111 4113
4112 #endif // V8_TARGET_ARCH_IA32 4114 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698