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

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

Issue 7237024: Refactor handling of test expressions in the graph builder. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 5 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 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { 258 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
259 stream->Add("if class_of_test("); 259 stream->Add("if class_of_test(");
260 InputAt(0)->PrintTo(stream); 260 InputAt(0)->PrintTo(stream);
261 stream->Add(", \"%o\") then B%d else B%d", 261 stream->Add(", \"%o\") then B%d else B%d",
262 *hydrogen()->class_name(), 262 *hydrogen()->class_name(),
263 true_block_id(), 263 true_block_id(),
264 false_block_id()); 264 false_block_id());
265 } 265 }
266 266
267 267
268 void LTypeofIs::PrintDataTo(StringStream* stream) {
269 InputAt(0)->PrintTo(stream);
270 stream->Add(" == \"%s\"", *hydrogen()->type_literal()->ToCString());
271 }
272
273
274 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { 268 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
275 stream->Add("if typeof "); 269 stream->Add("if typeof ");
276 InputAt(0)->PrintTo(stream); 270 InputAt(0)->PrintTo(stream);
277 stream->Add(" == \"%s\" then B%d else B%d", 271 stream->Add(" == \"%s\" then B%d else B%d",
278 *hydrogen()->type_literal()->ToCString(), 272 *hydrogen()->type_literal()->ToCString(),
279 true_block_id(), false_block_id()); 273 true_block_id(), false_block_id());
280 } 274 }
281 275
282 276
283 void LCallConstantFunction::PrintDataTo(StringStream* stream) { 277 void LCallConstantFunction::PrintDataTo(StringStream* stream) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 } 327 }
334 328
335 329
336 void LCallNew::PrintDataTo(StringStream* stream) { 330 void LCallNew::PrintDataTo(StringStream* stream) {
337 stream->Add("= "); 331 stream->Add("= ");
338 InputAt(0)->PrintTo(stream); 332 InputAt(0)->PrintTo(stream);
339 stream->Add(" #%d / ", arity()); 333 stream->Add(" #%d / ", arity());
340 } 334 }
341 335
342 336
343 void LClassOfTest::PrintDataTo(StringStream* stream) {
344 stream->Add("= class_of_test(");
345 InputAt(0)->PrintTo(stream);
346 stream->Add(", \"%o\")", *hydrogen()->class_name());
347 }
348
349
350 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { 337 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
351 arguments()->PrintTo(stream); 338 arguments()->PrintTo(stream);
352 339
353 stream->Add(" length "); 340 stream->Add(" length ");
354 length()->PrintTo(stream); 341 length()->PrintTo(stream);
355 342
356 stream->Add(" index "); 343 stream->Add(" index ");
357 index()->PrintTo(stream); 344 index()->PrintTo(stream);
358 } 345 }
359 346
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 if (current->has_position()) position_ = current->position(); 970 if (current->has_position()) position_ = current->position();
984 LInstruction* instr = current->CompileToLithium(this); 971 LInstruction* instr = current->CompileToLithium(this);
985 972
986 if (instr != NULL) { 973 if (instr != NULL) {
987 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 974 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
988 instr = AssignPointerMap(instr); 975 instr = AssignPointerMap(instr);
989 } 976 }
990 if (FLAG_stress_environments && !instr->HasEnvironment()) { 977 if (FLAG_stress_environments && !instr->HasEnvironment()) {
991 instr = AssignEnvironment(instr); 978 instr = AssignEnvironment(instr);
992 } 979 }
993 if (current->IsTest() && !instr->IsGoto()) { 980 instr->set_hydrogen_value(current);
994 ASSERT(instr->IsControl());
995 HTest* test = HTest::cast(current);
996 instr->set_hydrogen_value(test->value());
997 HBasicBlock* first = test->FirstSuccessor();
998 HBasicBlock* second = test->SecondSuccessor();
999 ASSERT(first != NULL && second != NULL);
1000 instr->SetBranchTargets(first->block_id(), second->block_id());
1001 } else {
1002 instr->set_hydrogen_value(current);
1003 }
1004
1005 chunk_->AddInstruction(instr, current_block_); 981 chunk_->AddInstruction(instr, current_block_);
1006 } 982 }
1007 current_instruction_ = old_current; 983 current_instruction_ = old_current;
1008 } 984 }
1009 985
1010 986
1011 LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) { 987 LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
1012 if (hydrogen_env == NULL) return NULL; 988 if (hydrogen_env == NULL) return NULL;
1013 989
1014 LEnvironment* outer = CreateEnvironment(hydrogen_env->outer()); 990 LEnvironment* outer = CreateEnvironment(hydrogen_env->outer());
(...skipping 24 matching lines...) Expand all
1039 1015
1040 return result; 1016 return result;
1041 } 1017 }
1042 1018
1043 1019
1044 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 1020 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
1045 return new LGoto(instr->FirstSuccessor()->block_id()); 1021 return new LGoto(instr->FirstSuccessor()->block_id());
1046 } 1022 }
1047 1023
1048 1024
1049 LInstruction* LChunkBuilder::DoTest(HTest* instr) { 1025 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
1050 HValue* v = instr->value(); 1026 HValue* v = instr->value();
1051 if (!v->EmitAtUses()) return new LBranch(UseRegisterAtStart(v)); 1027 if (v->EmitAtUses()) {
1052 ASSERT(!v->HasSideEffects());
1053 if (v->IsClassOfTest()) {
1054 HClassOfTest* compare = HClassOfTest::cast(v);
1055 ASSERT(compare->value()->representation().IsTagged());
1056 return new LClassOfTestAndBranch(UseTempRegister(compare->value()),
1057 TempRegister());
1058 } else if (v->IsCompare()) {
1059 HCompare* compare = HCompare::cast(v);
1060 HValue* left = compare->left();
1061 HValue* right = compare->right();
1062 Representation r = compare->GetInputRepresentation();
1063 if (r.IsInteger32()) {
1064 ASSERT(left->representation().IsInteger32());
1065 ASSERT(right->representation().IsInteger32());
1066 return new LCmpIDAndBranch(UseRegisterAtStart(left),
1067 UseRegisterAtStart(right));
1068 } else {
1069 ASSERT(r.IsDouble());
1070 ASSERT(left->representation().IsDouble());
1071 ASSERT(right->representation().IsDouble());
1072 return new LCmpIDAndBranch(UseRegisterAtStart(left),
1073 UseRegisterAtStart(right));
1074 }
1075 } else if (v->IsIsSmi()) {
1076 HIsSmi* compare = HIsSmi::cast(v);
1077 ASSERT(compare->value()->representation().IsTagged());
1078 return new LIsSmiAndBranch(Use(compare->value()));
1079 } else if (v->IsIsUndetectable()) {
1080 HIsUndetectable* compare = HIsUndetectable::cast(v);
1081 ASSERT(compare->value()->representation().IsTagged());
1082 return new LIsUndetectableAndBranch(UseRegisterAtStart(compare->value()),
1083 TempRegister());
1084 } else if (v->IsHasInstanceType()) {
1085 HHasInstanceType* compare = HHasInstanceType::cast(v);
1086 ASSERT(compare->value()->representation().IsTagged());
1087 return new LHasInstanceTypeAndBranch(UseRegisterAtStart(compare->value()));
1088 } else if (v->IsHasCachedArrayIndex()) {
1089 HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v);
1090 ASSERT(compare->value()->representation().IsTagged());
1091 return new LHasCachedArrayIndexAndBranch(
1092 UseRegisterAtStart(compare->value()));
1093 } else if (v->IsIsNull()) {
1094 HIsNull* compare = HIsNull::cast(v);
1095 ASSERT(compare->value()->representation().IsTagged());
1096 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()));
1097 } else if (v->IsIsObject()) {
1098 HIsObject* compare = HIsObject::cast(v);
1099 ASSERT(compare->value()->representation().IsTagged());
1100 LOperand* temp = TempRegister();
1101 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp);
1102 } else if (v->IsCompareObjectEq()) {
1103 HCompareObjectEq* compare = HCompareObjectEq::cast(v);
1104 return new LCmpObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1105 UseRegisterAtStart(compare->right()));
1106 } else if (v->IsCompareConstantEq()) {
1107 HCompareConstantEq* compare = HCompareConstantEq::cast(v);
1108 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value()));
1109 } else if (v->IsTypeofIs()) {
1110 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1111 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1112 } else if (v->IsIsConstructCall()) {
1113 return new LIsConstructCallAndBranch(TempRegister());
1114 } else if (v->IsConstant()) {
1115 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() 1028 HBasicBlock* successor = HConstant::cast(v)->ToBoolean()
1116 ? instr->FirstSuccessor() 1029 ? instr->FirstSuccessor()
1117 : instr->SecondSuccessor(); 1030 : instr->SecondSuccessor();
1118 return new LGoto(successor->block_id()); 1031 return new LGoto(successor->block_id());
1119 } else {
1120 Abort("Undefined compare before branch");
1121 return NULL;
1122 } 1032 }
1033 return new LBranch(UseRegisterAtStart(v));
1123 } 1034 }
1124 1035
1125 1036
1126 1037
1127 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { 1038 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
1128 ASSERT(instr->value()->representation().IsTagged()); 1039 ASSERT(instr->value()->representation().IsTagged());
1129 LOperand* value = UseRegisterAtStart(instr->value()); 1040 LOperand* value = UseRegisterAtStart(instr->value());
1130 LOperand* temp = TempRegister(); 1041 LOperand* temp = TempRegister();
1131 return new LCmpMapAndBranch(value, temp); 1042 return new LCmpMapAndBranch(value, temp);
1132 } 1043 }
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 LOperand* right = exponent_type.IsDouble() ? 1381 LOperand* right = exponent_type.IsDouble() ?
1471 UseFixedDouble(instr->right(), d2) : 1382 UseFixedDouble(instr->right(), d2) :
1472 UseFixed(instr->right(), r0); 1383 UseFixed(instr->right(), r0);
1473 LPower* result = new LPower(left, right); 1384 LPower* result = new LPower(left, right);
1474 return MarkAsCall(DefineFixedDouble(result, d3), 1385 return MarkAsCall(DefineFixedDouble(result, d3),
1475 instr, 1386 instr,
1476 CAN_DEOPTIMIZE_EAGERLY); 1387 CAN_DEOPTIMIZE_EAGERLY);
1477 } 1388 }
1478 1389
1479 1390
1480 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { 1391 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1481 Token::Value op = instr->token(); 1392 Token::Value op = instr->token();
1482 Representation r = instr->GetInputRepresentation(); 1393 Representation r = instr->GetInputRepresentation();
1394 ASSERT(instr->left()->representation().IsTagged());
1395 ASSERT(instr->right()->representation().IsTagged());
1396 bool reversed = (op == Token::GT || op == Token::LTE);
1397 LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1);
1398 LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
1399 LCmpT* result = new LCmpT(left, right);
1400 return MarkAsCall(DefineFixed(result, r0), instr);
1401 }
1402
1403
1404 LInstruction* LChunkBuilder::DoCompareIDAndBranch(
1405 HCompareIDAndBranch* instr) {
1406 Representation r = instr->GetInputRepresentation();
1483 if (r.IsInteger32()) { 1407 if (r.IsInteger32()) {
1484 ASSERT(instr->left()->representation().IsInteger32()); 1408 ASSERT(instr->left()->representation().IsInteger32());
1485 ASSERT(instr->right()->representation().IsInteger32()); 1409 ASSERT(instr->right()->representation().IsInteger32());
1486 LOperand* left = UseRegisterAtStart(instr->left()); 1410 LOperand* left = UseRegisterAtStart(instr->left());
1487 LOperand* right = UseRegisterAtStart(instr->right()); 1411 LOperand* right = UseRegisterAtStart(instr->right());
1488 return DefineAsRegister(new LCmpID(left, right)); 1412 return new LCmpIDAndBranch(left, right);
1489 } else if (r.IsDouble()) { 1413 } else {
1414 ASSERT(r.IsDouble());
1490 ASSERT(instr->left()->representation().IsDouble()); 1415 ASSERT(instr->left()->representation().IsDouble());
1491 ASSERT(instr->right()->representation().IsDouble()); 1416 ASSERT(instr->right()->representation().IsDouble());
1492 LOperand* left = UseRegisterAtStart(instr->left()); 1417 LOperand* left = UseRegisterAtStart(instr->left());
1493 LOperand* right = UseRegisterAtStart(instr->right()); 1418 LOperand* right = UseRegisterAtStart(instr->right());
1494 return DefineAsRegister(new LCmpID(left, right)); 1419 return new LCmpIDAndBranch(left, right);
1495 } else {
1496 ASSERT(instr->left()->representation().IsTagged());
1497 ASSERT(instr->right()->representation().IsTagged());
1498 bool reversed = (op == Token::GT || op == Token::LTE);
1499 LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1);
1500 LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
1501 LCmpT* result = new LCmpT(left, right);
1502 return MarkAsCall(DefineFixed(result, r0), instr);
1503 } 1420 }
1504 } 1421 }
1505 1422
1506 1423
1507 LInstruction* LChunkBuilder::DoCompareObjectEq(HCompareObjectEq* instr) { 1424 LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch(
1425 HCompareObjectEqAndBranch* instr) {
1508 LOperand* left = UseRegisterAtStart(instr->left()); 1426 LOperand* left = UseRegisterAtStart(instr->left());
1509 LOperand* right = UseRegisterAtStart(instr->right()); 1427 LOperand* right = UseRegisterAtStart(instr->right());
1510 LCmpObjectEq* result = new LCmpObjectEq(left, right); 1428 return new LCmpObjectEqAndBranch(left, right);
1511 return DefineAsRegister(result);
1512 } 1429 }
1513 1430
1514 1431
1515 LInstruction* LChunkBuilder::DoCompareConstantEq( 1432 LInstruction* LChunkBuilder::DoCompareConstantEqAndBranch(
1516 HCompareConstantEq* instr) { 1433 HCompareConstantEqAndBranch* instr) {
1517 LOperand* left = UseRegisterAtStart(instr->value()); 1434 return new LCmpConstantEqAndBranch(UseRegisterAtStart(instr->value()));
1518 return DefineAsRegister(new LCmpConstantEq(left));
1519 } 1435 }
1520 1436
1521 1437
1522 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) { 1438 LInstruction* LChunkBuilder::DoIsNullAndBranch(HIsNullAndBranch* instr) {
1523 ASSERT(instr->value()->representation().IsTagged()); 1439 ASSERT(instr->value()->representation().IsTagged());
1524 LOperand* value = UseRegisterAtStart(instr->value()); 1440 return new LIsNullAndBranch(UseRegisterAtStart(instr->value()));
1525
1526 return DefineAsRegister(new LIsNull(value));
1527 } 1441 }
1528 1442
1529 1443
1530 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { 1444 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) {
1531 ASSERT(instr->value()->representation().IsTagged()); 1445 ASSERT(instr->value()->representation().IsTagged());
1532 LOperand* value = UseRegisterAtStart(instr->value()); 1446 LOperand* temp = TempRegister();
1533 1447 return new LIsObjectAndBranch(UseRegisterAtStart(instr->value()), temp);
1534 return DefineAsRegister(new LIsObject(value));
1535 } 1448 }
1536 1449
1537 1450
1538 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { 1451 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) {
1539 ASSERT(instr->value()->representation().IsTagged()); 1452 ASSERT(instr->value()->representation().IsTagged());
1540 LOperand* value = UseAtStart(instr->value()); 1453 return new LIsSmiAndBranch(Use(instr->value()));
1541
1542 return DefineAsRegister(new LIsSmi(value));
1543 } 1454 }
1544 1455
1545 1456
1546 LInstruction* LChunkBuilder::DoIsUndetectable(HIsUndetectable* instr) { 1457 LInstruction* LChunkBuilder::DoIsUndetectableAndBranch(
1458 HIsUndetectableAndBranch* instr) {
1547 ASSERT(instr->value()->representation().IsTagged()); 1459 ASSERT(instr->value()->representation().IsTagged());
1548 LOperand* value = UseRegisterAtStart(instr->value()); 1460 return new LIsUndetectableAndBranch(UseRegisterAtStart(instr->value()),
1549 1461 TempRegister());
1550 return DefineAsRegister(new LIsUndetectable(value));
1551 } 1462 }
1552 1463
1553 1464
1554 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { 1465 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
1466 HHasInstanceTypeAndBranch* instr) {
1555 ASSERT(instr->value()->representation().IsTagged()); 1467 ASSERT(instr->value()->representation().IsTagged());
1556 LOperand* value = UseRegisterAtStart(instr->value()); 1468 return new LHasInstanceTypeAndBranch(UseRegisterAtStart(instr->value()));
1557
1558 return DefineAsRegister(new LHasInstanceType(value));
1559 } 1469 }
1560 1470
1561 1471
1562 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( 1472 LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
1563 HGetCachedArrayIndex* instr) { 1473 HGetCachedArrayIndex* instr) {
1564 ASSERT(instr->value()->representation().IsTagged()); 1474 ASSERT(instr->value()->representation().IsTagged());
1565 LOperand* value = UseRegisterAtStart(instr->value()); 1475 LOperand* value = UseRegisterAtStart(instr->value());
1566 1476
1567 return DefineAsRegister(new LGetCachedArrayIndex(value)); 1477 return DefineAsRegister(new LGetCachedArrayIndex(value));
1568 } 1478 }
1569 1479
1570 1480
1571 LInstruction* LChunkBuilder::DoHasCachedArrayIndex( 1481 LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
1572 HHasCachedArrayIndex* instr) { 1482 HHasCachedArrayIndexAndBranch* instr) {
1573 ASSERT(instr->value()->representation().IsTagged()); 1483 ASSERT(instr->value()->representation().IsTagged());
1574 LOperand* value = UseRegister(instr->value()); 1484 return new LHasCachedArrayIndexAndBranch(
1575 1485 UseRegisterAtStart(instr->value()));
1576 return DefineAsRegister(new LHasCachedArrayIndex(value));
1577 } 1486 }
1578 1487
1579 1488
1580 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) { 1489 LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
1581 ASSERT(instr->value()->representation().IsTagged()); 1490 HClassOfTestAndBranch* instr) {
1582 LOperand* value = UseTempRegister(instr->value()); 1491 ASSERT(compare->value()->representation().IsTagged());
1583 return DefineSameAsFirst(new LClassOfTest(value)); 1492 return new LClassOfTestAndBranch(UseTempRegister(instr->value()),
1493 TempRegister());
1584 } 1494 }
1585 1495
1586 1496
1587 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { 1497 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
1588 LOperand* array = UseRegisterAtStart(instr->value()); 1498 LOperand* array = UseRegisterAtStart(instr->value());
1589 return DefineAsRegister(new LJSArrayLength(array)); 1499 return DefineAsRegister(new LJSArrayLength(array));
1590 } 1500 }
1591 1501
1592 1502
1593 LInstruction* LChunkBuilder::DoExternalArrayLength( 1503 LInstruction* LChunkBuilder::DoExternalArrayLength(
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 return MarkAsCall(DefineFixed(result, r0), instr); 2072 return MarkAsCall(DefineFixed(result, r0), instr);
2163 } 2073 }
2164 2074
2165 2075
2166 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { 2076 LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
2167 LTypeof* result = new LTypeof(UseFixed(instr->value(), r0)); 2077 LTypeof* result = new LTypeof(UseFixed(instr->value(), r0));
2168 return MarkAsCall(DefineFixed(result, r0), instr); 2078 return MarkAsCall(DefineFixed(result, r0), instr);
2169 } 2079 }
2170 2080
2171 2081
2172 LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) { 2082 LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) {
2173 return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value()))); 2083 return new LTypeofIsAndBranch(UseTempRegister(instr->value()));
2174 } 2084 }
2175 2085
2176 2086
2177 LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) { 2087 LInstruction* LChunkBuilder::DoIsConstructCallAndBranch(
2178 return DefineAsRegister(new LIsConstructCall()); 2088 HIsConstructCallAndBranch* instr) {
2089 return new LIsConstructCallAndBranch(TempRegister());
2179 } 2090 }
2180 2091
2181 2092
2182 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { 2093 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
2183 HEnvironment* env = current_block_->last_environment(); 2094 HEnvironment* env = current_block_->last_environment();
2184 ASSERT(env != NULL); 2095 ASSERT(env != NULL);
2185 2096
2186 env->set_ast_id(instr->ast_id()); 2097 env->set_ast_id(instr->ast_id());
2187 2098
2188 env->Drop(instr->pop_count()); 2099 env->Drop(instr->pop_count());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 2153
2243 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2154 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2244 LOperand* key = UseRegisterAtStart(instr->key()); 2155 LOperand* key = UseRegisterAtStart(instr->key());
2245 LOperand* object = UseRegisterAtStart(instr->object()); 2156 LOperand* object = UseRegisterAtStart(instr->object());
2246 LIn* result = new LIn(key, object); 2157 LIn* result = new LIn(key, object);
2247 return MarkAsCall(DefineFixed(result, r0), instr); 2158 return MarkAsCall(DefineFixed(result, r0), instr);
2248 } 2159 }
2249 2160
2250 2161
2251 } } // namespace v8::internal 2162 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | src/hydrogen.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698