Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 1108313003: Add HArrayBufferNotNeutered instruction (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 5136 matching lines...) Expand 10 before | Expand all | Expand 10 after
5147 5147
5148 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { 5148 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
5149 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 5149 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
5150 LOperand* input = instr->value(); 5150 LOperand* input = instr->value();
5151 __ SmiTst(ToRegister(input)); 5151 __ SmiTst(ToRegister(input));
5152 DeoptimizeIf(eq, instr, Deoptimizer::kSmi); 5152 DeoptimizeIf(eq, instr, Deoptimizer::kSmi);
5153 } 5153 }
5154 } 5154 }
5155 5155
5156 5156
5157 void LCodeGen::DoCheckArrayBufferNotNeutered(
5158 LCheckArrayBufferNotNeutered* instr) {
5159 Register view = ToRegister(instr->view());
5160 Register scratch = scratch0();
5161
5162 Label has_no_buffer;
5163 __ ldr(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset));
5164 __ JumpIfSmi(scratch, &has_no_buffer);
5165 __ ldr(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset));
5166 __ tst(scratch, Operand(1 << JSArrayBuffer::WasNeutered::kShift));
5167 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds);
5168
5169 __ bind(&has_no_buffer);
5170 }
5171
5172
5157 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 5173 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
5158 Register input = ToRegister(instr->value()); 5174 Register input = ToRegister(instr->value());
5159 Register scratch = scratch0(); 5175 Register scratch = scratch0();
5160 5176
5161 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); 5177 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset));
5162 __ ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); 5178 __ ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
5163 5179
5164 if (instr->hydrogen()->is_interval_check()) { 5180 if (instr->hydrogen()->is_interval_check()) {
5165 InstanceType first; 5181 InstanceType first;
5166 InstanceType last; 5182 InstanceType last;
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
5927 __ Push(scope_info); 5943 __ Push(scope_info);
5928 __ push(ToRegister(instr->function())); 5944 __ push(ToRegister(instr->function()));
5929 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5945 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5930 RecordSafepoint(Safepoint::kNoLazyDeopt); 5946 RecordSafepoint(Safepoint::kNoLazyDeopt);
5931 } 5947 }
5932 5948
5933 5949
5934 #undef __ 5950 #undef __
5935 5951
5936 } } // namespace v8::internal 5952 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698