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

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

Issue 7778013: NewGC: Merge bleeding edge up to 9009. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 3 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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 1032
1033 1033
1034 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 1034 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
1035 HValue* v = instr->value(); 1035 HValue* v = instr->value();
1036 if (v->EmitAtUses()) { 1036 if (v->EmitAtUses()) {
1037 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() 1037 HBasicBlock* successor = HConstant::cast(v)->ToBoolean()
1038 ? instr->FirstSuccessor() 1038 ? instr->FirstSuccessor()
1039 : instr->SecondSuccessor(); 1039 : instr->SecondSuccessor();
1040 return new LGoto(successor->block_id()); 1040 return new LGoto(successor->block_id());
1041 } 1041 }
1042 LInstruction* branch = new LBranch(UseRegister(v)); 1042 return AssignEnvironment(new LBranch(UseRegister(v)));
1043 // When we handle all cases, we never deopt, so we don't need to assign the
1044 // environment then. Note that we map the "empty" case to the "all" case in
1045 // the code generator.
1046 ToBooleanStub::Types types = instr->expected_input_types();
1047 bool all_cases_handled = types.IsAll() || types.IsEmpty();
1048 return all_cases_handled ? branch : AssignEnvironment(branch);
1049 } 1043 }
1050 1044
1051 1045
1052 1046
1053 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { 1047 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
1054 ASSERT(instr->value()->representation().IsTagged()); 1048 ASSERT(instr->value()->representation().IsTagged());
1055 LOperand* value = UseRegisterAtStart(instr->value()); 1049 LOperand* value = UseRegisterAtStart(instr->value());
1056 LOperand* temp = TempRegister(); 1050 LOperand* temp = TempRegister();
1057 return new LCmpMapAndBranch(value, temp); 1051 return new LCmpMapAndBranch(value, temp);
1058 } 1052 }
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 UseFixed(instr->right(), r0); 1392 UseFixed(instr->right(), r0);
1399 LPower* result = new LPower(left, right); 1393 LPower* result = new LPower(left, right);
1400 return MarkAsCall(DefineFixedDouble(result, d3), 1394 return MarkAsCall(DefineFixedDouble(result, d3),
1401 instr, 1395 instr,
1402 CAN_DEOPTIMIZE_EAGERLY); 1396 CAN_DEOPTIMIZE_EAGERLY);
1403 } 1397 }
1404 1398
1405 1399
1406 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1400 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1407 Token::Value op = instr->token(); 1401 Token::Value op = instr->token();
1408 Representation r = instr->GetInputRepresentation();
1409 ASSERT(instr->left()->representation().IsTagged()); 1402 ASSERT(instr->left()->representation().IsTagged());
1410 ASSERT(instr->right()->representation().IsTagged()); 1403 ASSERT(instr->right()->representation().IsTagged());
1411 bool reversed = (op == Token::GT || op == Token::LTE); 1404 bool reversed = (op == Token::GT || op == Token::LTE);
1412 LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1); 1405 LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1);
1413 LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0); 1406 LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
1414 LCmpT* result = new LCmpT(left, right); 1407 LCmpT* result = new LCmpT(left, right);
1415 return MarkAsCall(DefineFixed(result, r0), instr); 1408 return MarkAsCall(DefineFixed(result, r0), instr);
1416 } 1409 }
1417 1410
1418 1411
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 TempRegister()); 1501 TempRegister());
1509 } 1502 }
1510 1503
1511 1504
1512 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { 1505 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
1513 LOperand* array = UseRegisterAtStart(instr->value()); 1506 LOperand* array = UseRegisterAtStart(instr->value());
1514 return DefineAsRegister(new LJSArrayLength(array)); 1507 return DefineAsRegister(new LJSArrayLength(array));
1515 } 1508 }
1516 1509
1517 1510
1518 LInstruction* LChunkBuilder::DoExternalArrayLength( 1511 LInstruction* LChunkBuilder::DoFixedArrayBaseLength(
1519 HExternalArrayLength* instr) { 1512 HFixedArrayBaseLength* instr) {
1520 LOperand* array = UseRegisterAtStart(instr->value()); 1513 LOperand* array = UseRegisterAtStart(instr->value());
1521 return DefineAsRegister(new LExternalArrayLength(array)); 1514 return DefineAsRegister(new LFixedArrayBaseLength(array));
1522 }
1523
1524
1525 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1526 LOperand* array = UseRegisterAtStart(instr->value());
1527 return DefineAsRegister(new LFixedArrayLength(array));
1528 } 1515 }
1529 1516
1530 1517
1531 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) { 1518 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) {
1532 LOperand* object = UseRegisterAtStart(instr->value()); 1519 LOperand* object = UseRegisterAtStart(instr->value());
1533 return DefineAsRegister(new LElementsKind(object)); 1520 return DefineAsRegister(new LElementsKind(object));
1534 } 1521 }
1535 1522
1536 1523
1537 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1524 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 2181
2195 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2182 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2196 LOperand* key = UseRegisterAtStart(instr->key()); 2183 LOperand* key = UseRegisterAtStart(instr->key());
2197 LOperand* object = UseRegisterAtStart(instr->object()); 2184 LOperand* object = UseRegisterAtStart(instr->object());
2198 LIn* result = new LIn(key, object); 2185 LIn* result = new LIn(key, object);
2199 return MarkAsCall(DefineFixed(result, r0), instr); 2186 return MarkAsCall(DefineFixed(result, r0), instr);
2200 } 2187 }
2201 2188
2202 2189
2203 } } // namespace v8::internal 2190 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698