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 5215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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( | 5231 void LCodeGen::DoCheckArrayBufferNotNeutered( |
5232 LCheckArrayBufferNotNeutered* instr) { | 5232 LCheckArrayBufferNotNeutered* instr) { |
5233 Register view = ToRegister(instr->view()); | 5233 Register view = ToRegister(instr->view()); |
5234 Register scratch = scratch0(); | 5234 Register scratch = scratch0(); |
5235 | 5235 |
5236 Label has_no_buffer; | |
5237 __ ld(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); | 5236 __ ld(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset)); |
5238 __ JumpIfSmi(scratch, &has_no_buffer); | |
5239 __ lw(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); | 5237 __ lw(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset)); |
5240 __ And(at, scratch, 1 << JSArrayBuffer::WasNeutered::kShift); | 5238 __ And(at, scratch, 1 << JSArrayBuffer::WasNeutered::kShift); |
5241 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds, at, Operand(zero_reg)); | 5239 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds, at, Operand(zero_reg)); |
5242 | |
5243 __ bind(&has_no_buffer); | |
5244 } | 5240 } |
5245 | 5241 |
5246 | 5242 |
5247 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { | 5243 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
5248 Register input = ToRegister(instr->value()); | 5244 Register input = ToRegister(instr->value()); |
5249 Register scratch = scratch0(); | 5245 Register scratch = scratch0(); |
5250 | 5246 |
5251 __ GetObjectType(input, scratch, scratch); | 5247 __ GetObjectType(input, scratch, scratch); |
5252 | 5248 |
5253 if (instr->hydrogen()->is_interval_check()) { | 5249 if (instr->hydrogen()->is_interval_check()) { |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6058 __ li(at, scope_info); | 6054 __ li(at, scope_info); |
6059 __ Push(at, ToRegister(instr->function())); | 6055 __ Push(at, ToRegister(instr->function())); |
6060 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6056 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6061 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6057 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6062 } | 6058 } |
6063 | 6059 |
6064 | 6060 |
6065 #undef __ | 6061 #undef __ |
6066 | 6062 |
6067 } } // namespace v8::internal | 6063 } } // namespace v8::internal |
OLD | NEW |