Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1396 ASSERT(instr->right()->representation().IsTagged()); | 1396 ASSERT(instr->right()->representation().IsTagged()); |
| 1397 LOperand* left = UseFixed(instr->left(), r1); | 1397 LOperand* left = UseFixed(instr->left(), r1); |
| 1398 LOperand* right = UseFixed(instr->right(), r0); | 1398 LOperand* right = UseFixed(instr->right(), r0); |
| 1399 LCmpT* result = new(zone()) LCmpT(left, right); | 1399 LCmpT* result = new(zone()) LCmpT(left, right); |
| 1400 return MarkAsCall(DefineFixed(result, r0), instr); | 1400 return MarkAsCall(DefineFixed(result, r0), instr); |
| 1401 } | 1401 } |
| 1402 | 1402 |
| 1403 | 1403 |
| 1404 LInstruction* LChunkBuilder::DoCompareIDAndBranch( | 1404 LInstruction* LChunkBuilder::DoCompareIDAndBranch( |
| 1405 HCompareIDAndBranch* instr) { | 1405 HCompareIDAndBranch* instr) { |
| 1406 Representation r = instr->GetInputRepresentation(); | 1406 Representation r = instr->representation(); |
| 1407 if (r.IsInteger32()) { | 1407 if (r.IsInteger32()) { |
| 1408 ASSERT(instr->left()->representation().IsInteger32()); | 1408 ASSERT(instr->left()->representation().IsInteger32()); |
| 1409 ASSERT(instr->right()->representation().IsInteger32()); | 1409 ASSERT(instr->right()->representation().IsInteger32()); |
| 1410 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); | 1410 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); |
| 1411 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); | 1411 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); |
| 1412 return new(zone()) LCmpIDAndBranch(left, right); | 1412 return new(zone()) LCmpIDAndBranch(left, right); |
| 1413 } else { | 1413 } else { |
| 1414 ASSERT(r.IsDouble()); | 1414 ASSERT(r.IsDouble()); |
| 1415 ASSERT(instr->left()->representation().IsDouble()); | 1415 ASSERT(instr->left()->representation().IsDouble()); |
| 1416 ASSERT(instr->right()->representation().IsDouble()); | 1416 ASSERT(instr->right()->representation().IsDouble()); |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2155 } | 2155 } |
| 2156 | 2156 |
| 2157 | 2157 |
| 2158 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { | 2158 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { |
| 2159 HEnvironment* env = current_block_->last_environment(); | 2159 HEnvironment* env = current_block_->last_environment(); |
| 2160 ASSERT(env != NULL); | 2160 ASSERT(env != NULL); |
| 2161 | 2161 |
| 2162 env->set_ast_id(instr->ast_id()); | 2162 env->set_ast_id(instr->ast_id()); |
| 2163 | 2163 |
| 2164 env->Drop(instr->pop_count()); | 2164 env->Drop(instr->pop_count()); |
| 2165 for (int i = 0; i < instr->values()->length(); ++i) { | 2165 for (int i = instr->values()->length() - 1; i >= 0; --i) { |
|
danno
2012/11/06 11:42:59
Add a comment describing why the order is reversed
Jakob Kummerow
2012/11/06 12:44:05
The comment is in hydrogen.cc, in HBasicBlock::Cre
| |
| 2166 HValue* value = instr->values()->at(i); | 2166 HValue* value = instr->values()->at(i); |
| 2167 if (instr->HasAssignedIndexAt(i)) { | 2167 if (instr->HasAssignedIndexAt(i)) { |
| 2168 env->Bind(instr->GetAssignedIndexAt(i), value); | 2168 env->Bind(instr->GetAssignedIndexAt(i), value); |
| 2169 } else { | 2169 } else { |
| 2170 env->Push(value); | 2170 env->Push(value); |
| 2171 } | 2171 } |
| 2172 } | 2172 } |
| 2173 | 2173 |
| 2174 // If there is an instruction pending deoptimization environment create a | 2174 // If there is an instruction pending deoptimization environment create a |
| 2175 // lazy bailout instruction to capture the environment. | 2175 // lazy bailout instruction to capture the environment. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2266 | 2266 |
| 2267 | 2267 |
| 2268 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2268 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2269 LOperand* object = UseRegister(instr->object()); | 2269 LOperand* object = UseRegister(instr->object()); |
| 2270 LOperand* index = UseRegister(instr->index()); | 2270 LOperand* index = UseRegister(instr->index()); |
| 2271 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2271 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2272 } | 2272 } |
| 2273 | 2273 |
| 2274 | 2274 |
| 2275 } } // namespace v8::internal | 2275 } } // namespace v8::internal |
| OLD | NEW |