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

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

Issue 12330072: Ensure that compile time types for comparisons are recomputed once comparison are specialized. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
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/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 Register result = locs()->out().reg(); 952 Register result = locs()->out().reg();
953 __ movq(result, 953 __ movq(result,
954 Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress()))); 954 Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress())));
955 __ movq(result, Address(result, 955 __ movq(result, Address(result,
956 char_code, 956 char_code,
957 TIMES_HALF_WORD_SIZE, // Char code is a smi. 957 TIMES_HALF_WORD_SIZE, // Char code is a smi.
958 Symbols::kNullCharCodeSymbolOffset * kWordSize)); 958 Symbols::kNullCharCodeSymbolOffset * kWordSize));
959 } 959 }
960 960
961 961
962 CompileType* LoadIndexedInstr::ComputeInitialType() const { 962 CompileType LoadIndexedInstr::ComputeType() const {
963 switch (class_id_) { 963 switch (class_id_) {
964 case kArrayCid: 964 case kArrayCid:
965 case kImmutableArrayCid: 965 case kImmutableArrayCid:
966 return CompileType::Dynamic(); 966 return CompileType::Dynamic();
967 967
968 case kFloat32ArrayCid : 968 case kFloat32ArrayCid :
969 case kFloat64ArrayCid : 969 case kFloat64ArrayCid :
970 return CompileType::FromCid(kDoubleCid); 970 return CompileType::FromCid(kDoubleCid);
971 971
972 case kInt8ArrayCid: 972 case kInt8ArrayCid:
973 case kUint8ArrayCid: 973 case kUint8ArrayCid:
974 case kUint8ClampedArrayCid: 974 case kUint8ClampedArrayCid:
975 case kExternalUint8ArrayCid: 975 case kExternalUint8ArrayCid:
976 case kExternalUint8ClampedArrayCid: 976 case kExternalUint8ClampedArrayCid:
977 case kInt16ArrayCid: 977 case kInt16ArrayCid:
978 case kUint16ArrayCid: 978 case kUint16ArrayCid:
979 case kOneByteStringCid: 979 case kOneByteStringCid:
980 case kTwoByteStringCid: 980 case kTwoByteStringCid:
981 case kInt32ArrayCid: 981 case kInt32ArrayCid:
982 case kUint32ArrayCid: 982 case kUint32ArrayCid:
983 return CompileType::FromCid(kSmiCid); 983 return CompileType::FromCid(kSmiCid);
984 984
985 default: 985 default:
986 UNIMPLEMENTED(); 986 UNIMPLEMENTED();
987 return NULL; 987 return CompileType::Dynamic();
988 } 988 }
989 } 989 }
990 990
991 991
992 Representation LoadIndexedInstr::representation() const { 992 Representation LoadIndexedInstr::representation() const {
993 switch (class_id_) { 993 switch (class_id_) {
994 case kArrayCid: 994 case kArrayCid:
995 case kImmutableArrayCid: 995 case kImmutableArrayCid:
996 case kInt8ArrayCid: 996 case kInt8ArrayCid:
997 case kUint8ArrayCid: 997 case kUint8ArrayCid:
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3108 PcDescriptors::kOther, 3108 PcDescriptors::kOther,
3109 locs()); 3109 locs());
3110 __ Drop(2); // Discard type arguments and receiver. 3110 __ Drop(2); // Discard type arguments and receiver.
3111 } 3111 }
3112 3112
3113 } // namespace dart 3113 } // namespace dart
3114 3114
3115 #undef __ 3115 #undef __
3116 3116
3117 #endif // defined TARGET_ARCH_X64 3117 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698