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

Side by Side Diff: src/x87/lithium-codegen-x87.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 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
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 5458 matching lines...) Expand 10 before | Expand all | Expand 10 after
5469 5469
5470 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { 5470 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
5471 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 5471 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
5472 LOperand* input = instr->value(); 5472 LOperand* input = instr->value();
5473 __ test(ToOperand(input), Immediate(kSmiTagMask)); 5473 __ test(ToOperand(input), Immediate(kSmiTagMask));
5474 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); 5474 DeoptimizeIf(zero, instr, Deoptimizer::kSmi);
5475 } 5475 }
5476 } 5476 }
5477 5477
5478 5478
5479 void LCodeGen::DoCheckArrayBufferNotNeutered(
5480 LCheckArrayBufferNotNeutered* instr) {
5481 Register view = ToRegister(instr->view());
5482 Register scratch = ToRegister(instr->scratch());
5483
5484 Label has_no_buffer;
5485 __ mov(scratch, FieldOperand(view, JSArrayBufferView::kBufferOffset));
5486 __ JumpIfSmi(scratch, &has_no_buffer);
5487 __ test_b(FieldOperand(scratch, JSArrayBuffer::kBitFieldOffset),
5488 1 << JSArrayBuffer::WasNeutered::kShift);
5489 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds);
5490
5491 __ bind(&has_no_buffer);
5492 }
5493
5494
5479 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 5495 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
5480 Register input = ToRegister(instr->value()); 5496 Register input = ToRegister(instr->value());
5481 Register temp = ToRegister(instr->temp()); 5497 Register temp = ToRegister(instr->temp());
5482 5498
5483 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); 5499 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset));
5484 5500
5485 if (instr->hydrogen()->is_interval_check()) { 5501 if (instr->hydrogen()->is_interval_check()) {
5486 InstanceType first; 5502 InstanceType first;
5487 InstanceType last; 5503 InstanceType last;
5488 instr->hydrogen()->GetCheckInterval(&first, &last); 5504 instr->hydrogen()->GetCheckInterval(&first, &last);
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
6347 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6363 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6348 RecordSafepoint(Safepoint::kNoLazyDeopt); 6364 RecordSafepoint(Safepoint::kNoLazyDeopt);
6349 } 6365 }
6350 6366
6351 6367
6352 #undef __ 6368 #undef __
6353 6369
6354 } } // namespace v8::internal 6370 } } // namespace v8::internal
6355 6371
6356 #endif // V8_TARGET_ARCH_X87 6372 #endif // V8_TARGET_ARCH_X87
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698