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

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

Issue 92433002: Merge sin(a), cos(a) into one instruction. TODO: Implement for ARM and MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 2971 matching lines...) Expand 10 before | Expand all | Expand 10 after
2982 kind_(kind) { 2982 kind_(kind) {
2983 ASSERT(inputs_->length() == InputCountFor(kind_)); 2983 ASSERT(inputs_->length() == InputCountFor(kind_));
2984 for (intptr_t i = 0; i < inputs_->length(); ++i) { 2984 for (intptr_t i = 0; i < inputs_->length(); ++i) {
2985 ASSERT((*inputs)[i] != NULL); 2985 ASSERT((*inputs)[i] != NULL);
2986 (*inputs)[i]->set_instruction(this); 2986 (*inputs)[i]->set_instruction(this);
2987 (*inputs)[i]->set_use_index(i); 2987 (*inputs)[i]->set_use_index(i);
2988 } 2988 }
2989 deopt_id_ = original_deopt_id; 2989 deopt_id_ = original_deopt_id;
2990 } 2990 }
2991 2991
2992
2993 intptr_t MergedMathInstr::ResultIndexOf(MethodRecognizer::Kind kind) {
2994 switch (kind) {
2995 case MethodRecognizer::kMathSin: return 0;
2996 case MethodRecognizer::kMathCos: return 1;
2997 default: UNIMPLEMENTED(); return -1;
2998 }
2999 }
3000
3001
3002 intptr_t MergedMathInstr::ResultIndexOf(Token::Kind token) {
3003 switch (token) {
3004 case Token::kTRUNCDIV: return 0;
3005 case Token::kMOD: return 1;
3006 default: UNIMPLEMENTED(); return -1;
3007 }
3008 }
3009
3010
2992 #undef __ 3011 #undef __
2993 3012
2994 } // namespace dart 3013 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698