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 5103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5114 } | 5114 } |
5115 } | 5115 } |
5116 | 5116 |
5117 | 5117 |
5118 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { | 5118 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { |
5119 Register reg = ToRegister(instr->value()); | 5119 Register reg = ToRegister(instr->value()); |
5120 Handle<JSFunction> target = instr->hydrogen()->target(); | 5120 Handle<JSFunction> target = instr->hydrogen()->target(); |
5121 AllowDeferredHandleDereference smi_check; | 5121 AllowDeferredHandleDereference smi_check; |
5122 if (isolate()->heap()->InNewSpace(*target)) { | 5122 if (isolate()->heap()->InNewSpace(*target)) { |
5123 Register reg = ToRegister(instr->value()); | 5123 Register reg = ToRegister(instr->value()); |
5124 Handle<Cell> cell = isolate()->factory()->NewPropertyCell(target); | 5124 Handle<Cell> cell = isolate()->factory()->NewCell(target); |
5125 __ li(at, Operand(Handle<Object>(cell))); | 5125 __ li(at, Operand(Handle<Object>(cell))); |
5126 __ lw(at, FieldMemOperand(at, Cell::kValueOffset)); | 5126 __ lw(at, FieldMemOperand(at, Cell::kValueOffset)); |
5127 DeoptimizeIf(ne, instr->environment(), reg, | 5127 DeoptimizeIf(ne, instr->environment(), reg, |
5128 Operand(at)); | 5128 Operand(at)); |
5129 } else { | 5129 } else { |
5130 DeoptimizeIf(ne, instr->environment(), reg, | 5130 DeoptimizeIf(ne, instr->environment(), reg, |
5131 Operand(target)); | 5131 Operand(target)); |
5132 } | 5132 } |
5133 } | 5133 } |
5134 | 5134 |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5797 __ Subu(scratch, result, scratch); | 5797 __ Subu(scratch, result, scratch); |
5798 __ lw(result, FieldMemOperand(scratch, | 5798 __ lw(result, FieldMemOperand(scratch, |
5799 FixedArray::kHeaderSize - kPointerSize)); | 5799 FixedArray::kHeaderSize - kPointerSize)); |
5800 __ bind(&done); | 5800 __ bind(&done); |
5801 } | 5801 } |
5802 | 5802 |
5803 | 5803 |
5804 #undef __ | 5804 #undef __ |
5805 | 5805 |
5806 } } // namespace v8::internal | 5806 } } // namespace v8::internal |
OLD | NEW |