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

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

Issue 10209027: Implement tracking and optimizations of packed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New upload Created 8 years, 7 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after
2106 ASSERT(instr->value()->representation().IsTagged()); 2106 ASSERT(instr->value()->representation().IsTagged());
2107 2107
2108 LStoreKeyedGeneric* result = 2108 LStoreKeyedGeneric* result =
2109 new(zone()) LStoreKeyedGeneric(context, object, key, value); 2109 new(zone()) LStoreKeyedGeneric(context, object, key, value);
2110 return MarkAsCall(result, instr); 2110 return MarkAsCall(result, instr);
2111 } 2111 }
2112 2112
2113 2113
2114 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2114 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2115 HTransitionElementsKind* instr) { 2115 HTransitionElementsKind* instr) {
2116 if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS && 2116 ElementsKind from_kind = instr->original_map()->elements_kind();
2117 instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) { 2117 ElementsKind to_kind = instr->transitioned_map()->elements_kind();
2118 bool simple_map_change = (GetHoleyElementsKind(from_kind) == to_kind) ||
2119 (IsFastSmiElementsKind(from_kind) &&
2120 IsFastObjectElementsKind(to_kind));
2121 if (simple_map_change) {
2118 LOperand* object = UseRegister(instr->object()); 2122 LOperand* object = UseRegister(instr->object());
2119 LOperand* new_map_reg = TempRegister(); 2123 LOperand* new_map_reg = TempRegister();
2120 LOperand* temp_reg = TempRegister(); 2124 LOperand* temp_reg = TempRegister();
2121 LTransitionElementsKind* result = 2125 LTransitionElementsKind* result =
2122 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); 2126 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg);
2123 return DefineSameAsFirst(result); 2127 return DefineSameAsFirst(result);
2124 } else { 2128 } else {
2125 LOperand* object = UseFixed(instr->object(), eax); 2129 LOperand* object = UseFixed(instr->object(), eax);
2126 LOperand* fixed_object_reg = FixedTemp(edx); 2130 LOperand* fixed_object_reg = FixedTemp(edx);
2127 LOperand* new_map_reg = FixedTemp(ebx); 2131 LOperand* new_map_reg = FixedTemp(ebx);
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2452 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2449 LOperand* object = UseRegister(instr->object()); 2453 LOperand* object = UseRegister(instr->object());
2450 LOperand* index = UseTempRegister(instr->index()); 2454 LOperand* index = UseTempRegister(instr->index());
2451 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2455 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2452 } 2456 }
2453 2457
2454 2458
2455 } } // namespace v8::internal 2459 } } // namespace v8::internal
2456 2460
2457 #endif // V8_TARGET_ARCH_IA32 2461 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698