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

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

Issue 134893003: Add internal operation that converts a growable list to a fixed list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
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 "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 5315 matching lines...) Expand 10 before | Expand all | Expand 10 after
5326 // Parse the function name out. 5326 // Parse the function name out.
5327 const intptr_t native_pos = TokenPos(); 5327 const intptr_t native_pos = TokenPos();
5328 const String& native_name = ParseNativeDeclaration(); 5328 const String& native_name = ParseNativeDeclaration();
5329 5329
5330 // Now resolve the native function to the corresponding native entrypoint. 5330 // Now resolve the native function to the corresponding native entrypoint.
5331 const int num_params = NativeArguments::ParameterCountForResolution(func); 5331 const int num_params = NativeArguments::ParameterCountForResolution(func);
5332 bool auto_setup_scope = true; 5332 bool auto_setup_scope = true;
5333 NativeFunction native_function = NativeEntry::ResolveNative( 5333 NativeFunction native_function = NativeEntry::ResolveNative(
5334 library, native_name, num_params, &auto_setup_scope); 5334 library, native_name, num_params, &auto_setup_scope);
5335 if (native_function == NULL) { 5335 if (native_function == NULL) {
5336 ErrorMsg(native_pos, "native function '%s' cannot be found", 5336 ErrorMsg(native_pos, "native function '%s' (%d arguments) cannot be found",
5337 native_name.ToCString()); 5337 native_name.ToCString(), func.NumParameters());
5338 } 5338 }
5339 func.SetIsNativeAutoSetupScope(auto_setup_scope); 5339 func.SetIsNativeAutoSetupScope(auto_setup_scope);
5340 5340
5341 // Now add the NativeBodyNode and return statement. 5341 // Now add the NativeBodyNode and return statement.
5342 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 5342 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
5343 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 5343 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
5344 current_block_->statements->Add( 5344 current_block_->statements->Add(
5345 new ReturnNode(TokenPos(), 5345 new ReturnNode(TokenPos(),
5346 new NativeBodyNode(TokenPos(), 5346 new NativeBodyNode(TokenPos(),
5347 Function::ZoneHandle(func.raw()), 5347 Function::ZoneHandle(func.raw()),
(...skipping 5452 matching lines...) Expand 10 before | Expand all | Expand 10 after
10800 void Parser::SkipQualIdent() { 10800 void Parser::SkipQualIdent() {
10801 ASSERT(IsIdentifier()); 10801 ASSERT(IsIdentifier());
10802 ConsumeToken(); 10802 ConsumeToken();
10803 if (CurrentToken() == Token::kPERIOD) { 10803 if (CurrentToken() == Token::kPERIOD) {
10804 ConsumeToken(); // Consume the kPERIOD token. 10804 ConsumeToken(); // Consume the kPERIOD token.
10805 ExpectIdentifier("identifier expected after '.'"); 10805 ExpectIdentifier("identifier expected after '.'");
10806 } 10806 }
10807 } 10807 }
10808 10808
10809 } // namespace dart 10809 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698