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

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

Issue 10882007: Re-enable checking of native resolvers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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') | 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/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 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 // Parser is at the opening parenthesis of the formal parameter 2062 // Parser is at the opening parenthesis of the formal parameter
2063 // declaration of the function or constructor. 2063 // declaration of the function or constructor.
2064 // Parse the formal parameters and code. 2064 // Parse the formal parameters and code.
2065 SequenceNode* Parser::ParseFunc(const Function& func, 2065 SequenceNode* Parser::ParseFunc(const Function& func,
2066 Array& default_parameter_values) { 2066 Array& default_parameter_values) {
2067 TRACE_PARSER("ParseFunc"); 2067 TRACE_PARSER("ParseFunc");
2068 Function& saved_innermost_function = 2068 Function& saved_innermost_function =
2069 Function::Handle(innermost_function().raw()); 2069 Function::Handle(innermost_function().raw());
2070 innermost_function_ = func.raw(); 2070 innermost_function_ = func.raw();
2071 2071
2072 // Check to ensure we don't have classes with native fields in libraries
2073 // which do not have a native resolver.
siva 2012/08/23 01:47:56 We should probably add a comment that we delay thi
regis 2012/08/23 03:26:05 Done.
2074 if (current_class().num_native_fields() != 0) {
2075 const Library& lib = Library::Handle(current_class().library());
2076 if (lib.native_entry_resolver() == NULL) {
2077 const String& cls_name = String::Handle(current_class().Name());
2078 const String& lib_name = String::Handle(lib.url());
2079 ErrorMsg(current_class().token_pos(),
2080 "class '%s' is trying to extend a native fields class, "
2081 "but library '%s' has no native resolvers",
2082 cls_name.ToCString(), lib_name.ToCString());
2083 }
2084 }
2085
2072 if (func.IsConstructor()) { 2086 if (func.IsConstructor()) {
2073 SequenceNode* statements = ParseConstructor(func, default_parameter_values); 2087 SequenceNode* statements = ParseConstructor(func, default_parameter_values);
2074 innermost_function_ = saved_innermost_function.raw(); 2088 innermost_function_ = saved_innermost_function.raw();
2075 return statements; 2089 return statements;
2076 } 2090 }
2077 2091
2078 ASSERT(!func.IsConstructor()); 2092 ASSERT(!func.IsConstructor());
2079 OpenFunctionBlock(func); // Build local scope for function. 2093 OpenFunctionBlock(func); // Build local scope for function.
2080 2094
2081 ParamList params; 2095 ParamList params;
(...skipping 7128 matching lines...) Expand 10 before | Expand all | Expand 10 after
9210 void Parser::SkipQualIdent() { 9224 void Parser::SkipQualIdent() {
9211 ASSERT(IsIdentifier()); 9225 ASSERT(IsIdentifier());
9212 ConsumeToken(); 9226 ConsumeToken();
9213 if (CurrentToken() == Token::kPERIOD) { 9227 if (CurrentToken() == Token::kPERIOD) {
9214 ConsumeToken(); // Consume the kPERIOD token. 9228 ConsumeToken(); // Consume the kPERIOD token.
9215 ExpectIdentifier("identifier expected after '.'"); 9229 ExpectIdentifier("identifier expected after '.'");
9216 } 9230 }
9217 } 9231 }
9218 9232
9219 } // namespace dart 9233 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698