Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1032 | 1032 |
| 1033 | 1033 |
| 1034 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 1034 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 1035 HValue* v = instr->value(); | 1035 HValue* v = instr->value(); |
| 1036 if (v->EmitAtUses()) { | 1036 if (v->EmitAtUses()) { |
| 1037 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() | 1037 HBasicBlock* successor = HConstant::cast(v)->ToBoolean() |
| 1038 ? instr->FirstSuccessor() | 1038 ? instr->FirstSuccessor() |
| 1039 : instr->SecondSuccessor(); | 1039 : instr->SecondSuccessor(); |
| 1040 return new LGoto(successor->block_id()); | 1040 return new LGoto(successor->block_id()); |
| 1041 } | 1041 } |
| 1042 return new LBranch(UseRegisterAtStart(v)); | 1042 LInstruction* branch = new LBranch(UseRegister(v)); |
| 1043 // When we handle all cases, we never deopt, so we don't need to assign the | |
| 1044 // environment then. | |
|
Erik Corry
2011/08/05 12:50:46
Do we hit this case in the tests?
I would guess i
Sven Panne
2011/08/09 07:58:21
Currently it happens quite often, because we fall
| |
| 1045 bool all_cases_handled = instr->expected_input_types().IsAll(); | |
| 1046 return all_cases_handled ? branch : AssignEnvironment(branch); | |
| 1043 } | 1047 } |
| 1044 | 1048 |
| 1045 | 1049 |
| 1046 | 1050 |
| 1047 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { | 1051 LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) { |
| 1048 ASSERT(instr->value()->representation().IsTagged()); | 1052 ASSERT(instr->value()->representation().IsTagged()); |
| 1049 LOperand* value = UseRegisterAtStart(instr->value()); | 1053 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1050 LOperand* temp = TempRegister(); | 1054 LOperand* temp = TempRegister(); |
| 1051 return new LCmpMapAndBranch(value, temp); | 1055 return new LCmpMapAndBranch(value, temp); |
| 1052 } | 1056 } |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2188 | 2192 |
| 2189 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2193 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
| 2190 LOperand* key = UseRegisterAtStart(instr->key()); | 2194 LOperand* key = UseRegisterAtStart(instr->key()); |
| 2191 LOperand* object = UseRegisterAtStart(instr->object()); | 2195 LOperand* object = UseRegisterAtStart(instr->object()); |
| 2192 LIn* result = new LIn(key, object); | 2196 LIn* result = new LIn(key, object); |
| 2193 return MarkAsCall(DefineFixed(result, r0), instr); | 2197 return MarkAsCall(DefineFixed(result, r0), instr); |
| 2194 } | 2198 } |
| 2195 | 2199 |
| 2196 | 2200 |
| 2197 } } // namespace v8::internal | 2201 } } // namespace v8::internal |
| OLD | NEW |