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

Unified Diff: runtime/vm/code_generator_ia32.cc

Issue 8678020: Do not type checks at returns of implicit getter. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_ia32.cc
===================================================================
--- runtime/vm/code_generator_ia32.cc (revision 1802)
+++ runtime/vm/code_generator_ia32.cc (working copy)
@@ -797,11 +797,15 @@
// Generate type check.
if (FLAG_enable_type_checks) {
- GenerateAssertAssignable(
- node->id(),
- node->value()->token_index(),
- Type::ZoneHandle(parsed_function().function().result_type()),
- String::ZoneHandle(String::NewSymbol("function result")));
+ RawFunction::Kind kind = parsed_function().function().kind();
+ if ((kind != RawFunction::kImplicitGetter) &&
+ (kind != RawFunction::kConstImplicitGetter)) {
+ GenerateAssertAssignable(
+ node->id(),
+ node->value()->token_index(),
+ Type::ZoneHandle(parsed_function().function().result_type()),
+ String::ZoneHandle(String::NewSymbol("function result")));
+ }
}
// Unchain the context(s) up to context level 0.
int context_level = state()->context_level();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698