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

Side by Side Diff: src/hydrogen.cc

Issue 1158193004: Revert of Re-enable on-heap typed array allocation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 9709 matching lines...) Expand 10 before | Expand all | Expand 10 after
9720 context(), nullptr, 9720 context(), nullptr,
9721 HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX)); 9721 HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX));
9722 HValue* native_context = Add<HLoadNamedField>( 9722 HValue* native_context = Add<HLoadNamedField>(
9723 global_object, nullptr, HObjectAccess::ForGlobalObjectNativeContext()); 9723 global_object, nullptr, HObjectAccess::ForGlobalObjectNativeContext());
9724 Add<HStoreNamedField>( 9724 Add<HStoreNamedField>(
9725 result, HObjectAccess::ForMap(), 9725 result, HObjectAccess::ForMap(),
9726 Add<HLoadNamedField>( 9726 Add<HLoadNamedField>(
9727 native_context, nullptr, 9727 native_context, nullptr,
9728 HObjectAccess::ForContextSlot(Context::ARRAY_BUFFER_MAP_INDEX))); 9728 HObjectAccess::ForContextSlot(Context::ARRAY_BUFFER_MAP_INDEX)));
9729 9729
9730 HConstant* empty_fixed_array = 9730 Add<HStoreNamedField>(result, HObjectAccess::ForJSArrayBufferBackingStore(),
9731 Add<HConstant>(isolate()->factory()->empty_fixed_array()); 9731 Add<HConstant>(ExternalReference()));
9732 Add<HStoreNamedField>(
9733 result, HObjectAccess::ForJSArrayOffset(JSArray::kPropertiesOffset),
9734 empty_fixed_array);
9735 Add<HStoreNamedField>(
9736 result, HObjectAccess::ForJSArrayOffset(JSArray::kElementsOffset),
9737 empty_fixed_array);
9738 Add<HStoreNamedField>(
9739 result, HObjectAccess::ForJSArrayBufferBackingStore().WithRepresentation(
9740 Representation::Smi()),
9741 graph()->GetConstant0());
9742 Add<HStoreNamedField>(result, HObjectAccess::ForJSArrayBufferByteLength(), 9732 Add<HStoreNamedField>(result, HObjectAccess::ForJSArrayBufferByteLength(),
9743 byte_length); 9733 byte_length);
9744 Add<HStoreNamedField>(result, HObjectAccess::ForJSArrayBufferBitFieldSlot(), 9734 Add<HStoreNamedField>(result, HObjectAccess::ForJSArrayBufferBitFieldSlot(),
9745 graph()->GetConstant0()); 9735 graph()->GetConstant0());
9746 Add<HStoreNamedField>( 9736 Add<HStoreNamedField>(
9747 result, HObjectAccess::ForJSArrayBufferBitField(), 9737 result, HObjectAccess::ForJSArrayBufferBitField(),
9748 Add<HConstant>((1 << JSArrayBuffer::IsExternal::kShift) | 9738 Add<HConstant>((1 << JSArrayBuffer::IsExternal::kShift) |
9749 (1 << JSArrayBuffer::IsNeuterable::kShift))); 9739 (1 << JSArrayBuffer::IsNeuterable::kShift)));
9750 9740
9751 for (int field = 0; field < v8::ArrayBuffer::kInternalFieldCount; ++field) { 9741 for (int field = 0; field < v8::ArrayBuffer::kInternalFieldCount; ++field) {
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
9938 static const int kBufferArg = 2; 9928 static const int kBufferArg = 2;
9939 static const int kByteOffsetArg = 3; 9929 static const int kByteOffsetArg = 3;
9940 static const int kByteLengthArg = 4; 9930 static const int kByteLengthArg = 4;
9941 static const int kArgsLength = 5; 9931 static const int kArgsLength = 5;
9942 DCHECK(arguments->length() == kArgsLength); 9932 DCHECK(arguments->length() == kArgsLength);
9943 9933
9944 9934
9945 CHECK_ALIVE(VisitForValue(arguments->at(kObjectArg))); 9935 CHECK_ALIVE(VisitForValue(arguments->at(kObjectArg)));
9946 HValue* obj = Pop(); 9936 HValue* obj = Pop();
9947 9937
9948 if (!arguments->at(kArrayIdArg)->IsLiteral()) { 9938 if (arguments->at(kArrayIdArg)->IsLiteral()) {
9949 // This should never happen in real use, but can happen when fuzzing. 9939 // This should never happen in real use, but can happen when fuzzing.
9950 // Just bail out. 9940 // Just bail out.
9951 Bailout(kNeedSmiLiteral); 9941 Bailout(kNeedSmiLiteral);
9952 return; 9942 return;
9953 } 9943 }
9954 Handle<Object> value = 9944 Handle<Object> value =
9955 static_cast<Literal*>(arguments->at(kArrayIdArg))->value(); 9945 static_cast<Literal*>(arguments->at(kArrayIdArg))->value();
9956 if (!value->IsSmi()) { 9946 if (!value->IsSmi()) {
9957 // This should never happen in real use, but can happen when fuzzing. 9947 // This should never happen in real use, but can happen when fuzzing.
9958 // Just bail out. 9948 // Just bail out.
(...skipping 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after
13147 if (ShouldProduceTraceOutput()) { 13137 if (ShouldProduceTraceOutput()) {
13148 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13138 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13149 } 13139 }
13150 13140
13151 #ifdef DEBUG 13141 #ifdef DEBUG
13152 graph_->Verify(false); // No full verify. 13142 graph_->Verify(false); // No full verify.
13153 #endif 13143 #endif
13154 } 13144 }
13155 13145
13156 } } // namespace v8::internal 13146 } } // namespace v8::internal
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