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

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

Issue 2270483002: DBC: Fix more HTTP benchmark bailouts (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 3 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
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 <setjmp.h> // NOLINT 5 #include <setjmp.h> // NOLINT
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #if defined(TARGET_ARCH_DBC) 9 #if defined(TARGET_ARCH_DBC)
10 10
(...skipping 2937 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 RawSmi* index = RAW_CAST(Smi, FP[rB]); 2948 RawSmi* index = RAW_CAST(Smi, FP[rB]);
2949 RawObject* value = FP[rC]; 2949 RawObject* value = FP[rC];
2950 ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_)); 2950 ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_));
2951 array->StorePointer(array->ptr()->data() + Smi::Value(index), value); 2951 array->StorePointer(array->ptr()->data() + Smi::Value(index), value);
2952 DISPATCH(); 2952 DISPATCH();
2953 } 2953 }
2954 2954
2955 { 2955 {
2956 BYTECODE(StoreIndexedUint8, A_B_C); 2956 BYTECODE(StoreIndexedUint8, A_B_C);
2957 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rA], FP[rB], 0); 2957 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rA], FP[rB], 0);
2958 *data = static_cast<uint8_t>(Smi::Value(RAW_CAST(Smi, FP[rC]))); 2958 *data = Smi::Value(RAW_CAST(Smi, FP[rC]));
2959 DISPATCH(); 2959 DISPATCH();
2960 } 2960 }
2961 2961
2962 { 2962 {
2963 BYTECODE(StoreIndexedExternalUint8, A_B_C); 2963 BYTECODE(StoreIndexedExternalUint8, A_B_C);
2964 uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]); 2964 uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
2965 RawSmi* index = RAW_CAST(Smi, FP[rB]); 2965 RawSmi* index = RAW_CAST(Smi, FP[rB]);
2966 RawSmi* value = RAW_CAST(Smi, FP[rC]); 2966 RawSmi* value = RAW_CAST(Smi, FP[rC]);
2967 array[Smi::Value(index)] = static_cast<uint8_t>(Smi::Value(value)); 2967 array[Smi::Value(index)] = Smi::Value(value);
2968 DISPATCH(); 2968 DISPATCH();
2969 } 2969 }
2970 2970
2971 {
2972 BYTECODE(StoreIndexedOneByteString, A_B_C);
2973 RawOneByteString* array = RAW_CAST(OneByteString, FP[rA]);
2974 RawSmi* index = RAW_CAST(Smi, FP[rB]);
2975 RawSmi* value = RAW_CAST(Smi, FP[rC]);
2976 ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_));
2977 array->ptr()->data()[Smi::Value(index)] = Smi::Value(value);
2978 DISPATCH();
2979 }
2980
2971 { 2981 {
2972 BYTECODE(StoreIndexedUint32, A_B_C); 2982 BYTECODE(StoreIndexedUint32, A_B_C);
2973 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rA], FP[rB], 2); 2983 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rA], FP[rB], 2);
2974 const uintptr_t value = reinterpret_cast<uintptr_t>(FP[rC]); 2984 const uintptr_t value = reinterpret_cast<uintptr_t>(FP[rC]);
2975 *reinterpret_cast<uint32_t*>(data) = static_cast<uint32_t>(value); 2985 *reinterpret_cast<uint32_t*>(data) = static_cast<uint32_t>(value);
2976 DISPATCH(); 2986 DISPATCH();
2977 } 2987 }
2978 2988
2979 { 2989 {
2980 BYTECODE(LoadIndexed, A_B_C); 2990 BYTECODE(LoadIndexed, A_B_C);
2981 RawArray* array = RAW_CAST(Array, FP[rB]); 2991 RawObject* obj = FP[rB];
2992 ASSERT(obj->IsArray() || obj->IsImmutableArray());
2993 RawArray* array = reinterpret_cast<RawArray*>(obj);
2982 RawSmi* index = RAW_CAST(Smi, FP[rC]); 2994 RawSmi* index = RAW_CAST(Smi, FP[rC]);
2983 ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_)); 2995 ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_));
2984 FP[rA] = array->ptr()->data()[Smi::Value(index)]; 2996 FP[rA] = array->ptr()->data()[Smi::Value(index)];
2985 DISPATCH(); 2997 DISPATCH();
2986 } 2998 }
2987 2999
2988 { 3000 {
2989 BYTECODE(LoadIndexedUint8, A_B_C); 3001 BYTECODE(LoadIndexedUint8, A_B_C);
2990 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC], 0); 3002 uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC], 0);
2991 FP[rA] = Smi::New(*data); 3003 FP[rA] = Smi::New(*data);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
3226 pc_ = pc; 3238 pc_ = pc;
3227 special_[kExceptionSpecialIndex] = raw_exception; 3239 special_[kExceptionSpecialIndex] = raw_exception;
3228 special_[kStacktraceSpecialIndex] = raw_stacktrace; 3240 special_[kStacktraceSpecialIndex] = raw_stacktrace;
3229 buf->Longjmp(); 3241 buf->Longjmp();
3230 UNREACHABLE(); 3242 UNREACHABLE();
3231 } 3243 }
3232 3244
3233 } // namespace dart 3245 } // namespace dart
3234 3246
3235 #endif // defined TARGET_ARCH_DBC 3247 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698