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

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

Issue 13932038: Mark Float32x4List as fixed length array. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Mark Float32x4List as fixed length array. 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 | « no previous file | runtime/vm/intermediate_language.cc » ('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 (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 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 case kTypedDataUint8ArrayCid: 1910 case kTypedDataUint8ArrayCid:
1911 case kTypedDataUint8ClampedArrayCid: 1911 case kTypedDataUint8ClampedArrayCid:
1912 case kTypedDataInt16ArrayCid: 1912 case kTypedDataInt16ArrayCid:
1913 case kTypedDataUint16ArrayCid: 1913 case kTypedDataUint16ArrayCid:
1914 case kTypedDataInt32ArrayCid: 1914 case kTypedDataInt32ArrayCid:
1915 case kTypedDataUint32ArrayCid: 1915 case kTypedDataUint32ArrayCid:
1916 case kTypedDataInt64ArrayCid: 1916 case kTypedDataInt64ArrayCid:
1917 case kTypedDataUint64ArrayCid: 1917 case kTypedDataUint64ArrayCid:
1918 case kTypedDataFloat32ArrayCid: 1918 case kTypedDataFloat32ArrayCid:
1919 case kTypedDataFloat64ArrayCid: 1919 case kTypedDataFloat64ArrayCid:
1920 case kTypedDataFloat32x4ArrayCid:
1920 return function_class.id(); 1921 return function_class.id();
1921 default: 1922 default:
1922 return kDynamicCid; // Unknown. 1923 return kDynamicCid; // Unknown.
1923 } 1924 }
1924 } 1925 }
1925 return kDynamicCid; 1926 return kDynamicCid;
1926 } 1927 }
1927 1928
1928 1929
1929 // <Expression> ::= StaticCall { function: Function 1930 // <Expression> ::= StaticCall { function: Function
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 Do(new StaticCallInstr(node->token_pos(), 2042 Do(new StaticCallInstr(node->token_pos(),
2042 node->constructor(), 2043 node->constructor(),
2043 node->arguments()->names(), 2044 node->arguments()->names(),
2044 arguments)); 2045 arguments));
2045 } 2046 }
2046 2047
2047 2048
2048 // List of recognized list factories in core lib: 2049 // List of recognized list factories in core lib:
2049 // (factory-name-symbol, result-cid, fingerprint). 2050 // (factory-name-symbol, result-cid, fingerprint).
2050 // TODO(srdjan): Store the values in the snapshot instead. 2051 // TODO(srdjan): Store the values in the snapshot instead.
2051 // TODO(srdjan): Add Float32x4List.
2052 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ 2052 #define RECOGNIZED_LIST_FACTORY_LIST(V) \
2053 V(ObjectArrayFactory, kArrayCid, 97987288) \ 2053 V(ObjectArrayFactory, kArrayCid, 97987288) \
2054 V(GrowableObjectArrayWithData, kGrowableObjectArrayCid, 816132033) \ 2054 V(GrowableObjectArrayWithData, kGrowableObjectArrayCid, 816132033) \
2055 V(GrowableObjectArrayFactory, kGrowableObjectArrayCid, 552407276) \ 2055 V(GrowableObjectArrayFactory, kGrowableObjectArrayCid, 552407276) \
2056 V(Int8ListFactory, kTypedDataInt8ArrayCid, 2066002614) \ 2056 V(Int8ListFactory, kTypedDataInt8ArrayCid, 2066002614) \
2057 V(Uint8ListFactory, kTypedDataUint8ArrayCid, 1883551322) \ 2057 V(Uint8ListFactory, kTypedDataUint8ArrayCid, 1883551322) \
2058 V(Uint8ClampedListFactory, kTypedDataUint8ClampedArrayCid, 244333676) \ 2058 V(Uint8ClampedListFactory, kTypedDataUint8ClampedArrayCid, 244333676) \
2059 V(Int16ListFactory, kTypedDataInt16ArrayCid, 335889889) \ 2059 V(Int16ListFactory, kTypedDataInt16ArrayCid, 335889889) \
2060 V(Uint16ListFactory, kTypedDataUint16ArrayCid, 1552801708) \ 2060 V(Uint16ListFactory, kTypedDataUint16ArrayCid, 1552801708) \
2061 V(Int32ListFactory, kTypedDataInt32ArrayCid, 1615677219) \ 2061 V(Int32ListFactory, kTypedDataInt32ArrayCid, 1615677219) \
2062 V(Uint32ListFactory, kTypedDataUint32ArrayCid, 1239540305) \ 2062 V(Uint32ListFactory, kTypedDataUint32ArrayCid, 1239540305) \
2063 V(Int64ListFactory, kTypedDataInt64ArrayCid, 993438946) \ 2063 V(Int64ListFactory, kTypedDataInt64ArrayCid, 993438946) \
2064 V(Uint64ListFactory, kTypedDataUint64ArrayCid, 1830907325) \ 2064 V(Uint64ListFactory, kTypedDataUint64ArrayCid, 1830907325) \
2065 V(Float64ListFactory, kTypedDataFloat64ArrayCid, 1236037424) \ 2065 V(Float64ListFactory, kTypedDataFloat64ArrayCid, 1236037424) \
2066 V(Float32ListFactory, kTypedDataFloat32ArrayCid, 570814412) \ 2066 V(Float32ListFactory, kTypedDataFloat32ArrayCid, 570814412) \
2067 V(Float32x4ListFactory, kTypedDataFloat32x4ArrayCid, 173774085) \
2067 2068
2068 2069
2069 // Class that recognizes factories and returns corresponding result cid. 2070 // Class that recognizes factories and returns corresponding result cid.
2070 class FactoryRecognizer : public AllStatic { 2071 class FactoryRecognizer : public AllStatic {
2071 public: 2072 public:
2072 // Return kDynamicCid if factory is not recognized. 2073 // Return kDynamicCid if factory is not recognized.
2073 static intptr_t ResultCid(const Function& factory) { 2074 static intptr_t ResultCid(const Function& factory) {
2074 ASSERT(factory.IsFactory()); 2075 ASSERT(factory.IsFactory());
2075 const Class& function_class = Class::Handle(factory.Owner()); 2076 const Class& function_class = Class::Handle(factory.Owner());
2076 const Library& lib = Library::Handle(function_class.library()); 2077 const Library& lib = Library::Handle(function_class.library());
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3380 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3381 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3381 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3382 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3382 OS::SNPrint(chars, len, kFormat, function_name, reason); 3383 OS::SNPrint(chars, len, kFormat, function_name, reason);
3383 const Error& error = Error::Handle( 3384 const Error& error = Error::Handle(
3384 LanguageError::New(String::Handle(String::New(chars)))); 3385 LanguageError::New(String::Handle(String::New(chars))));
3385 Isolate::Current()->long_jump_base()->Jump(1, error); 3386 Isolate::Current()->long_jump_base()->Jump(1, error);
3386 } 3387 }
3387 3388
3388 3389
3389 } // namespace dart 3390 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698