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

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 14265015: Do not set growable array length unnecessarily. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 } 2072 }
2073 2073
2074 2074
2075 // List of recognized list factories in core lib: 2075 // List of recognized list factories in core lib:
2076 // (factory-name-symbol, result-cid, fingerprint). 2076 // (factory-name-symbol, result-cid, fingerprint).
2077 // TODO(srdjan): Store the values in the snapshot instead. 2077 // TODO(srdjan): Store the values in the snapshot instead.
2078 // TODO(srdjan): Add Float32x4List. 2078 // TODO(srdjan): Add Float32x4List.
2079 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ 2079 #define RECOGNIZED_LIST_FACTORY_LIST(V) \
2080 V(ObjectArrayFactory, kArrayCid, 97987288) \ 2080 V(ObjectArrayFactory, kArrayCid, 97987288) \
2081 V(GrowableObjectArrayWithData, kGrowableObjectArrayCid, 816132033) \ 2081 V(GrowableObjectArrayWithData, kGrowableObjectArrayCid, 816132033) \
2082 V(GrowableObjectArrayFactory, kGrowableObjectArrayCid, 369608996) \ 2082 V(GrowableObjectArrayFactory, kGrowableObjectArrayCid, 552407276) \
2083 V(Int8ListFactory, kTypedDataInt8ArrayCid, 2066002614) \ 2083 V(Int8ListFactory, kTypedDataInt8ArrayCid, 2066002614) \
2084 V(Uint8ListFactory, kTypedDataUint8ArrayCid, 1883551322) \ 2084 V(Uint8ListFactory, kTypedDataUint8ArrayCid, 1883551322) \
2085 V(Uint8ClampedListFactory, kTypedDataUint8ClampedArrayCid, 244333676) \ 2085 V(Uint8ClampedListFactory, kTypedDataUint8ClampedArrayCid, 244333676) \
2086 V(Int16ListFactory, kTypedDataInt16ArrayCid, 335889889) \ 2086 V(Int16ListFactory, kTypedDataInt16ArrayCid, 335889889) \
2087 V(Uint16ListFactory, kTypedDataUint16ArrayCid, 1552801708) \ 2087 V(Uint16ListFactory, kTypedDataUint16ArrayCid, 1552801708) \
2088 V(Int32ListFactory, kTypedDataInt32ArrayCid, 1615677219) \ 2088 V(Int32ListFactory, kTypedDataInt32ArrayCid, 1615677219) \
2089 V(Uint32ListFactory, kTypedDataUint32ArrayCid, 1239540305) \ 2089 V(Uint32ListFactory, kTypedDataUint32ArrayCid, 1239540305) \
2090 V(Int64ListFactory, kTypedDataInt64ArrayCid, 993438946) \ 2090 V(Int64ListFactory, kTypedDataInt64ArrayCid, 993438946) \
2091 V(Uint64ListFactory, kTypedDataUint64ArrayCid, 1830907325) \ 2091 V(Uint64ListFactory, kTypedDataUint64ArrayCid, 1830907325) \
2092 V(Float64ListFactory, kTypedDataFloat64ArrayCid, 1236037424) \ 2092 V(Float64ListFactory, kTypedDataFloat64ArrayCid, 1236037424) \
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
3407 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3407 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3408 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3408 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3409 OS::SNPrint(chars, len, kFormat, function_name, reason); 3409 OS::SNPrint(chars, len, kFormat, function_name, reason);
3410 const Error& error = Error::Handle( 3410 const Error& error = Error::Handle(
3411 LanguageError::New(String::Handle(String::New(chars)))); 3411 LanguageError::New(String::Handle(String::New(chars))));
3412 Isolate::Current()->long_jump_base()->Jump(1, error); 3412 Isolate::Current()->long_jump_base()->Jump(1, error);
3413 } 3413 }
3414 3414
3415 3415
3416 } // namespace dart 3416 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698