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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1712163002: [builtins] Migrate the DataView constructor to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/crankshaft/hydrogen.h ('k') | src/js/typedarray.js » ('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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 10182 matching lines...) Expand 10 before | Expand all | Expand 10 after
10193 byte_offset); 10193 byte_offset);
10194 Add<HStoreNamedField>( 10194 Add<HStoreNamedField>(
10195 obj, 10195 obj,
10196 HObjectAccess::ForJSArrayBufferViewByteLength(), 10196 HObjectAccess::ForJSArrayBufferViewByteLength(),
10197 byte_length); 10197 byte_length);
10198 Add<HStoreNamedField>(obj, HObjectAccess::ForJSArrayBufferViewBuffer(), 10198 Add<HStoreNamedField>(obj, HObjectAccess::ForJSArrayBufferViewBuffer(),
10199 buffer); 10199 buffer);
10200 } 10200 }
10201 10201
10202 10202
10203 void HOptimizedGraphBuilder::GenerateDataViewInitialize(
10204 CallRuntime* expr) {
10205 ZoneList<Expression*>* arguments = expr->arguments();
10206
10207 DCHECK(arguments->length()== 4);
10208 CHECK_ALIVE(VisitForValue(arguments->at(0)));
10209 HValue* obj = Pop();
10210
10211 CHECK_ALIVE(VisitForValue(arguments->at(1)));
10212 HValue* buffer = Pop();
10213
10214 CHECK_ALIVE(VisitForValue(arguments->at(2)));
10215 HValue* byte_offset = Pop();
10216
10217 CHECK_ALIVE(VisitForValue(arguments->at(3)));
10218 HValue* byte_length = Pop();
10219
10220 {
10221 NoObservableSideEffectsScope scope(this);
10222 BuildArrayBufferViewInitialization<JSDataView>(
10223 obj, buffer, byte_offset, byte_length);
10224 }
10225 }
10226
10227
10228 HValue* HOptimizedGraphBuilder::BuildAllocateExternalElements( 10203 HValue* HOptimizedGraphBuilder::BuildAllocateExternalElements(
10229 ExternalArrayType array_type, 10204 ExternalArrayType array_type,
10230 bool is_zero_byte_offset, 10205 bool is_zero_byte_offset,
10231 HValue* buffer, HValue* byte_offset, HValue* length) { 10206 HValue* buffer, HValue* byte_offset, HValue* length) {
10232 Handle<Map> external_array_map( 10207 Handle<Map> external_array_map(
10233 isolate()->heap()->MapForFixedTypedArray(array_type)); 10208 isolate()->heap()->MapForFixedTypedArray(array_type));
10234 10209
10235 // The HForceRepresentation is to prevent possible deopt on int-smi 10210 // The HForceRepresentation is to prevent possible deopt on int-smi
10236 // conversion after allocation but before the new object fields are set. 10211 // conversion after allocation but before the new object fields are set.
10237 length = AddUncasted<HForceRepresentation>(length, Representation::Smi()); 10212 length = AddUncasted<HForceRepresentation>(length, Representation::Smi());
(...skipping 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after
13560 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13535 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13561 } 13536 }
13562 13537
13563 #ifdef DEBUG 13538 #ifdef DEBUG
13564 graph_->Verify(false); // No full verify. 13539 graph_->Verify(false); // No full verify.
13565 #endif 13540 #endif
13566 } 13541 }
13567 13542
13568 } // namespace internal 13543 } // namespace internal
13569 } // namespace v8 13544 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/js/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698