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

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

Issue 10580003: Temporary fix for static type check elimination in new compiler. Enable tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | « no previous file | tests/co19/co19-runtime.status » ('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) 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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 if (static_type.IsNullType()) { 357 if (static_type.IsNullType()) {
358 // There are only three instances that can be of Class Null: 358 // There are only three instances that can be of Class Null:
359 // Object::null(), Object::sentinel(), and Object::transition_sentinel(). 359 // Object::null(), Object::sentinel(), and Object::transition_sentinel().
360 // The inline code and run time code performing the type check will never 360 // The inline code and run time code performing the type check will never
361 // encounter the 2 sentinel values. The type check of a sentinel value 361 // encounter the 2 sentinel values. The type check of a sentinel value
362 // will always be eliminated here, because these sentinel values can only 362 // will always be eliminated here, because these sentinel values can only
363 // be encountered as constants, never as actual value of a heap object 363 // be encountered as constants, never as actual value of a heap object
364 // being type checked. 364 // being type checked.
365 return true; 365 return true;
366 } 366 }
367 if (static_type.IsType() &&
368 Class::Handle(static_type.type_class()).HasTypeArguments()) {
369 // TODO(regis): Special tests need to be added.
370 return false;
371 }
367 Error& malformed_error = Error::Handle(); 372 Error& malformed_error = Error::Handle();
368 if (!dst_type.IsMalformed() && 373 if (!dst_type.IsMalformed() &&
369 static_type.IsSubtypeOf(dst_type, &malformed_error)) { 374 static_type.IsSubtypeOf(dst_type, &malformed_error)) {
370 return true; 375 return true;
371 } 376 }
372 377
373 return false; 378 return false;
374 } 379 }
375 380
376 381
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2561 char* chars = reinterpret_cast<char*>( 2566 char* chars = reinterpret_cast<char*>(
2562 Isolate::Current()->current_zone()->Allocate(len)); 2567 Isolate::Current()->current_zone()->Allocate(len));
2563 OS::SNPrint(chars, len, kFormat, function_name, reason); 2568 OS::SNPrint(chars, len, kFormat, function_name, reason);
2564 const Error& error = Error::Handle( 2569 const Error& error = Error::Handle(
2565 LanguageError::New(String::Handle(String::New(chars)))); 2570 LanguageError::New(String::Handle(String::New(chars))));
2566 Isolate::Current()->long_jump_base()->Jump(1, error); 2571 Isolate::Current()->long_jump_base()->Jump(1, error);
2567 } 2572 }
2568 2573
2569 2574
2570 } // namespace dart 2575 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698