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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-x64.h ('k') | test/cctest/test-api.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 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 ASSERT(instr->right()->representation().IsTagged()); 1382 ASSERT(instr->right()->representation().IsTagged());
1383 LOperand* left = UseFixed(instr->left(), rdx); 1383 LOperand* left = UseFixed(instr->left(), rdx);
1384 LOperand* right = UseFixed(instr->right(), rax); 1384 LOperand* right = UseFixed(instr->right(), rax);
1385 LCmpT* result = new(zone()) LCmpT(left, right); 1385 LCmpT* result = new(zone()) LCmpT(left, right);
1386 return MarkAsCall(DefineFixed(result, rax), instr); 1386 return MarkAsCall(DefineFixed(result, rax), instr);
1387 } 1387 }
1388 1388
1389 1389
1390 LInstruction* LChunkBuilder::DoCompareIDAndBranch( 1390 LInstruction* LChunkBuilder::DoCompareIDAndBranch(
1391 HCompareIDAndBranch* instr) { 1391 HCompareIDAndBranch* instr) {
1392 Representation r = instr->GetInputRepresentation(); 1392 Representation r = instr->representation();
1393 if (r.IsInteger32()) { 1393 if (r.IsInteger32()) {
1394 ASSERT(instr->left()->representation().IsInteger32()); 1394 ASSERT(instr->left()->representation().IsInteger32());
1395 ASSERT(instr->right()->representation().IsInteger32()); 1395 ASSERT(instr->right()->representation().IsInteger32());
1396 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1396 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1397 LOperand* right = UseOrConstantAtStart(instr->right()); 1397 LOperand* right = UseOrConstantAtStart(instr->right());
1398 return new(zone()) LCmpIDAndBranch(left, right); 1398 return new(zone()) LCmpIDAndBranch(left, right);
1399 } else { 1399 } else {
1400 ASSERT(r.IsDouble()); 1400 ASSERT(r.IsDouble());
1401 ASSERT(instr->left()->representation().IsDouble()); 1401 ASSERT(instr->left()->representation().IsDouble());
1402 ASSERT(instr->right()->representation().IsDouble()); 1402 ASSERT(instr->right()->representation().IsDouble());
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2145 } 2145 }
2146 2146
2147 2147
2148 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { 2148 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
2149 HEnvironment* env = current_block_->last_environment(); 2149 HEnvironment* env = current_block_->last_environment();
2150 ASSERT(env != NULL); 2150 ASSERT(env != NULL);
2151 2151
2152 env->set_ast_id(instr->ast_id()); 2152 env->set_ast_id(instr->ast_id());
2153 2153
2154 env->Drop(instr->pop_count()); 2154 env->Drop(instr->pop_count());
2155 for (int i = 0; i < instr->values()->length(); ++i) { 2155 for (int i = instr->values()->length() - 1; i >= 0; --i) {
2156 HValue* value = instr->values()->at(i); 2156 HValue* value = instr->values()->at(i);
2157 if (instr->HasAssignedIndexAt(i)) { 2157 if (instr->HasAssignedIndexAt(i)) {
2158 env->Bind(instr->GetAssignedIndexAt(i), value); 2158 env->Bind(instr->GetAssignedIndexAt(i), value);
2159 } else { 2159 } else {
2160 env->Push(value); 2160 env->Push(value);
2161 } 2161 }
2162 } 2162 }
2163 2163
2164 // If there is an instruction pending deoptimization environment create a 2164 // If there is an instruction pending deoptimization environment create a
2165 // lazy bailout instruction to capture the environment. 2165 // lazy bailout instruction to capture the environment.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2259 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2260 LOperand* object = UseRegister(instr->object()); 2260 LOperand* object = UseRegister(instr->object());
2261 LOperand* index = UseTempRegister(instr->index()); 2261 LOperand* index = UseTempRegister(instr->index());
2262 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2262 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2263 } 2263 }
2264 2264
2265 2265
2266 } } // namespace v8::internal 2266 } } // namespace v8::internal
2267 2267
2268 #endif // V8_TARGET_ARCH_X64 2268 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698