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

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

Issue 11348035: Move StringImplementation from coreimpl to core as _StringImpl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 "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 5785 matching lines...) Expand 10 before | Expand all | Expand 10 after
5796 condition, 5796 condition,
5797 NodeAsSequenceNode(incr_pos, increment, incr_scope), 5797 NodeAsSequenceNode(incr_pos, increment, incr_scope),
5798 body); 5798 body);
5799 } 5799 }
5800 5800
5801 5801
5802 // Calling VM-internal helpers, uses implementation core library. 5802 // Calling VM-internal helpers, uses implementation core library.
5803 AstNode* Parser::MakeStaticCall(const String& cls_name, 5803 AstNode* Parser::MakeStaticCall(const String& cls_name,
5804 const String& func_name, 5804 const String& func_name,
5805 ArgumentListNode* arguments) { 5805 ArgumentListNode* arguments) {
5806 const Class& cls = Class::Handle(LookupImplClass(cls_name)); 5806 const Class& cls = Class::Handle(LookupCoreClass(cls_name));
5807 ASSERT(!cls.IsNull()); 5807 ASSERT(!cls.IsNull());
5808 const Function& func = Function::ZoneHandle( 5808 const Function& func = Function::ZoneHandle(
5809 Resolver::ResolveStatic(cls, 5809 Resolver::ResolveStatic(cls,
5810 func_name, 5810 func_name,
5811 arguments->length(), 5811 arguments->length(),
5812 arguments->names(), 5812 arguments->names(),
5813 Resolver::kIsQualified)); 5813 Resolver::kIsQualified));
5814 ASSERT(!func.IsNull()); 5814 ASSERT(!func.IsNull());
5815 CheckFunctionIsCallable(arguments->token_pos(), func); 5815 CheckFunctionIsCallable(arguments->token_pos(), func);
5816 return new StaticCallNode(arguments->token_pos(), func, arguments); 5816 return new StaticCallNode(arguments->token_pos(), func, arguments);
(...skipping 3423 matching lines...) Expand 10 before | Expand all | Expand 10 after
9240 // mode at runtime that it is within its declared bounds. 9240 // mode at runtime that it is within its declared bounds.
9241 new_object = CreateConstructorCallNode( 9241 new_object = CreateConstructorCallNode(
9242 new_pos, type_arguments, constructor, arguments); 9242 new_pos, type_arguments, constructor, arguments);
9243 } 9243 }
9244 return new_object; 9244 return new_object;
9245 } 9245 }
9246 9246
9247 9247
9248 String& Parser::Interpolate(ArrayNode* values) { 9248 String& Parser::Interpolate(ArrayNode* values) {
9249 const String& class_name = String::Handle(Symbols::StringBase()); 9249 const String& class_name = String::Handle(Symbols::StringBase());
9250 const Class& cls = Class::Handle(LookupImplClass(class_name)); 9250 const Class& cls = Class::Handle(LookupCoreClass(class_name));
9251 ASSERT(!cls.IsNull()); 9251 ASSERT(!cls.IsNull());
9252 const String& func_name = String::Handle(Symbols::Interpolate()); 9252 const String& func_name = String::Handle(Symbols::Interpolate());
9253 const Function& func = 9253 const Function& func =
9254 Function::Handle(cls.LookupStaticFunction(func_name)); 9254 Function::Handle(cls.LookupStaticFunction(func_name));
9255 ASSERT(!func.IsNull()); 9255 ASSERT(!func.IsNull());
9256 9256
9257 // Build the array of literal values to interpolate. 9257 // Build the array of literal values to interpolate.
9258 const Array& value_arr = Array::Handle(Array::New(values->length())); 9258 const Array& value_arr = Array::Handle(Array::New(values->length()));
9259 for (int i = 0; i < values->length(); i++) { 9259 for (int i = 0; i < values->length(); i++) {
9260 ASSERT(values->ElementAt(i)->IsLiteralNode()); 9260 ASSERT(values->ElementAt(i)->IsLiteralNode());
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
9840 void Parser::SkipQualIdent() { 9840 void Parser::SkipQualIdent() {
9841 ASSERT(IsIdentifier()); 9841 ASSERT(IsIdentifier());
9842 ConsumeToken(); 9842 ConsumeToken();
9843 if (CurrentToken() == Token::kPERIOD) { 9843 if (CurrentToken() == Token::kPERIOD) {
9844 ConsumeToken(); // Consume the kPERIOD token. 9844 ConsumeToken(); // Consume the kPERIOD token.
9845 ExpectIdentifier("identifier expected after '.'"); 9845 ExpectIdentifier("identifier expected after '.'");
9846 } 9846 }
9847 } 9847 }
9848 9848
9849 } // namespace dart 9849 } // namespace dart
OLDNEW
« lib/compiler/implementation/lib/core_patch.dart ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698