Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 V(ToNumber) \ | 62 V(ToNumber) \ |
| 63 V(CounterOp) \ | 63 V(CounterOp) \ |
| 64 V(ArgumentsAccess) \ | 64 V(ArgumentsAccess) \ |
| 65 V(RegExpConstructResult) \ | 65 V(RegExpConstructResult) \ |
| 66 V(NumberToString) \ | 66 V(NumberToString) \ |
| 67 V(CEntry) \ | 67 V(CEntry) \ |
| 68 V(JSEntry) \ | 68 V(JSEntry) \ |
| 69 V(KeyedLoadElement) \ | 69 V(KeyedLoadElement) \ |
| 70 V(KeyedStoreElement) \ | 70 V(KeyedStoreElement) \ |
| 71 V(DebuggerStatement) \ | 71 V(DebuggerStatement) \ |
| 72 V(StringDictionaryLookup) | 72 V(StringDictionaryLookup) \ |
| 73 V(FastElementsConversion) | |
| 73 | 74 |
| 74 // List of code stubs only used on ARM platforms. | 75 // List of code stubs only used on ARM platforms. |
| 75 #ifdef V8_TARGET_ARCH_ARM | 76 #ifdef V8_TARGET_ARCH_ARM |
| 76 #define CODE_STUB_LIST_ARM(V) \ | 77 #define CODE_STUB_LIST_ARM(V) \ |
| 77 V(GetProperty) \ | 78 V(GetProperty) \ |
| 78 V(SetProperty) \ | 79 V(SetProperty) \ |
| 79 V(InvokeBuiltin) \ | 80 V(InvokeBuiltin) \ |
| 80 V(RegExpCEntry) \ | 81 V(RegExpCEntry) \ |
| 81 V(DirectCEntry) | 82 V(DirectCEntry) |
| 82 #else | 83 #else |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1018 void CheckOddball(MacroAssembler* masm, | 1019 void CheckOddball(MacroAssembler* masm, |
| 1019 Type type, | 1020 Type type, |
| 1020 Heap::RootListIndex value, | 1021 Heap::RootListIndex value, |
| 1021 bool result); | 1022 bool result); |
| 1022 void GenerateTypeTransition(MacroAssembler* masm); | 1023 void GenerateTypeTransition(MacroAssembler* masm); |
| 1023 | 1024 |
| 1024 Register tos_; | 1025 Register tos_; |
| 1025 Types types_; | 1026 Types types_; |
| 1026 }; | 1027 }; |
| 1027 | 1028 |
| 1029 | |
| 1030 class FastElementsConversionStub : public CodeStub { | |
| 1031 public: | |
| 1032 FastElementsConversionStub(ElementsKind from, | |
| 1033 ElementsKind to, | |
| 1034 bool is_jsarray, | |
| 1035 StrictModeFlag strict_mode) | |
| 1036 : from_(from), | |
| 1037 to_(to), | |
| 1038 is_jsarray_(is_jsarray), | |
| 1039 strict_mode_(strict_mode) {} | |
| 1040 | |
| 1041 private: | |
|
Jakob Kummerow
2011/10/13 09:15:59
nit: classes, then methods, then data members. (se
Yang
2011/10/13 09:58:53
Done.
| |
| 1042 ElementsKind from_; | |
| 1043 ElementsKind to_; | |
| 1044 bool is_jsarray_; | |
| 1045 StrictModeFlag strict_mode_; | |
| 1046 | |
| 1047 class FromBits: public BitField<ElementsKind, 0, 8> {}; | |
| 1048 class ToBits: public BitField<ElementsKind, 8, 8> {}; | |
| 1049 class IsJSArrayBits: public BitField<bool, 16, 8> {}; | |
| 1050 class StrictModeBits: public BitField<StrictModeFlag, 24, 8> {}; | |
| 1051 | |
| 1052 Major MajorKey() { return FastElementsConversion; } | |
| 1053 int MinorKey() { | |
| 1054 return FromBits::encode(from_) | | |
| 1055 ToBits::encode(to_) | | |
| 1056 IsJSArrayBits::encode(is_jsarray_) | | |
| 1057 StrictModeBits::encode(strict_mode_); | |
| 1058 } | |
| 1059 | |
| 1060 void Generate(MacroAssembler* masm); | |
| 1061 static void GenerateSmiOnlyToObject(MacroAssembler* masm); | |
| 1062 static void GenerateSmiOnlyToDouble(MacroAssembler* masm, | |
| 1063 StrictModeFlag strict_mode); | |
| 1064 static void GenerateDoubleToObject(MacroAssembler* masm, | |
| 1065 StrictModeFlag strict_mode); | |
| 1066 | |
| 1067 DISALLOW_COPY_AND_ASSIGN(FastElementsConversionStub); | |
| 1068 }; | |
| 1069 | |
| 1028 } } // namespace v8::internal | 1070 } } // namespace v8::internal |
| 1029 | 1071 |
| 1030 #endif // V8_CODE_STUBS_H_ | 1072 #endif // V8_CODE_STUBS_H_ |
| OLD | NEW |