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

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

Issue 10837165: Lattice-based representation inference, powered by left/right specific type feedback for BinaryOps … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback; fixed tests Created 8 years, 1 month 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/ic.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 LOperand* context = UseFixed(instr->context(), esi); 1442 LOperand* context = UseFixed(instr->context(), esi);
1443 LOperand* left = UseFixed(instr->left(), edx); 1443 LOperand* left = UseFixed(instr->left(), edx);
1444 LOperand* right = UseFixed(instr->right(), eax); 1444 LOperand* right = UseFixed(instr->right(), eax);
1445 LCmpT* result = new(zone()) LCmpT(context, left, right); 1445 LCmpT* result = new(zone()) LCmpT(context, left, right);
1446 return MarkAsCall(DefineFixed(result, eax), instr); 1446 return MarkAsCall(DefineFixed(result, eax), instr);
1447 } 1447 }
1448 1448
1449 1449
1450 LInstruction* LChunkBuilder::DoCompareIDAndBranch( 1450 LInstruction* LChunkBuilder::DoCompareIDAndBranch(
1451 HCompareIDAndBranch* instr) { 1451 HCompareIDAndBranch* instr) {
1452 Representation r = instr->GetInputRepresentation(); 1452 Representation r = instr->representation();
1453 if (r.IsInteger32()) { 1453 if (r.IsInteger32()) {
1454 ASSERT(instr->left()->representation().IsInteger32()); 1454 ASSERT(instr->left()->representation().IsInteger32());
1455 ASSERT(instr->right()->representation().IsInteger32()); 1455 ASSERT(instr->right()->representation().IsInteger32());
1456 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1456 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1457 LOperand* right = UseOrConstantAtStart(instr->right()); 1457 LOperand* right = UseOrConstantAtStart(instr->right());
1458 return new(zone()) LCmpIDAndBranch(left, right); 1458 return new(zone()) LCmpIDAndBranch(left, right);
1459 } else { 1459 } else {
1460 ASSERT(r.IsDouble()); 1460 ASSERT(r.IsDouble());
1461 ASSERT(instr->left()->representation().IsDouble()); 1461 ASSERT(instr->left()->representation().IsDouble());
1462 ASSERT(instr->right()->representation().IsDouble()); 1462 ASSERT(instr->right()->representation().IsDouble());
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2282 } 2282 }
2283 2283
2284 2284
2285 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { 2285 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
2286 HEnvironment* env = current_block_->last_environment(); 2286 HEnvironment* env = current_block_->last_environment();
2287 ASSERT(env != NULL); 2287 ASSERT(env != NULL);
2288 2288
2289 env->set_ast_id(instr->ast_id()); 2289 env->set_ast_id(instr->ast_id());
2290 2290
2291 env->Drop(instr->pop_count()); 2291 env->Drop(instr->pop_count());
2292 for (int i = 0; i < instr->values()->length(); ++i) { 2292 for (int i = instr->values()->length() - 1; i >= 0; --i) {
2293 HValue* value = instr->values()->at(i); 2293 HValue* value = instr->values()->at(i);
2294 if (instr->HasAssignedIndexAt(i)) { 2294 if (instr->HasAssignedIndexAt(i)) {
2295 env->Bind(instr->GetAssignedIndexAt(i), value); 2295 env->Bind(instr->GetAssignedIndexAt(i), value);
2296 } else { 2296 } else {
2297 env->Push(value); 2297 env->Push(value);
2298 } 2298 }
2299 } 2299 }
2300 2300
2301 // If there is an instruction pending deoptimization environment create a 2301 // If there is an instruction pending deoptimization environment create a
2302 // lazy bailout instruction to capture the environment. 2302 // lazy bailout instruction to capture the environment.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2401 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2402 LOperand* object = UseRegister(instr->object()); 2402 LOperand* object = UseRegister(instr->object());
2403 LOperand* index = UseTempRegister(instr->index()); 2403 LOperand* index = UseTempRegister(instr->index());
2404 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2404 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2405 } 2405 }
2406 2406
2407 2407
2408 } } // namespace v8::internal 2408 } } // namespace v8::internal
2409 2409
2410 #endif // V8_TARGET_ARCH_IA32 2410 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698