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

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

Issue 7281009: Version 3.4.8... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
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
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-ia32.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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 UseRegisterAtStart(compare->value())); 1089 UseRegisterAtStart(compare->value()));
1090 } else if (v->IsIsNull()) { 1090 } else if (v->IsIsNull()) {
1091 HIsNull* compare = HIsNull::cast(v); 1091 HIsNull* compare = HIsNull::cast(v);
1092 ASSERT(compare->value()->representation().IsTagged()); 1092 ASSERT(compare->value()->representation().IsTagged());
1093 // We only need a temp register for non-strict compare. 1093 // We only need a temp register for non-strict compare.
1094 LOperand* temp = compare->is_strict() ? NULL : TempRegister(); 1094 LOperand* temp = compare->is_strict() ? NULL : TempRegister();
1095 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), temp); 1095 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), temp);
1096 } else if (v->IsIsObject()) { 1096 } else if (v->IsIsObject()) {
1097 HIsObject* compare = HIsObject::cast(v); 1097 HIsObject* compare = HIsObject::cast(v);
1098 ASSERT(compare->value()->representation().IsTagged()); 1098 ASSERT(compare->value()->representation().IsTagged());
1099 LOperand* temp1 = TempRegister(); 1099 LOperand* temp = TempRegister();
1100 LOperand* temp2 = TempRegister(); 1100 return new LIsObjectAndBranch(UseRegister(compare->value()), temp);
1101 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()),
1102 temp1,
1103 temp2);
1104 } else if (v->IsCompareObjectEq()) { 1101 } else if (v->IsCompareObjectEq()) {
1105 HCompareObjectEq* compare = HCompareObjectEq::cast(v); 1102 HCompareObjectEq* compare = HCompareObjectEq::cast(v);
1106 return new LCmpObjectEqAndBranch(UseRegisterAtStart(compare->left()), 1103 return new LCmpObjectEqAndBranch(UseRegisterAtStart(compare->left()),
1107 UseRegisterAtStart(compare->right())); 1104 UseRegisterAtStart(compare->right()));
1108 } else if (v->IsCompareConstantEq()) { 1105 } else if (v->IsCompareConstantEq()) {
1109 HCompareConstantEq* compare = HCompareConstantEq::cast(v); 1106 HCompareConstantEq* compare = HCompareConstantEq::cast(v);
1110 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value())); 1107 return new LCmpConstantEqAndBranch(UseRegisterAtStart(compare->value()));
1111 } else if (v->IsTypeofIs()) { 1108 } else if (v->IsTypeofIs()) {
1112 HTypeofIs* typeof_is = HTypeofIs::cast(v); 1109 HTypeofIs* typeof_is = HTypeofIs::cast(v);
1113 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value())); 1110 return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 LOperand* value = UseRegisterAtStart(instr->value()); 1536 LOperand* value = UseRegisterAtStart(instr->value());
1540 1537
1541 return DefineAsRegister(new LIsNull(value)); 1538 return DefineAsRegister(new LIsNull(value));
1542 } 1539 }
1543 1540
1544 1541
1545 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) { 1542 LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
1546 ASSERT(instr->value()->representation().IsTagged()); 1543 ASSERT(instr->value()->representation().IsTagged());
1547 LOperand* value = UseRegister(instr->value()); 1544 LOperand* value = UseRegister(instr->value());
1548 1545
1549 return DefineAsRegister(new LIsObject(value, TempRegister())); 1546 return DefineAsRegister(new LIsObject(value));
1550 } 1547 }
1551 1548
1552 1549
1553 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { 1550 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) {
1554 ASSERT(instr->value()->representation().IsTagged()); 1551 ASSERT(instr->value()->representation().IsTagged());
1555 LOperand* value = UseAtStart(instr->value()); 1552 LOperand* value = UseAtStart(instr->value());
1556 1553
1557 return DefineAsRegister(new LIsSmi(value)); 1554 return DefineAsRegister(new LIsSmi(value));
1558 } 1555 }
1559 1556
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 return AssignEnvironment(AssignPointerMap(new LStackCheck)); 2257 return AssignEnvironment(AssignPointerMap(new LStackCheck));
2261 } 2258 }
2262 } 2259 }
2263 2260
2264 2261
2265 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) { 2262 LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
2266 HEnvironment* outer = current_block_->last_environment(); 2263 HEnvironment* outer = current_block_->last_environment();
2267 HConstant* undefined = graph()->GetConstantUndefined(); 2264 HConstant* undefined = graph()->GetConstantUndefined();
2268 HEnvironment* inner = outer->CopyForInlining(instr->closure(), 2265 HEnvironment* inner = outer->CopyForInlining(instr->closure(),
2269 instr->function(), 2266 instr->function(),
2270 HEnvironment::LITHIUM,
2271 undefined, 2267 undefined,
2272 instr->call_kind()); 2268 instr->call_kind());
2273 current_block_->UpdateEnvironment(inner); 2269 current_block_->UpdateEnvironment(inner);
2274 chunk_->AddInlinedClosure(instr->closure()); 2270 chunk_->AddInlinedClosure(instr->closure());
2275 return NULL; 2271 return NULL;
2276 } 2272 }
2277 2273
2278 2274
2279 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2275 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2280 HEnvironment* outer = current_block_->last_environment()->outer(); 2276 HEnvironment* outer = current_block_->last_environment()->outer();
2281 current_block_->UpdateEnvironment(outer); 2277 current_block_->UpdateEnvironment(outer);
2282 return NULL; 2278 return NULL;
2283 } 2279 }
2284 2280
2285 2281
2286 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2282 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2287 LOperand* key = UseOrConstantAtStart(instr->key()); 2283 LOperand* key = UseOrConstantAtStart(instr->key());
2288 LOperand* object = UseOrConstantAtStart(instr->object()); 2284 LOperand* object = UseOrConstantAtStart(instr->object());
2289 LIn* result = new LIn(key, object); 2285 LIn* result = new LIn(key, object);
2290 return MarkAsCall(DefineFixed(result, eax), instr); 2286 return MarkAsCall(DefineFixed(result, eax), instr);
2291 } 2287 }
2292 2288
2293 2289
2294 } } // namespace v8::internal 2290 } } // namespace v8::internal
2295 2291
2296 #endif // V8_TARGET_ARCH_IA32 2292 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698