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

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

Issue 10382055: Array index computation dehoisting. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplified expression. 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 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 return DefineAsRegister(new(zone()) LLoadExternalArrayPointer(input)); 1949 return DefineAsRegister(new(zone()) LLoadExternalArrayPointer(input));
1950 } 1950 }
1951 1951
1952 1952
1953 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( 1953 LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
1954 HLoadKeyedFastElement* instr) { 1954 HLoadKeyedFastElement* instr) {
1955 ASSERT(instr->representation().IsTagged()); 1955 ASSERT(instr->representation().IsTagged());
1956 ASSERT(instr->key()->representation().IsInteger32()); 1956 ASSERT(instr->key()->representation().IsInteger32());
1957 LOperand* obj = UseRegisterAtStart(instr->object()); 1957 LOperand* obj = UseRegisterAtStart(instr->object());
1958 LOperand* key = UseRegisterAtStart(instr->key()); 1958 LOperand* key = UseRegisterAtStart(instr->key());
1959 LLoadKeyedFastElement* result = new(zone()) LLoadKeyedFastElement(obj, key); 1959 LLoadKeyedFastElement* result =
Jakob Kummerow 2012/05/15 15:53:23 nit: why this change?
1960 new(zone()) LLoadKeyedFastElement(obj, key);
1960 if (instr->RequiresHoleCheck()) AssignEnvironment(result); 1961 if (instr->RequiresHoleCheck()) AssignEnvironment(result);
1961 return DefineAsRegister(result); 1962 return DefineAsRegister(result);
1962 } 1963 }
1963 1964
1964 1965
1965 LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement( 1966 LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement(
1966 HLoadKeyedFastDoubleElement* instr) { 1967 HLoadKeyedFastDoubleElement* instr) {
1967 ASSERT(instr->representation().IsDouble()); 1968 ASSERT(instr->representation().IsDouble());
1968 ASSERT(instr->key()->representation().IsInteger32()); 1969 ASSERT(instr->key()->representation().IsInteger32());
1969 LOperand* elements = UseTempRegister(instr->elements()); 1970 LOperand* elements = UseTempRegister(instr->elements());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2028 LInstruction* LChunkBuilder::DoStoreKeyedFastDoubleElement( 2029 LInstruction* LChunkBuilder::DoStoreKeyedFastDoubleElement(
2029 HStoreKeyedFastDoubleElement* instr) { 2030 HStoreKeyedFastDoubleElement* instr) {
2030 ASSERT(instr->value()->representation().IsDouble()); 2031 ASSERT(instr->value()->representation().IsDouble());
2031 ASSERT(instr->elements()->representation().IsTagged()); 2032 ASSERT(instr->elements()->representation().IsTagged());
2032 ASSERT(instr->key()->representation().IsInteger32()); 2033 ASSERT(instr->key()->representation().IsInteger32());
2033 2034
2034 LOperand* elements = UseRegisterAtStart(instr->elements()); 2035 LOperand* elements = UseRegisterAtStart(instr->elements());
2035 LOperand* val = UseTempRegister(instr->value()); 2036 LOperand* val = UseTempRegister(instr->value());
2036 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 2037 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
2037 2038
2038 return new(zone()) LStoreKeyedFastDoubleElement(elements, key, val); 2039 return new(zone()) LStoreKeyedFastDoubleElement(elements,
Jakob Kummerow 2012/05/15 15:53:23 nit: why this change?
2040 key,
2041 val);
2039 } 2042 }
2040 2043
2041 2044
2042 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( 2045 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
2043 HStoreKeyedSpecializedArrayElement* instr) { 2046 HStoreKeyedSpecializedArrayElement* instr) {
2044 ElementsKind elements_kind = instr->elements_kind(); 2047 ElementsKind elements_kind = instr->elements_kind();
2045 ASSERT( 2048 ASSERT(
2046 (instr->value()->representation().IsInteger32() && 2049 (instr->value()->representation().IsInteger32() &&
2047 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && 2050 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
2048 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || 2051 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 2380
2378 2381
2379 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2382 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2380 LOperand* object = UseRegister(instr->object()); 2383 LOperand* object = UseRegister(instr->object());
2381 LOperand* index = UseRegister(instr->index()); 2384 LOperand* index = UseRegister(instr->index());
2382 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2385 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2383 } 2386 }
2384 2387
2385 2388
2386 } } // namespace v8::internal 2389 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698