| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 5150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5161 | 5161 |
| 5162 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { | 5162 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
| 5163 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 5163 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
| 5164 LOperand* input = instr->value(); | 5164 LOperand* input = instr->value(); |
| 5165 __ SmiTst(ToRegister(input), at); | 5165 __ SmiTst(ToRegister(input), at); |
| 5166 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, at, Operand(zero_reg)); | 5166 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, at, Operand(zero_reg)); |
| 5167 } | 5167 } |
| 5168 } | 5168 } |
| 5169 | 5169 |
| 5170 | 5170 |
| 5171 void LCodeGen::DoCheckArrayBufferNotNeutered( |
| 5172 LCheckArrayBufferNotNeutered* instr) { |
| 5173 Register view = ToRegister(instr->view()); |
| 5174 Register scratch = scratch0(); |
| 5175 |
| 5176 Label has_no_buffer; |
| 5177 __ lw(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); |
| 5178 __ JumpIfSmi(scratch, &has_no_buffer); |
| 5179 __ lw(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); |
| 5180 __ And(at, scratch, 1 << JSArrayBuffer::WasNeutered::kShift); |
| 5181 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds); |
| 5182 |
| 5183 __ bind(&has_no_buffer); |
| 5184 } |
| 5185 |
| 5186 |
| 5171 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 5187 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
| 5172 Register input = ToRegister(instr->value()); | 5188 Register input = ToRegister(instr->value()); |
| 5173 Register scratch = scratch0(); | 5189 Register scratch = scratch0(); |
| 5174 | 5190 |
| 5175 __ GetObjectType(input, scratch, scratch); | 5191 __ GetObjectType(input, scratch, scratch); |
| 5176 | 5192 |
| 5177 if (instr->hydrogen()->is_interval_check()) { | 5193 if (instr->hydrogen()->is_interval_check()) { |
| 5178 InstanceType first; | 5194 InstanceType first; |
| 5179 InstanceType last; | 5195 InstanceType last; |
| 5180 instr->hydrogen()->GetCheckInterval(&first, &last); | 5196 instr->hydrogen()->GetCheckInterval(&first, &last); |
| (...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5981 __ li(at, scope_info); | 5997 __ li(at, scope_info); |
| 5982 __ Push(at, ToRegister(instr->function())); | 5998 __ Push(at, ToRegister(instr->function())); |
| 5983 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5999 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5984 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6000 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5985 } | 6001 } |
| 5986 | 6002 |
| 5987 | 6003 |
| 5988 #undef __ | 6004 #undef __ |
| 5989 | 6005 |
| 5990 } } // namespace v8::internal | 6006 } } // namespace v8::internal |
| OLD | NEW |