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

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

Issue 9428015: Generic bound errors are static type errors not to be reported by the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | tests/co19/co19-runtime.status » ('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/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 6394 matching lines...) Expand 10 before | Expand all | Expand 10 after
6405 const Class& type_class, 6405 const Class& type_class,
6406 const AbstractTypeArguments& type_arguments, 6406 const AbstractTypeArguments& type_arguments,
6407 const Function& constructor, 6407 const Function& constructor,
6408 ArgumentListNode* arguments) { 6408 ArgumentListNode* arguments) {
6409 // +2 for implicit receiver and construction phase arguments. 6409 // +2 for implicit receiver and construction phase arguments.
6410 GrowableArray<const Object*> arg_values(arguments->length() + 2); 6410 GrowableArray<const Object*> arg_values(arguments->length() + 2);
6411 Instance& instance = Instance::Handle(); 6411 Instance& instance = Instance::Handle();
6412 if (!constructor.IsFactory()) { 6412 if (!constructor.IsFactory()) {
6413 instance = Instance::New(type_class); 6413 instance = Instance::New(type_class);
6414 if (!type_arguments.IsNull()) { 6414 if (!type_arguments.IsNull()) {
6415 // TODO(regis): Where should we check the type parameter bounds?
6416 if (!type_arguments.IsInstantiated()) { 6415 if (!type_arguments.IsInstantiated()) {
6417 ErrorMsg("type must be constant in const constructor"); 6416 ErrorMsg("type must be constant in const constructor");
6418 } 6417 }
6419 instance.SetTypeArguments(type_arguments); 6418 instance.SetTypeArguments(type_arguments);
6420 } 6419 }
6421 arg_values.Add(&instance); 6420 arg_values.Add(&instance);
6422 arg_values.Add(&Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll))); 6421 arg_values.Add(&Smi::ZoneHandle(Smi::New(Function::kCtorPhaseAll)));
6423 } else { 6422 } else {
6424 // Prepend type_arguments to list of arguments to factory. 6423 // Prepend type_arguments to list of arguments to factory.
6425 ASSERT(type_arguments.IsZoneHandle()); 6424 ASSERT(type_arguments.IsZoneHandle());
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
7861 void Parser::SkipQualIdent() { 7860 void Parser::SkipQualIdent() {
7862 ASSERT(IsIdentifier()); 7861 ASSERT(IsIdentifier());
7863 ConsumeToken(); 7862 ConsumeToken();
7864 if (CurrentToken() == Token::kPERIOD) { 7863 if (CurrentToken() == Token::kPERIOD) {
7865 ConsumeToken(); // Consume the kPERIOD token. 7864 ConsumeToken(); // Consume the kPERIOD token.
7866 ExpectIdentifier("identifier expected after '.'"); 7865 ExpectIdentifier("identifier expected after '.'");
7867 } 7866 }
7868 } 7867 }
7869 7868
7870 } // namespace dart 7869 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698