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

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 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
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 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 LOperand* context = UseFixed(instr->context(), esi); 1436 LOperand* context = UseFixed(instr->context(), esi);
1437 LOperand* left = UseFixed(instr->left(), edx); 1437 LOperand* left = UseFixed(instr->left(), edx);
1438 LOperand* right = UseFixed(instr->right(), eax); 1438 LOperand* right = UseFixed(instr->right(), eax);
1439 LCmpT* result = new(zone()) LCmpT(context, left, right); 1439 LCmpT* result = new(zone()) LCmpT(context, left, right);
1440 return MarkAsCall(DefineFixed(result, eax), instr); 1440 return MarkAsCall(DefineFixed(result, eax), instr);
1441 } 1441 }
1442 1442
1443 1443
1444 LInstruction* LChunkBuilder::DoCompareIDAndBranch( 1444 LInstruction* LChunkBuilder::DoCompareIDAndBranch(
1445 HCompareIDAndBranch* instr) { 1445 HCompareIDAndBranch* instr) {
1446 Representation r = instr->GetInputRepresentation(); 1446 Representation r = instr->representation();
1447 if (r.IsInteger32()) { 1447 if (r.IsInteger32()) {
1448 ASSERT(instr->left()->representation().IsInteger32()); 1448 ASSERT(instr->left()->representation().IsInteger32());
1449 ASSERT(instr->right()->representation().IsInteger32()); 1449 ASSERT(instr->right()->representation().IsInteger32());
1450 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1450 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1451 LOperand* right = UseOrConstantAtStart(instr->right()); 1451 LOperand* right = UseOrConstantAtStart(instr->right());
1452 return new(zone()) LCmpIDAndBranch(left, right); 1452 return new(zone()) LCmpIDAndBranch(left, right);
1453 } else { 1453 } else {
1454 ASSERT(r.IsDouble()); 1454 ASSERT(r.IsDouble());
1455 ASSERT(instr->left()->representation().IsDouble()); 1455 ASSERT(instr->left()->representation().IsDouble());
1456 ASSERT(instr->right()->representation().IsDouble()); 1456 ASSERT(instr->right()->representation().IsDouble());
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
2276 } 2276 }
2277 2277
2278 2278
2279 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { 2279 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
2280 HEnvironment* env = current_block_->last_environment(); 2280 HEnvironment* env = current_block_->last_environment();
2281 ASSERT(env != NULL); 2281 ASSERT(env != NULL);
2282 2282
2283 env->set_ast_id(instr->ast_id()); 2283 env->set_ast_id(instr->ast_id());
2284 2284
2285 env->Drop(instr->pop_count()); 2285 env->Drop(instr->pop_count());
2286 for (int i = 0; i < instr->values()->length(); ++i) { 2286 for (int i = instr->values()->length() - 1; i >= 0; --i) {
2287 HValue* value = instr->values()->at(i); 2287 HValue* value = instr->values()->at(i);
2288 if (instr->HasAssignedIndexAt(i)) { 2288 if (instr->HasAssignedIndexAt(i)) {
2289 env->Bind(instr->GetAssignedIndexAt(i), value); 2289 env->Bind(instr->GetAssignedIndexAt(i), value);
2290 } else { 2290 } else {
2291 env->Push(value); 2291 env->Push(value);
2292 } 2292 }
2293 } 2293 }
2294 2294
2295 // If there is an instruction pending deoptimization environment create a 2295 // If there is an instruction pending deoptimization environment create a
2296 // lazy bailout instruction to capture the environment. 2296 // lazy bailout instruction to capture the environment.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2395 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2396 LOperand* object = UseRegister(instr->object()); 2396 LOperand* object = UseRegister(instr->object());
2397 LOperand* index = UseTempRegister(instr->index()); 2397 LOperand* index = UseTempRegister(instr->index());
2398 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2398 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2399 } 2399 }
2400 2400
2401 2401
2402 } } // namespace v8::internal 2402 } } // namespace v8::internal
2403 2403
2404 #endif // V8_TARGET_ARCH_IA32 2404 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/ia32/lithium-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698