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

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

Issue 7170012: Crankshaft support for polymorphic array handling (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments; add implemention for ARM and x64 Created 9 years, 6 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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 temp1, 1107 temp1,
1108 temp2); 1108 temp2);
1109 } else if (v->IsCompareJSObjectEq()) { 1109 } else if (v->IsCompareJSObjectEq()) {
1110 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); 1110 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
1111 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), 1111 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1112 UseRegisterAtStart(compare->right())); 1112 UseRegisterAtStart(compare->right()));
1113 } else if (v->IsCompareSymbolEq()) { 1113 } else if (v->IsCompareSymbolEq()) {
1114 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v); 1114 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v);
1115 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()), 1115 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()),
1116 UseRegisterAtStart(compare->right())); 1116 UseRegisterAtStart(compare->right()));
1117 } else if (v->IsCompareConstantEq()) {
1118 HCompareConstantEq* compare = HCompareConstantEq::cast(v);
1119 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value()));
1117 } else if (v->IsTypeofIs()) { 1120 } else if (v->IsTypeofIs()) {
1118 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1121 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1119 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1122 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1120 } else if (v->IsIsConstructCall()) { 1123 } else if (v->IsIsConstructCall()) {
1121 return new LIsConstructCallAndBranch(TempRegister()); 1124 return new LIsConstructCallAndBranch(TempRegister());
1122 } else if (v->IsConstant()) { 1125 } else if (v->IsConstant()) {
1123 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() 1126 HBasicBlock* successor = HConstant::cast(v)->ToBoolean()
1124 ? instr->FirstSuccessor() 1127 ? instr->FirstSuccessor()
1125 : instr->SecondSuccessor(); 1128 : instr->SecondSuccessor();
1126 return new LGoto(successor->block_id()); 1129 return new LGoto(successor->block_id());
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 1539
1537 LInstruction* LChunkBuilder::DoCompareSymbolEq( 1540 LInstruction* LChunkBuilder::DoCompareSymbolEq(
1538 HCompareSymbolEq* instr) { 1541 HCompareSymbolEq* instr) {
1539 LOperand* left = UseRegisterAtStart(instr->left()); 1542 LOperand* left = UseRegisterAtStart(instr->left());
1540 LOperand* right = UseRegisterAtStart(instr->right()); 1543 LOperand* right = UseRegisterAtStart(instr->right());
1541 LCmpSymbolEq* result = new LCmpSymbolEq(left, right); 1544 LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
1542 return DefineAsRegister(result); 1545 return DefineAsRegister(result);
1543 } 1546 }
1544 1547
1545 1548
1549 LInstruction* LChunkBuilder::DoCompareConstantEq(
1550 HCompareConstantEq* instr) {
1551 LOperand* left = UseRegisterAtStart(instr->value());
1552 return DefineAsRegister(new LCmpConstantEq(left));
1553 }
1554
1555
1546 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) { 1556 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) {
1547 ASSERT(instr->value()->representation().IsTagged()); 1557 ASSERT(instr->value()->representation().IsTagged());
1548 LOperand* value = UseRegisterAtStart(instr->value()); 1558 LOperand* value = UseRegisterAtStart(instr->value());
1549 1559
1550 return DefineAsRegister(new LIsNull(value)); 1560 return DefineAsRegister(new LIsNull(value));
1551 } 1561 }
1552 1562
1553 1563
1554 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { 1564 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
1555 ASSERT(instr->value()->representation().IsTagged()); 1565 ASSERT(instr->value()->representation().IsTagged());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 } 1631 }
1622 1632
1623 1633
1624 LInstruction* LChunkBuilder::DoExternalArrayLength( 1634 LInstruction* LChunkBuilder::DoExternalArrayLength(
1625 HExternalArrayLength* instr) { 1635 HExternalArrayLength* instr) {
1626 LOperand* array = UseRegisterAtStart(instr->value()); 1636 LOperand* array = UseRegisterAtStart(instr->value());
1627 return DefineAsRegister(new LExternalArrayLength(array)); 1637 return DefineAsRegister(new LExternalArrayLength(array));
1628 } 1638 }
1629 1639
1630 1640
1641 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) {
1642 LOperand* object = UseRegisterAtStart(instr->value());
1643 return DefineAsRegister(new LElementsKind(object));
1644 }
1645
1646
1631 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1647 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
1632 LOperand* object = UseRegister(instr->value()); 1648 LOperand* object = UseRegister(instr->value());
1633 LValueOf* result = new LValueOf(object, TempRegister()); 1649 LValueOf* result = new LValueOf(object, TempRegister());
1634 return AssignEnvironment(DefineSameAsFirst(result)); 1650 return AssignEnvironment(DefineSameAsFirst(result));
1635 } 1651 }
1636 1652
1637 1653
1638 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { 1654 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1639 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), 1655 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1640 Use(instr->length()))); 1656 Use(instr->length())));
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2281 LOperand* key = UseOrConstantAtStart(instr->key()); 2297 LOperand* key = UseOrConstantAtStart(instr->key());
2282 LOperand* object = UseOrConstantAtStart(instr->object()); 2298 LOperand* object = UseOrConstantAtStart(instr->object());
2283 LIn* result = new LIn(key, object); 2299 LIn* result = new LIn(key, object);
2284 return MarkAsCall(DefineFixed(result, eax), instr); 2300 return MarkAsCall(DefineFixed(result, eax), instr);
2285 } 2301 }
2286 2302
2287 2303
2288 } } // namespace v8::internal 2304 } } // namespace v8::internal
2289 2305
2290 #endif // V8_TARGET_ARCH_IA32 2306 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698