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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.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 2211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 } 2222 }
2223 2223
2224 2224
2225 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 2225 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
2226 Register value = ToRegister(instr->value()); 2226 Register value = ToRegister(instr->value());
2227 DCHECK(!instr->result() || ToRegister(instr->result()).Is(value)); 2227 DCHECK(!instr->result() || ToRegister(instr->result()).Is(value));
2228 DeoptimizeIfNotSmi(value, instr, Deoptimizer::kNotASmi); 2228 DeoptimizeIfNotSmi(value, instr, Deoptimizer::kNotASmi);
2229 } 2229 }
2230 2230
2231 2231
2232 void LCodeGen::DoCheckArrayBufferNotNeutered(
2233 LCheckArrayBufferNotNeutered* instr) {
2234 UseScratchRegisterScope temps(masm());
2235 Register view = ToRegister(instr->view());
2236 Register scratch = temps.AcquireX();
2237
2238 Label has_no_buffer;
2239 __ Ldr(scratch, FieldMemOperand(view, JSArrayBufferView::kBufferOffset));
2240 __ JumpIfSmi(scratch, &has_no_buffer);
2241 __ Ldr(scratch, FieldMemOperand(scratch, JSArrayBuffer::kBitFieldOffset));
2242 __ Tst(scratch, Operand(1 << JSArrayBuffer::WasNeutered::kShift));
2243 DeoptimizeIf(ne, instr, Deoptimizer::kOutOfBounds);
2244
2245 __ Bind(&has_no_buffer);
2246 }
2247
2248
2232 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 2249 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
2233 Register input = ToRegister(instr->value()); 2250 Register input = ToRegister(instr->value());
2234 Register scratch = ToRegister(instr->temp()); 2251 Register scratch = ToRegister(instr->temp());
2235 2252
2236 __ Ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); 2253 __ Ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset));
2237 __ Ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset)); 2254 __ Ldrb(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
2238 2255
2239 if (instr->hydrogen()->is_interval_check()) { 2256 if (instr->hydrogen()->is_interval_check()) {
2240 InstanceType first, last; 2257 InstanceType first, last;
2241 instr->hydrogen()->GetCheckInterval(&first, &last); 2258 instr->hydrogen()->GetCheckInterval(&first, &last);
(...skipping 3786 matching lines...) Expand 10 before | Expand all | Expand 10 after
6028 Handle<ScopeInfo> scope_info = instr->scope_info(); 6045 Handle<ScopeInfo> scope_info = instr->scope_info();
6029 __ Push(scope_info); 6046 __ Push(scope_info);
6030 __ Push(ToRegister(instr->function())); 6047 __ Push(ToRegister(instr->function()));
6031 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6048 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6032 RecordSafepoint(Safepoint::kNoLazyDeopt); 6049 RecordSafepoint(Safepoint::kNoLazyDeopt);
6033 } 6050 }
6034 6051
6035 6052
6036 6053
6037 } } // namespace v8::internal 6054 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/hydrogen.cc » ('j') | src/x64/lithium-codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698