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

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

Issue 10382055: Array index computation dehoisting. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. 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
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/v8-counters.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 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 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after
1983 (instr->representation().IsInteger32() && 1983 (instr->representation().IsInteger32() &&
1984 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && 1984 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
1985 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || 1985 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
1986 (instr->representation().IsDouble() && 1986 (instr->representation().IsDouble() &&
1987 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || 1987 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
1988 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); 1988 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
1989 ASSERT(instr->key()->representation().IsInteger32()); 1989 ASSERT(instr->key()->representation().IsInteger32());
1990 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1990 LOperand* external_pointer = UseRegister(instr->external_pointer());
1991 LOperand* key = UseRegisterOrConstant(instr->key()); 1991 LOperand* key = UseRegisterOrConstant(instr->key());
1992 LLoadKeyedSpecializedArrayElement* result = 1992 LLoadKeyedSpecializedArrayElement* result =
1993 new(zone()) LLoadKeyedSpecializedArrayElement(external_pointer, 1993 new(zone()) LLoadKeyedSpecializedArrayElement(external_pointer, key);
1994 key);
1995 LInstruction* load_instr = DefineAsRegister(result); 1994 LInstruction* load_instr = DefineAsRegister(result);
1996 // An unsigned int array load might overflow and cause a deopt, make sure it 1995 // An unsigned int array load might overflow and cause a deopt, make sure it
1997 // has an environment. 1996 // has an environment.
1998 return (elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS) 1997 return (elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS)
1999 ? AssignEnvironment(load_instr) 1998 ? AssignEnvironment(load_instr)
2000 : load_instr; 1999 : load_instr;
2001 } 2000 }
2002 2001
2003 2002
2004 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { 2003 LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2430 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2432 LOperand* object = UseRegister(instr->object()); 2431 LOperand* object = UseRegister(instr->object());
2433 LOperand* index = UseTempRegister(instr->index()); 2432 LOperand* index = UseTempRegister(instr->index());
2434 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2433 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2435 } 2434 }
2436 2435
2437 2436
2438 } } // namespace v8::internal 2437 } } // namespace v8::internal
2439 2438
2440 #endif // V8_TARGET_ARCH_IA32 2439 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698