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

Side by Side Diff: src/x64/lithium-codegen-x64.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
« no previous file with comments | « src/ppc/lithium-ppc.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
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 5143 matching lines...) Expand 10 before | Expand all | Expand 10 after
5154 5154
5155 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { 5155 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
5156 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 5156 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
5157 LOperand* input = instr->value(); 5157 LOperand* input = instr->value();
5158 Condition cc = masm()->CheckSmi(ToRegister(input)); 5158 Condition cc = masm()->CheckSmi(ToRegister(input));
5159 DeoptimizeIf(cc, instr, Deoptimizer::kSmi); 5159 DeoptimizeIf(cc, instr, Deoptimizer::kSmi);
5160 } 5160 }
5161 } 5161 }
5162 5162
5163 5163
5164 void LCodeGen::DoCheckArrayBufferNotNeutered(
5165 LCheckArrayBufferNotNeutered* instr) {
5166 Register view = ToRegister(instr->view());
5167
5168 Label has_no_buffer;
5169 __ movp(kScratchRegister,
5170 FieldOperand(view, JSArrayBufferView::kBufferOffset));
5171 __ JumpIfSmi(kScratchRegister, &has_no_buffer);
5172 __ testb(FieldOperand(kScratchRegister, JSArrayBuffer::kBitFieldOffset),
5173 Immediate(1 << JSArrayBuffer::WasNeutered::kShift));
5174 DeoptimizeIf(not_zero, instr, Deoptimizer::kOutOfBounds);
Sven Panne 2015/04/28 13:45:16 Would it be worth introducing a new deopt message
5175
5176 __ bind(&has_no_buffer);
5177 }
5178
5179
5164 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 5180 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
5165 Register input = ToRegister(instr->value()); 5181 Register input = ToRegister(instr->value());
5166 5182
5167 __ movp(kScratchRegister, FieldOperand(input, HeapObject::kMapOffset)); 5183 __ movp(kScratchRegister, FieldOperand(input, HeapObject::kMapOffset));
5168 5184
5169 if (instr->hydrogen()->is_interval_check()) { 5185 if (instr->hydrogen()->is_interval_check()) {
5170 InstanceType first; 5186 InstanceType first;
5171 InstanceType last; 5187 InstanceType last;
5172 instr->hydrogen()->GetCheckInterval(&first, &last); 5188 instr->hydrogen()->GetCheckInterval(&first, &last);
5173 5189
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
5933 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5949 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5934 RecordSafepoint(Safepoint::kNoLazyDeopt); 5950 RecordSafepoint(Safepoint::kNoLazyDeopt);
5935 } 5951 }
5936 5952
5937 5953
5938 #undef __ 5954 #undef __
5939 5955
5940 } } // namespace v8::internal 5956 } } // namespace v8::internal
5941 5957
5942 #endif // V8_TARGET_ARCH_X64 5958 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ppc/lithium-ppc.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698