| 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 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 ASSERT(instr->right()->representation().IsTagged()); | 1402 ASSERT(instr->right()->representation().IsTagged()); |
| 1403 LOperand* left = UseFixed(instr->left(), r1); | 1403 LOperand* left = UseFixed(instr->left(), r1); |
| 1404 LOperand* right = UseFixed(instr->right(), r0); | 1404 LOperand* right = UseFixed(instr->right(), r0); |
| 1405 LCmpT* result = new(zone()) LCmpT(left, right); | 1405 LCmpT* result = new(zone()) LCmpT(left, right); |
| 1406 return MarkAsCall(DefineFixed(result, r0), instr); | 1406 return MarkAsCall(DefineFixed(result, r0), instr); |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 | 1409 |
| 1410 LInstruction* LChunkBuilder::DoCompareIDAndBranch( | 1410 LInstruction* LChunkBuilder::DoCompareIDAndBranch( |
| 1411 HCompareIDAndBranch* instr) { | 1411 HCompareIDAndBranch* instr) { |
| 1412 Representation r = instr->GetInputRepresentation(); | 1412 Representation r = instr->representation(); |
| 1413 if (r.IsInteger32()) { | 1413 if (r.IsInteger32()) { |
| 1414 ASSERT(instr->left()->representation().IsInteger32()); | 1414 ASSERT(instr->left()->representation().IsInteger32()); |
| 1415 ASSERT(instr->right()->representation().IsInteger32()); | 1415 ASSERT(instr->right()->representation().IsInteger32()); |
| 1416 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); | 1416 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); |
| 1417 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); | 1417 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); |
| 1418 return new(zone()) LCmpIDAndBranch(left, right); | 1418 return new(zone()) LCmpIDAndBranch(left, right); |
| 1419 } else { | 1419 } else { |
| 1420 ASSERT(r.IsDouble()); | 1420 ASSERT(r.IsDouble()); |
| 1421 ASSERT(instr->left()->representation().IsDouble()); | 1421 ASSERT(instr->left()->representation().IsDouble()); |
| 1422 ASSERT(instr->right()->representation().IsDouble()); | 1422 ASSERT(instr->right()->representation().IsDouble()); |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2161 } | 2161 } |
| 2162 | 2162 |
| 2163 | 2163 |
| 2164 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { | 2164 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { |
| 2165 HEnvironment* env = current_block_->last_environment(); | 2165 HEnvironment* env = current_block_->last_environment(); |
| 2166 ASSERT(env != NULL); | 2166 ASSERT(env != NULL); |
| 2167 | 2167 |
| 2168 env->set_ast_id(instr->ast_id()); | 2168 env->set_ast_id(instr->ast_id()); |
| 2169 | 2169 |
| 2170 env->Drop(instr->pop_count()); | 2170 env->Drop(instr->pop_count()); |
| 2171 for (int i = 0; i < instr->values()->length(); ++i) { | 2171 for (int i = instr->values()->length() - 1; i >= 0; --i) { |
| 2172 HValue* value = instr->values()->at(i); | 2172 HValue* value = instr->values()->at(i); |
| 2173 if (instr->HasAssignedIndexAt(i)) { | 2173 if (instr->HasAssignedIndexAt(i)) { |
| 2174 env->Bind(instr->GetAssignedIndexAt(i), value); | 2174 env->Bind(instr->GetAssignedIndexAt(i), value); |
| 2175 } else { | 2175 } else { |
| 2176 env->Push(value); | 2176 env->Push(value); |
| 2177 } | 2177 } |
| 2178 } | 2178 } |
| 2179 | 2179 |
| 2180 // If there is an instruction pending deoptimization environment create a | 2180 // If there is an instruction pending deoptimization environment create a |
| 2181 // lazy bailout instruction to capture the environment. | 2181 // lazy bailout instruction to capture the environment. |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2272 | 2272 |
| 2273 | 2273 |
| 2274 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2274 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2275 LOperand* object = UseRegister(instr->object()); | 2275 LOperand* object = UseRegister(instr->object()); |
| 2276 LOperand* index = UseRegister(instr->index()); | 2276 LOperand* index = UseRegister(instr->index()); |
| 2277 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2277 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2278 } | 2278 } |
| 2279 | 2279 |
| 2280 | 2280 |
| 2281 } } // namespace v8::internal | 2281 } } // namespace v8::internal |
| OLD | NEW |