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

Side by Side Diff: src/arm/lithium-arm.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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 LOperand* temp = TempRegister(); 1104 LOperand* temp = TempRegister();
1105 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp); 1105 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp);
1106 } else if (v->IsCompareJSObjectEq()) { 1106 } else if (v->IsCompareJSObjectEq()) {
1107 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); 1107 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
1108 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), 1108 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1109 UseRegisterAtStart(compare->right())); 1109 UseRegisterAtStart(compare->right()));
1110 } else if (v->IsCompareSymbolEq()) { 1110 } else if (v->IsCompareSymbolEq()) {
1111 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v); 1111 HCompareSymbolEq* compare = HCompareSymbolEq::cast(v);
1112 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()), 1112 return new LCmpSymbolEqAndBranch(UseRegisterAtStart(compare->left()),
1113 UseRegisterAtStart(compare->right())); 1113 UseRegisterAtStart(compare->right()));
1114 } else if (v->IsCompareConstantEq()) {
1115 HCompareConstantEq* compare = HCompareConstantEq::cast(v);
1116 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value()));
1114 } else if (v->IsTypeofIs()) { 1117 } else if (v->IsTypeofIs()) {
1115 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1118 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1116 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1119 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
1117 } else if (v->IsIsConstructCall()) { 1120 } else if (v->IsIsConstructCall()) {
1118 return new LIsConstructCallAndBranch(TempRegister()); 1121 return new LIsConstructCallAndBranch(TempRegister());
1119 } else if (v->IsConstant()) { 1122 } else if (v->IsConstant()) {
1120 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() 1123 HBasicBlock* successor = HConstant::cast(v)->ToBoolean()
1121 ? instr->FirstSuccessor() 1124 ? instr->FirstSuccessor()
1122 : instr->SecondSuccessor(); 1125 : instr->SecondSuccessor();
1123 return new LGoto(successor->block_id()); 1126 return new LGoto(successor->block_id());
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 1515
1513 LInstruction* LChunkBuilder::DoCompareSymbolEq( 1516 LInstruction* LChunkBuilder::DoCompareSymbolEq(
1514 HCompareSymbolEq* instr) { 1517 HCompareSymbolEq* instr) {
1515 LOperand* left = UseRegisterAtStart(instr->left()); 1518 LOperand* left = UseRegisterAtStart(instr->left());
1516 LOperand* right = UseRegisterAtStart(instr->right()); 1519 LOperand* right = UseRegisterAtStart(instr->right());
1517 LCmpSymbolEq* result = new LCmpSymbolEq(left, right); 1520 LCmpSymbolEq* result = new LCmpSymbolEq(left, right);
1518 return DefineAsRegister(result); 1521 return DefineAsRegister(result);
1519 } 1522 }
1520 1523
1521 1524
1525 LInstruction* LChunkBuilder::DoCompareConstantEq(
1526 HCompareConstantEq* instr) {
1527 LOperand* left = UseRegisterAtStart(instr->value());
1528 return DefineAsRegister(new LCmpConstantEq(left));
1529 }
1530
1531
1522 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) { 1532 LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) {
1523 ASSERT(instr->value()->representation().IsTagged()); 1533 ASSERT(instr->value()->representation().IsTagged());
1524 LOperand* value = UseRegisterAtStart(instr->value()); 1534 LOperand* value = UseRegisterAtStart(instr->value());
1525 1535
1526 return DefineAsRegister(new LIsNull(value)); 1536 return DefineAsRegister(new LIsNull(value));
1527 } 1537 }
1528 1538
1529 1539
1530 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { 1540 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
1531 ASSERT(instr->value()->representation().IsTagged()); 1541 ASSERT(instr->value()->representation().IsTagged());
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 return DefineAsRegister(new LExternalArrayLength(array)); 1606 return DefineAsRegister(new LExternalArrayLength(array));
1597 } 1607 }
1598 1608
1599 1609
1600 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { 1610 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
1601 LOperand* array = UseRegisterAtStart(instr->value()); 1611 LOperand* array = UseRegisterAtStart(instr->value());
1602 return DefineAsRegister(new LFixedArrayLength(array)); 1612 return DefineAsRegister(new LFixedArrayLength(array));
1603 } 1613 }
1604 1614
1605 1615
1616 LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) {
1617 LOperand* object = UseRegisterAtStart(instr->value());
1618 return DefineAsRegister(new LElementsKind(object));
1619 }
1620
1621
1606 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { 1622 LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
1607 LOperand* object = UseRegister(instr->value()); 1623 LOperand* object = UseRegister(instr->value());
1608 LValueOf* result = new LValueOf(object, TempRegister()); 1624 LValueOf* result = new LValueOf(object, TempRegister());
1609 return AssignEnvironment(DefineSameAsFirst(result)); 1625 return AssignEnvironment(DefineSameAsFirst(result));
1610 } 1626 }
1611 1627
1612 1628
1613 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { 1629 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
1614 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), 1630 return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
1615 UseRegister(instr->length()))); 1631 UseRegister(instr->length())));
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 2244
2229 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2245 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2230 LOperand* key = UseRegisterAtStart(instr->key()); 2246 LOperand* key = UseRegisterAtStart(instr->key());
2231 LOperand* object = UseRegisterAtStart(instr->object()); 2247 LOperand* object = UseRegisterAtStart(instr->object());
2232 LIn* result = new LIn(key, object); 2248 LIn* result = new LIn(key, object);
2233 return MarkAsCall(DefineFixed(result, r0), instr); 2249 return MarkAsCall(DefineFixed(result, r0), instr);
2234 } 2250 }
2235 2251
2236 2252
2237 } } // namespace v8::internal 2253 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698