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

Side by Side Diff: vm/ast.cc

Issue 11087070: - Get rid of RawClosure class and use RawInstance for closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 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 | « lib/isolate.cc ('k') | vm/code_generator.cc » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/ast.h" 5 #include "vm/ast.h"
6 #include "vm/compiler.h" 6 #include "vm/compiler.h"
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 #include "vm/resolver.h" 10 #include "vm/resolver.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 case Token::kBIT_NOT: 279 case Token::kBIT_NOT:
280 return val->IsInteger() ? val : NULL; 280 return val->IsInteger() ? val : NULL;
281 default: 281 default:
282 return NULL; 282 return NULL;
283 } 283 }
284 } 284 }
285 285
286 286
287 const Instance* ClosureNode::EvalConstExpr() const { 287 const Instance* ClosureNode::EvalConstExpr() const {
288 if (function().IsImplicitStaticClosureFunction()) { 288 if (function().IsImplicitStaticClosureFunction()) {
289 // Return a value that represents a closure. Only the type is relevant. 289 // Return a value that represents an instance. Only the type is relevant.
290 return &Closure::Handle(); 290 return &Instance::Handle();
291 } 291 }
292 return NULL; 292 return NULL;
293 } 293 }
294 294
295 295
296 const char* UnaryOpNode::Name() const { 296 const char* UnaryOpNode::Name() const {
297 return Token::Str(kind_); 297 return Token::Str(kind_);
298 } 298 }
299 299
300 300
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (result.IsError() || result.IsNull()) { 420 if (result.IsError() || result.IsNull()) {
421 // TODO(turnidge): We could get better error messages by returning 421 // TODO(turnidge): We could get better error messages by returning
422 // the Error object directly to the parser. This will involve 422 // the Error object directly to the parser. This will involve
423 // replumbing all of the EvalConstExpr methods. 423 // replumbing all of the EvalConstExpr methods.
424 return NULL; 424 return NULL;
425 } 425 }
426 return &Instance::ZoneHandle(Instance::Cast(result).raw()); 426 return &Instance::ZoneHandle(Instance::Cast(result).raw());
427 } 427 }
428 428
429 } // namespace dart 429 } // namespace dart
OLDNEW
« no previous file with comments | « lib/isolate.cc ('k') | vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698