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

Side by Side Diff: src/builtins.cc

Issue 1914463003: Fix bit field access for 64-bit big-endian architectures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/once.h" 10 #include "src/base/once.h"
(...skipping 5143 matching lines...) Expand 10 before | Expand all | Expand 10 after
5154 a->Branch(a->WordEqual(a->LoadInstanceType(tagged), 5154 a->Branch(a->WordEqual(a->LoadInstanceType(tagged),
5155 a->Int32Constant(JS_TYPED_ARRAY_TYPE)), 5155 a->Int32Constant(JS_TYPED_ARRAY_TYPE)),
5156 &is_typed_array, &not_typed_array); 5156 &is_typed_array, &not_typed_array);
5157 a->Bind(&not_typed_array); 5157 a->Bind(&not_typed_array);
5158 a->Goto(&invalid); 5158 a->Goto(&invalid);
5159 5159
5160 // Fail if the array's JSArrayBuffer is not shared. 5160 // Fail if the array's JSArrayBuffer is not shared.
5161 a->Bind(&is_typed_array); 5161 a->Bind(&is_typed_array);
5162 Node* array_buffer = a->LoadObjectField(tagged, JSTypedArray::kBufferOffset); 5162 Node* array_buffer = a->LoadObjectField(tagged, JSTypedArray::kBufferOffset);
5163 Node* is_buffer_shared = a->BitFieldDecode<JSArrayBuffer::IsShared>( 5163 Node* is_buffer_shared = a->BitFieldDecode<JSArrayBuffer::IsShared>(
5164 a->LoadObjectField(array_buffer, JSArrayBuffer::kBitFieldOffset)); 5164 a->LoadObjectField(array_buffer, JSArrayBuffer::kBitFieldSlot));
5165 a->Branch(is_buffer_shared, &is_shared, &not_shared); 5165 a->Branch(is_buffer_shared, &is_shared, &not_shared);
5166 a->Bind(&not_shared); 5166 a->Bind(&not_shared);
5167 a->Goto(&invalid); 5167 a->Goto(&invalid);
5168 5168
5169 // Fail if the array's element type is float32, float64 or clamped. 5169 // Fail if the array's element type is float32, float64 or clamped.
5170 a->Bind(&is_shared); 5170 a->Bind(&is_shared);
5171 Node* elements_instance_type = a->LoadInstanceType( 5171 Node* elements_instance_type = a->LoadInstanceType(
5172 a->LoadObjectField(tagged, JSObject::kElementsOffset)); 5172 a->LoadObjectField(tagged, JSObject::kElementsOffset));
5173 STATIC_ASSERT(FIXED_INT8_ARRAY_TYPE < FIXED_FLOAT32_ARRAY_TYPE); 5173 STATIC_ASSERT(FIXED_INT8_ARRAY_TYPE < FIXED_FLOAT32_ARRAY_TYPE);
5174 STATIC_ASSERT(FIXED_INT16_ARRAY_TYPE < FIXED_FLOAT32_ARRAY_TYPE); 5174 STATIC_ASSERT(FIXED_INT16_ARRAY_TYPE < FIXED_FLOAT32_ARRAY_TYPE);
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
5346 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) 5346 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T)
5347 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 5347 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
5348 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 5348 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
5349 #undef DEFINE_BUILTIN_ACCESSOR_C 5349 #undef DEFINE_BUILTIN_ACCESSOR_C
5350 #undef DEFINE_BUILTIN_ACCESSOR_A 5350 #undef DEFINE_BUILTIN_ACCESSOR_A
5351 #undef DEFINE_BUILTIN_ACCESSOR_T 5351 #undef DEFINE_BUILTIN_ACCESSOR_T
5352 #undef DEFINE_BUILTIN_ACCESSOR_H 5352 #undef DEFINE_BUILTIN_ACCESSOR_H
5353 5353
5354 } // namespace internal 5354 } // namespace internal
5355 } // namespace v8 5355 } // 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