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

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

Issue 8404030: Version 3.7.1 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 1 month 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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.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 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 384
385 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { 385 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
386 object()->PrintTo(stream); 386 object()->PrintTo(stream);
387 stream->Add("["); 387 stream->Add("[");
388 key()->PrintTo(stream); 388 key()->PrintTo(stream);
389 stream->Add("] <- "); 389 stream->Add("] <- ");
390 value()->PrintTo(stream); 390 value()->PrintTo(stream);
391 } 391 }
392 392
393 393
394 void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
395 object()->PrintTo(stream);
396 stream->Add(" %p -> %p", *original_map(), *transitioned_map());
397 }
398
399
394 LChunk::LChunk(CompilationInfo* info, HGraph* graph) 400 LChunk::LChunk(CompilationInfo* info, HGraph* graph)
395 : spill_slot_count_(0), 401 : spill_slot_count_(0),
396 info_(info), 402 info_(info),
397 graph_(graph), 403 graph_(graph),
398 instructions_(32), 404 instructions_(32),
399 pointer_maps_(8), 405 pointer_maps_(8),
400 inlined_closures_(1) { 406 inlined_closures_(1) {
401 } 407 }
402 408
403 409
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 UseFixedDouble(instr->right(), d2) : 1403 UseFixedDouble(instr->right(), d2) :
1398 UseFixed(instr->right(), r0); 1404 UseFixed(instr->right(), r0);
1399 LPower* result = new LPower(left, right); 1405 LPower* result = new LPower(left, right);
1400 return MarkAsCall(DefineFixedDouble(result, d3), 1406 return MarkAsCall(DefineFixedDouble(result, d3),
1401 instr, 1407 instr,
1402 CAN_DEOPTIMIZE_EAGERLY); 1408 CAN_DEOPTIMIZE_EAGERLY);
1403 } 1409 }
1404 1410
1405 1411
1406 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1412 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1407 Token::Value op = instr->token();
1408 ASSERT(instr->left()->representation().IsTagged()); 1413 ASSERT(instr->left()->representation().IsTagged());
1409 ASSERT(instr->right()->representation().IsTagged()); 1414 ASSERT(instr->right()->representation().IsTagged());
1410 bool reversed = (op == Token::GT || op == Token::LTE); 1415 LOperand* left = UseFixed(instr->left(), r1);
1411 LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1); 1416 LOperand* right = UseFixed(instr->right(), r0);
1412 LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
1413 LCmpT* result = new LCmpT(left, right); 1417 LCmpT* result = new LCmpT(left, right);
1414 return MarkAsCall(DefineFixed(result, r0), instr); 1418 return MarkAsCall(DefineFixed(result, r0), instr);
1415 } 1419 }
1416 1420
1417 1421
1418 LInstruction* LChunkBuilder::DoCompareIDAndBranch( 1422 LInstruction* LChunkBuilder::DoCompareIDAndBranch(
1419 HCompareIDAndBranch* instr) { 1423 HCompareIDAndBranch* instr) {
1420 Representation r = instr->GetInputRepresentation(); 1424 Representation r = instr->GetInputRepresentation();
1421 if (r.IsInteger32()) { 1425 if (r.IsInteger32()) {
1422 ASSERT(instr->left()->representation().IsInteger32()); 1426 ASSERT(instr->left()->representation().IsInteger32());
1423 ASSERT(instr->right()->representation().IsInteger32()); 1427 ASSERT(instr->right()->representation().IsInteger32());
1424 LOperand* left = UseRegisterAtStart(instr->left()); 1428 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1425 LOperand* right = UseRegisterAtStart(instr->right()); 1429 LOperand* right = UseRegisterOrConstantAtStart(instr->right());
1426 return new LCmpIDAndBranch(left, right); 1430 return new LCmpIDAndBranch(left, right);
1427 } else { 1431 } else {
1428 ASSERT(r.IsDouble()); 1432 ASSERT(r.IsDouble());
1429 ASSERT(instr->left()->representation().IsDouble()); 1433 ASSERT(instr->left()->representation().IsDouble());
1430 ASSERT(instr->right()->representation().IsDouble()); 1434 ASSERT(instr->right()->representation().IsDouble());
1431 LOperand* left = UseRegisterAtStart(instr->left()); 1435 LOperand* left = UseRegisterAtStart(instr->left());
1432 LOperand* right = UseRegisterAtStart(instr->right()); 1436 LOperand* right = UseRegisterAtStart(instr->right());
1433 return new LCmpIDAndBranch(left, right); 1437 return new LCmpIDAndBranch(left, right);
1434 } 1438 }
1435 } 1439 }
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 LOperand* val = UseFixed(instr->value(), r0); 1967 LOperand* val = UseFixed(instr->value(), r0);
1964 1968
1965 ASSERT(instr->object()->representation().IsTagged()); 1969 ASSERT(instr->object()->representation().IsTagged());
1966 ASSERT(instr->key()->representation().IsTagged()); 1970 ASSERT(instr->key()->representation().IsTagged());
1967 ASSERT(instr->value()->representation().IsTagged()); 1971 ASSERT(instr->value()->representation().IsTagged());
1968 1972
1969 return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr); 1973 return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr);
1970 } 1974 }
1971 1975
1972 1976
1977 LInstruction* LChunkBuilder::DoTransitionElementsKind(
1978 HTransitionElementsKind* instr) {
1979 if (instr->original_map()->elements_kind() == FAST_SMI_ONLY_ELEMENTS &&
1980 instr->transitioned_map()->elements_kind() == FAST_ELEMENTS) {
1981 LOperand* object = UseRegister(instr->object());
1982 LOperand* new_map_reg = TempRegister();
1983 LTransitionElementsKind* result =
1984 new LTransitionElementsKind(object, new_map_reg, NULL);
1985 return DefineSameAsFirst(result);
1986 } else {
1987 LOperand* object = UseFixed(instr->object(), r0);
1988 LOperand* fixed_object_reg = FixedTemp(r2);
1989 LOperand* new_map_reg = FixedTemp(r3);
1990 LTransitionElementsKind* result =
1991 new LTransitionElementsKind(object, new_map_reg, fixed_object_reg);
1992 return MarkAsCall(DefineFixed(result, r0), instr);
1993 }
1994 }
1995
1996
1973 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) { 1997 LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
1974 bool needs_write_barrier = instr->NeedsWriteBarrier(); 1998 bool needs_write_barrier = instr->NeedsWriteBarrier();
1975 1999
1976 LOperand* obj = needs_write_barrier 2000 LOperand* obj = needs_write_barrier
1977 ? UseTempRegister(instr->object()) 2001 ? UseTempRegister(instr->object())
1978 : UseRegisterAtStart(instr->object()); 2002 : UseRegisterAtStart(instr->object());
1979 2003
1980 LOperand* val = needs_write_barrier 2004 LOperand* val = needs_write_barrier
1981 ? UseTempRegister(instr->value()) 2005 ? UseTempRegister(instr->value())
1982 : UseRegister(instr->value()); 2006 : UseRegister(instr->value());
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 2208
2185 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2209 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2186 LOperand* key = UseRegisterAtStart(instr->key()); 2210 LOperand* key = UseRegisterAtStart(instr->key());
2187 LOperand* object = UseRegisterAtStart(instr->object()); 2211 LOperand* object = UseRegisterAtStart(instr->object());
2188 LIn* result = new LIn(key, object); 2212 LIn* result = new LIn(key, object);
2189 return MarkAsCall(DefineFixed(result, r0), instr); 2213 return MarkAsCall(DefineFixed(result, r0), instr);
2190 } 2214 }
2191 2215
2192 2216
2193 } } // namespace v8::internal 2217 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698