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

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

Issue 10170030: Implement tracking and optimizations of packed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Platforms ports and review feedback 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 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 ASSERT(instr->value()->representation().IsTagged()); 2005 ASSERT(instr->value()->representation().IsTagged());
2006 2006
2007 LStoreKeyedGeneric* result = 2007 LStoreKeyedGeneric* result =
2008 new(zone()) LStoreKeyedGeneric(object, key, value); 2008 new(zone()) LStoreKeyedGeneric(object, key, value);
2009 return MarkAsCall(result, instr); 2009 return MarkAsCall(result, instr);
2010 } 2010 }
2011 2011
2012 2012
2013 LInstruction* LChunkBuilder::DoTransitionElementsKind( 2013 LInstruction* LChunkBuilder::DoTransitionElementsKind(
2014 HTransitionElementsKind* instr) { 2014 HTransitionElementsKind* instr) {
2015 if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS && 2015 ElementsKind from_kind = instr->original_map()->elements_kind();
2016 instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) { 2016 ElementsKind to_kind = instr->transitioned_map()->elements_kind();
2017 bool simple_map_change = (GetHoleyElementsKind(from_kind) == to_kind) ||
Jakob Kummerow 2012/05/22 17:36:49 This computation is used often enough that it woul
danno 2012/05/23 14:25:36 Done.
2018 (IsFastSmiElementsKind(from_kind) &&
2019 IsFastObjectElementsKind(to_kind));
2020 if (simple_map_change) {
2017 LOperand* object = UseRegister(instr->object()); 2021 LOperand* object = UseRegister(instr->object());
2018 LOperand* new_map_reg = TempRegister(); 2022 LOperand* new_map_reg = TempRegister();
2019 LOperand* temp_reg = TempRegister(); 2023 LOperand* temp_reg = TempRegister();
2020 LTransitionElementsKind* result = 2024 LTransitionElementsKind* result =
2021 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg); 2025 new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg);
2022 return DefineSameAsFirst(result); 2026 return DefineSameAsFirst(result);
2023 } else { 2027 } else {
2024 LOperand* object = UseFixed(instr->object(), rax); 2028 LOperand* object = UseFixed(instr->object(), rax);
2025 LOperand* fixed_object_reg = FixedTemp(rdx); 2029 LOperand* fixed_object_reg = FixedTemp(rdx);
2026 LOperand* new_map_reg = FixedTemp(rbx); 2030 LOperand* new_map_reg = FixedTemp(rbx);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2315 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2319 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2316 LOperand* object = UseRegister(instr->object()); 2320 LOperand* object = UseRegister(instr->object());
2317 LOperand* index = UseTempRegister(instr->index()); 2321 LOperand* index = UseTempRegister(instr->index());
2318 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2322 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2319 } 2323 }
2320 2324
2321 2325
2322 } } // namespace v8::internal 2326 } } // namespace v8::internal
2323 2327
2324 #endif // V8_TARGET_ARCH_X64 2328 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698