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

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

Issue 6308012: ARM: Implement DoIsObject and DoIsObjectAndBranch in the lithium code generator.. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/test
Patch Set: Adress comments and add comments. 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
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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 HIsNull* compare = HIsNull::cast(v); 1010 HIsNull* compare = HIsNull::cast(v);
1011 ASSERT(compare->value()->representation().IsTagged()); 1011 ASSERT(compare->value()->representation().IsTagged());
1012 1012
1013 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), 1013 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()),
1014 first_id, 1014 first_id,
1015 second_id); 1015 second_id);
1016 } else if (v->IsIsObject()) { 1016 } else if (v->IsIsObject()) {
1017 HIsObject* compare = HIsObject::cast(v); 1017 HIsObject* compare = HIsObject::cast(v);
1018 ASSERT(compare->value()->representation().IsTagged()); 1018 ASSERT(compare->value()->representation().IsTagged());
1019 1019
1020 LOperand* temp1 = TempRegister(); 1020 LOperand* temp = TempRegister();
1021 LOperand* temp2 = TempRegister();
1022 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), 1021 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()),
1023 temp1, 1022 temp,
1024 temp2,
1025 first_id, 1023 first_id,
1026 second_id); 1024 second_id);
1027 } else if (v->IsCompareJSObjectEq()) { 1025 } else if (v->IsCompareJSObjectEq()) {
1028 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v); 1026 HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
1029 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()), 1027 return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1030 UseRegisterAtStart(compare->right()), 1028 UseRegisterAtStart(compare->right()),
1031 first_id, 1029 first_id,
1032 second_id); 1030 second_id);
1033 } else if (v->IsInstanceOf()) { 1031 } else if (v->IsInstanceOf()) {
1034 HInstanceOf* instance_of = HInstanceOf::cast(v); 1032 HInstanceOf* instance_of = HInstanceOf::cast(v);
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 LOperand* value = UseRegisterAtStart(instr->value()); 1402 LOperand* value = UseRegisterAtStart(instr->value());
1405 1403
1406 return DefineAsRegister(new LIsNull(value)); 1404 return DefineAsRegister(new LIsNull(value));
1407 } 1405 }
1408 1406
1409 1407
1410 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { 1408 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
1411 ASSERT(instr->value()->representation().IsTagged()); 1409 ASSERT(instr->value()->representation().IsTagged());
1412 LOperand* value = UseRegisterAtStart(instr->value()); 1410 LOperand* value = UseRegisterAtStart(instr->value());
1413 1411
1414 return DefineAsRegister(new LIsObject(value, TempRegister())); 1412 return DefineAsRegister(new LIsObject(value));
1415 } 1413 }
1416 1414
1417 1415
1418 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { 1416 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) {
1419 ASSERT(instr->value()->representation().IsTagged()); 1417 ASSERT(instr->value()->representation().IsTagged());
1420 LOperand* value = UseAtStart(instr->value()); 1418 LOperand* value = UseAtStart(instr->value());
1421 1419
1422 return DefineAsRegister(new LIsSmi(value)); 1420 return DefineAsRegister(new LIsSmi(value));
1423 } 1421 }
1424 1422
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 1866
1869 1867
1870 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1868 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1871 HEnvironment* outer = current_block_->last_environment()->outer(); 1869 HEnvironment* outer = current_block_->last_environment()->outer();
1872 current_block_->UpdateEnvironment(outer); 1870 current_block_->UpdateEnvironment(outer);
1873 return NULL; 1871 return NULL;
1874 } 1872 }
1875 1873
1876 1874
1877 } } // namespace v8::internal 1875 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698