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

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

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/vm/exceptions.cc ('k') | runtime/vm/intrinsifier.h » ('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 "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/code_descriptors.h" 8 #include "vm/code_descriptors.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 return kDynamicCid; 1812 return kDynamicCid;
1813 } 1813 }
1814 1814
1815 if (node->constructor().IsFactory()) { 1815 if (node->constructor().IsFactory()) {
1816 if ((function_class.Name() == Symbols::List().raw()) && 1816 if ((function_class.Name() == Symbols::List().raw()) &&
1817 (function.name() == Symbols::ListFactory().raw())) { 1817 (function.name() == Symbols::ListFactory().raw())) {
1818 // If there are no arguments then the result is guaranteed to be a 1818 // If there are no arguments then the result is guaranteed to be a
1819 // GrowableObjectArray. However if there is an argument the result 1819 // GrowableObjectArray. However if there is an argument the result
1820 // is not guaranteed to be a fixed size array because the argument 1820 // is not guaranteed to be a fixed size array because the argument
1821 // can be null. 1821 // can be null.
1822 if (node->arguments()->length() == 0) { 1822 return kGrowableObjectArrayCid;
1823 return kGrowableObjectArrayCid;
1824 }
1825 } else { 1823 } else {
1826 if (IsRecognizedConstructor(function, Symbols::ObjectArray()) && 1824 if (IsRecognizedConstructor(function, Symbols::ObjectArray()) &&
1827 (node->arguments()->length() == 1)) { 1825 (node->arguments()->length() == 1)) {
1828 return kArrayCid; 1826 return kArrayCid;
1829 } else if (IsRecognizedConstructor(function, 1827 } else if (IsRecognizedConstructor(function,
1830 Symbols::GrowableObjectArray()) && 1828 Symbols::GrowableObjectArray()) &&
1831 (node->arguments()->length() == 0)) { 1829 (node->arguments()->length() == 0)) {
1832 return kGrowableObjectArrayCid; 1830 return kGrowableObjectArrayCid;
1833 } 1831 }
1834 } 1832 }
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
3071 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3069 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3072 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3070 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3073 OS::SNPrint(chars, len, kFormat, function_name, reason); 3071 OS::SNPrint(chars, len, kFormat, function_name, reason);
3074 const Error& error = Error::Handle( 3072 const Error& error = Error::Handle(
3075 LanguageError::New(String::Handle(String::New(chars)))); 3073 LanguageError::New(String::Handle(String::New(chars))));
3076 Isolate::Current()->long_jump_base()->Jump(1, error); 3074 Isolate::Current()->long_jump_base()->Jump(1, error);
3077 } 3075 }
3078 3076
3079 3077
3080 } // namespace dart 3078 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/intrinsifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698