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

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

Issue 10051011: Eliminate type checks that can successfully be performed at compile time. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/parser.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/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/opt_code_generator.h" 8 #include "vm/opt_code_generator.h"
9 9
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2285 __ Bind(&done); 2285 __ Bind(&done);
2286 } 2286 }
2287 return; 2287 return;
2288 } 2288 }
2289 2289
2290 if (Token::IsInstanceofOperator(node->kind())) { 2290 if (Token::IsInstanceofOperator(node->kind())) {
2291 VisitLoadOne(node->left(), EAX); 2291 VisitLoadOne(node->left(), EAX);
2292 ASSERT(node->right()->IsTypeNode()); 2292 ASSERT(node->right()->IsTypeNode());
2293 GenerateInstanceOf(node->id(), 2293 GenerateInstanceOf(node->id(),
2294 node->token_index(), 2294 node->token_index(),
2295 node->left(),
2295 node->right()->AsTypeNode()->type(), 2296 node->right()->AsTypeNode()->type(),
2296 (node->kind() == Token::kISNOT)); 2297 (node->kind() == Token::kISNOT));
2297 if (!IsResultNeeded(node)) { 2298 if (!IsResultNeeded(node)) {
2298 __ popl(EAX); // Pop the result of the instanceof operation. 2299 __ popl(EAX); // Pop the result of the instanceof operation.
2299 } 2300 }
2300 return; 2301 return;
2301 } 2302 }
2302 2303
2303 if (AtIdNodeHasClassAt(node, node->id(), smi_class_, 0)) { 2304 if (AtIdNodeHasClassAt(node, node->id(), smi_class_, 0)) {
2304 if (GenerateSmiComparison(node)) { 2305 if (GenerateSmiComparison(node)) {
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 } 3067 }
3067 } 3068 }
3068 // TODO(srdjan): Implement unary kSUB (negate) Mint. 3069 // TODO(srdjan): Implement unary kSUB (negate) Mint.
3069 CodeGenerator::VisitUnaryOpNode(node); 3070 CodeGenerator::VisitUnaryOpNode(node);
3070 } 3071 }
3071 3072
3072 3073
3073 } // namespace dart 3074 } // namespace dart
3074 3075
3075 #endif // defined TARGET_ARCH_IA32 3076 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698