| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 5210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5221 | 5221 |
| 5222 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { | 5222 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { |
| 5223 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 5223 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
| 5224 LOperand* input = instr->value(); | 5224 LOperand* input = instr->value(); |
| 5225 __ SmiTst(ToRegister(input), at); | 5225 __ SmiTst(ToRegister(input), at); |
| 5226 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, at, Operand(zero_reg)); | 5226 DeoptimizeIf(eq, instr, Deoptimizer::kSmi, at, Operand(zero_reg)); |
| 5227 } | 5227 } |
| 5228 } | 5228 } |
| 5229 | 5229 |
| 5230 | 5230 |
| 5231 void LCodeGen::DoCheckArrayBufferNotNeutered( |
| 5232 LCheckArrayBufferNotNeutered* instr) { |
| 5233 Register view = ToRegister(instr->view()); |
| 5234 Register scratch = scratch0(); |
| 5235 |
| 5236 Label has_no_buffer; |
| 5237 __ lw(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); |
| 5238 __ JumpIfSmi(scratch, &has_no_buffer); |
| 5239 __ lw(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); |
| 5240 __ And(at, scratch, 1 << JSArrayBuffer::WasNeutered::kShift); |
| 5241 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds); |
| 5242 |
| 5243 __ bind(&has_no_buffer); |
| 5244 } |
| 5245 |
| 5246 |
| 5231 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 5247 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
| 5232 Register input = ToRegister(instr->value()); | 5248 Register input = ToRegister(instr->value()); |
| 5233 Register scratch = scratch0(); | 5249 Register scratch = scratch0(); |
| 5234 | 5250 |
| 5235 __ GetObjectType(input, scratch, scratch); | 5251 __ GetObjectType(input, scratch, scratch); |
| 5236 | 5252 |
| 5237 if (instr->hydrogen()->is_interval_check()) { | 5253 if (instr->hydrogen()->is_interval_check()) { |
| 5238 InstanceType first; | 5254 InstanceType first; |
| 5239 InstanceType last; | 5255 InstanceType last; |
| 5240 instr->hydrogen()->GetCheckInterval(&first, &last); | 5256 instr->hydrogen()->GetCheckInterval(&first, &last); |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6042 __ li(at, scope_info); | 6058 __ li(at, scope_info); |
| 6043 __ Push(at, ToRegister(instr->function())); | 6059 __ Push(at, ToRegister(instr->function())); |
| 6044 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6060 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6045 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6061 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6046 } | 6062 } |
| 6047 | 6063 |
| 6048 | 6064 |
| 6049 #undef __ | 6065 #undef __ |
| 6050 | 6066 |
| 6051 } } // namespace v8::internal | 6067 } } // namespace v8::internal |
| OLD | NEW |