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

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

Issue 6201004: ARM: Implement ClassOf in the lithium arm backend. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 int first_id = first->block_id(); 991 int first_id = first->block_id();
992 int second_id = second->block_id(); 992 int second_id = second->block_id();
993 993
994 if (v->EmitAtUses()) { 994 if (v->EmitAtUses()) {
995 if (v->IsClassOfTest()) { 995 if (v->IsClassOfTest()) {
996 HClassOfTest* compare = HClassOfTest::cast(v); 996 HClassOfTest* compare = HClassOfTest::cast(v);
997 ASSERT(compare->value()->representation().IsTagged()); 997 ASSERT(compare->value()->representation().IsTagged());
998 998
999 return new LClassOfTestAndBranch(UseTempRegister(compare->value()), 999 return new LClassOfTestAndBranch(UseTempRegister(compare->value()),
1000 TempRegister(), 1000 TempRegister(),
1001 TempRegister(),
1002 first_id, 1001 first_id,
1003 second_id); 1002 second_id);
1004 } else if (v->IsCompare()) { 1003 } else if (v->IsCompare()) {
1005 HCompare* compare = HCompare::cast(v); 1004 HCompare* compare = HCompare::cast(v);
1006 Token::Value op = compare->token(); 1005 Token::Value op = compare->token();
1007 HValue* left = compare->left(); 1006 HValue* left = compare->left();
1008 HValue* right = compare->right(); 1007 HValue* right = compare->right();
1009 if (left->representation().IsInteger32()) { 1008 if (left->representation().IsInteger32()) {
1010 ASSERT(right->representation().IsInteger32()); 1009 ASSERT(right->representation().IsInteger32());
1011 return new LCmpIDAndBranch(op, 1010 return new LCmpIDAndBranch(op,
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 ASSERT(instr->value()->representation().IsTagged()); 1477 ASSERT(instr->value()->representation().IsTagged());
1479 LOperand* value = UseRegister(instr->value()); 1478 LOperand* value = UseRegister(instr->value());
1480 1479
1481 return DefineAsRegister(new LHasCachedArrayIndex(value)); 1480 return DefineAsRegister(new LHasCachedArrayIndex(value));
1482 } 1481 }
1483 1482
1484 1483
1485 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) { 1484 LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) {
1486 ASSERT(instr->value()->representation().IsTagged()); 1485 ASSERT(instr->value()->representation().IsTagged());
1487 LOperand* value = UseTempRegister(instr->value()); 1486 LOperand* value = UseTempRegister(instr->value());
1488 1487 return DefineSameAsFirst(new LClassOfTest(value));
1489 return DefineSameAsFirst(new LClassOfTest(value, TempRegister()));
1490 } 1488 }
1491 1489
1492 1490
1493 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) { 1491 LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
1494 LOperand* array = UseRegisterAtStart(instr->value()); 1492 LOperand* array = UseRegisterAtStart(instr->value());
1495 return DefineAsRegister(new LJSArrayLength(array)); 1493 return DefineAsRegister(new LJSArrayLength(array));
1496 } 1494 }
1497 1495
1498 1496
1499 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) { 1497 LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 void LPointerMap::PrintTo(StringStream* stream) const { 1907 void LPointerMap::PrintTo(StringStream* stream) const {
1910 stream->Add("{"); 1908 stream->Add("{");
1911 for (int i = 0; i < pointer_operands_.length(); ++i) { 1909 for (int i = 0; i < pointer_operands_.length(); ++i) {
1912 if (i != 0) stream->Add(";"); 1910 if (i != 0) stream->Add(";");
1913 pointer_operands_[i]->PrintTo(stream); 1911 pointer_operands_[i]->PrintTo(stream);
1914 } 1912 }
1915 stream->Add("} @%d", position()); 1913 stream->Add("} @%d", position());
1916 } 1914 }
1917 1915
1918 } } // namespace v8::internal 1916 } } // 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