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

Side by Side Diff: src/builtins.cc

Issue 2102203002: [builtins] Fix LoadObjectField for JSTypedArray::kBufferOffset (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api-arguments.h" 7 #include "src/api-arguments.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/base/ieee754.h" 10 #include "src/base/ieee754.h"
(...skipping 3204 matching lines...) Expand 10 before | Expand all | Expand 10 after
3215 Node* receiver_instance_type = assembler->LoadInstanceType(receiver); 3215 Node* receiver_instance_type = assembler->LoadInstanceType(receiver);
3216 assembler->GotoUnless( 3216 assembler->GotoUnless(
3217 assembler->Word32Equal(receiver_instance_type, 3217 assembler->Word32Equal(receiver_instance_type,
3218 assembler->Int32Constant(JS_TYPED_ARRAY_TYPE)), 3218 assembler->Int32Constant(JS_TYPED_ARRAY_TYPE)),
3219 &if_receiverisincompatible); 3219 &if_receiverisincompatible);
3220 3220
3221 // Check if the {receiver}'s JSArrayBuffer was neutered. 3221 // Check if the {receiver}'s JSArrayBuffer was neutered.
3222 Node* receiver_buffer = 3222 Node* receiver_buffer =
3223 assembler->LoadObjectField(receiver, JSTypedArray::kBufferOffset); 3223 assembler->LoadObjectField(receiver, JSTypedArray::kBufferOffset);
3224 Node* receiver_buffer_bit_field = assembler->LoadObjectField( 3224 Node* receiver_buffer_bit_field = assembler->LoadObjectField(
3225 receiver_buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Int8()); 3225 receiver_buffer, JSArrayBuffer::kBitFieldOffset, MachineType::Uint32());
3226 Label if_receiverisneutered(assembler, Label::kDeferred); 3226 Label if_receiverisneutered(assembler, Label::kDeferred);
3227 assembler->GotoUnless( 3227 assembler->GotoUnless(
3228 assembler->Word32Equal( 3228 assembler->Word32Equal(
3229 assembler->Word32And( 3229 assembler->Word32And(
3230 receiver_buffer_bit_field, 3230 receiver_buffer_bit_field,
3231 assembler->Int32Constant(JSArrayBuffer::WasNeutered::kMask)), 3231 assembler->Int32Constant(JSArrayBuffer::WasNeutered::kMask)),
3232 assembler->Int32Constant(0)), 3232 assembler->Int32Constant(0)),
3233 &if_receiverisneutered); 3233 &if_receiverisneutered);
3234 assembler->Return(assembler->LoadObjectField(receiver, object_offset)); 3234 assembler->Return(assembler->LoadObjectField(receiver, object_offset));
3235 3235
(...skipping 2904 matching lines...) Expand 10 before | Expand all | Expand 10 after
6140 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 6140 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
6141 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 6141 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
6142 #undef DEFINE_BUILTIN_ACCESSOR_C 6142 #undef DEFINE_BUILTIN_ACCESSOR_C
6143 #undef DEFINE_BUILTIN_ACCESSOR_A 6143 #undef DEFINE_BUILTIN_ACCESSOR_A
6144 #undef DEFINE_BUILTIN_ACCESSOR_T 6144 #undef DEFINE_BUILTIN_ACCESSOR_T
6145 #undef DEFINE_BUILTIN_ACCESSOR_S 6145 #undef DEFINE_BUILTIN_ACCESSOR_S
6146 #undef DEFINE_BUILTIN_ACCESSOR_H 6146 #undef DEFINE_BUILTIN_ACCESSOR_H
6147 6147
6148 } // namespace internal 6148 } // namespace internal
6149 } // namespace v8 6149 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698