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 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 ASSERT(instr->right()->representation().IsTagged()); | 1376 ASSERT(instr->right()->representation().IsTagged()); |
1377 LOperand* left = UseFixed(instr->left(), rdx); | 1377 LOperand* left = UseFixed(instr->left(), rdx); |
1378 LOperand* right = UseFixed(instr->right(), rax); | 1378 LOperand* right = UseFixed(instr->right(), rax); |
1379 LCmpT* result = new(zone()) LCmpT(left, right); | 1379 LCmpT* result = new(zone()) LCmpT(left, right); |
1380 return MarkAsCall(DefineFixed(result, rax), instr); | 1380 return MarkAsCall(DefineFixed(result, rax), instr); |
1381 } | 1381 } |
1382 | 1382 |
1383 | 1383 |
1384 LInstruction* LChunkBuilder::DoCompareIDAndBranch( | 1384 LInstruction* LChunkBuilder::DoCompareIDAndBranch( |
1385 HCompareIDAndBranch* instr) { | 1385 HCompareIDAndBranch* instr) { |
1386 Representation r = instr->GetInputRepresentation(); | 1386 Representation r = instr->representation(); |
1387 if (r.IsInteger32()) { | 1387 if (r.IsInteger32()) { |
1388 ASSERT(instr->left()->representation().IsInteger32()); | 1388 ASSERT(instr->left()->representation().IsInteger32()); |
1389 ASSERT(instr->right()->representation().IsInteger32()); | 1389 ASSERT(instr->right()->representation().IsInteger32()); |
1390 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); | 1390 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); |
1391 LOperand* right = UseOrConstantAtStart(instr->right()); | 1391 LOperand* right = UseOrConstantAtStart(instr->right()); |
1392 return new(zone()) LCmpIDAndBranch(left, right); | 1392 return new(zone()) LCmpIDAndBranch(left, right); |
1393 } else { | 1393 } else { |
1394 ASSERT(r.IsDouble()); | 1394 ASSERT(r.IsDouble()); |
1395 ASSERT(instr->left()->representation().IsDouble()); | 1395 ASSERT(instr->left()->representation().IsDouble()); |
1396 ASSERT(instr->right()->representation().IsDouble()); | 1396 ASSERT(instr->right()->representation().IsDouble()); |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2139 } | 2139 } |
2140 | 2140 |
2141 | 2141 |
2142 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { | 2142 LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) { |
2143 HEnvironment* env = current_block_->last_environment(); | 2143 HEnvironment* env = current_block_->last_environment(); |
2144 ASSERT(env != NULL); | 2144 ASSERT(env != NULL); |
2145 | 2145 |
2146 env->set_ast_id(instr->ast_id()); | 2146 env->set_ast_id(instr->ast_id()); |
2147 | 2147 |
2148 env->Drop(instr->pop_count()); | 2148 env->Drop(instr->pop_count()); |
2149 for (int i = 0; i < instr->values()->length(); ++i) { | 2149 for (int i = instr->values()->length() - 1; i >= 0; --i) { |
2150 HValue* value = instr->values()->at(i); | 2150 HValue* value = instr->values()->at(i); |
2151 if (instr->HasAssignedIndexAt(i)) { | 2151 if (instr->HasAssignedIndexAt(i)) { |
2152 env->Bind(instr->GetAssignedIndexAt(i), value); | 2152 env->Bind(instr->GetAssignedIndexAt(i), value); |
2153 } else { | 2153 } else { |
2154 env->Push(value); | 2154 env->Push(value); |
2155 } | 2155 } |
2156 } | 2156 } |
2157 | 2157 |
2158 // If there is an instruction pending deoptimization environment create a | 2158 // If there is an instruction pending deoptimization environment create a |
2159 // lazy bailout instruction to capture the environment. | 2159 // lazy bailout instruction to capture the environment. |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2253 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2253 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2254 LOperand* object = UseRegister(instr->object()); | 2254 LOperand* object = UseRegister(instr->object()); |
2255 LOperand* index = UseTempRegister(instr->index()); | 2255 LOperand* index = UseTempRegister(instr->index()); |
2256 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2256 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2257 } | 2257 } |
2258 | 2258 |
2259 | 2259 |
2260 } } // namespace v8::internal | 2260 } } // namespace v8::internal |
2261 | 2261 |
2262 #endif // V8_TARGET_ARCH_X64 | 2262 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |