OLD | NEW |
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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 f->ptr()->usage_counter_ = counter; | 1202 f->ptr()->usage_counter_ = counter; |
1203 } | 1203 } |
1204 if (counter >= threshold) { | 1204 if (counter >= threshold) { |
1205 FP[0] = f; | 1205 FP[0] = f; |
1206 FP[1] = 0; | 1206 FP[1] = 0; |
1207 Exit(thread, FP, FP + 2, pc); | 1207 Exit(thread, FP, FP + 2, pc); |
1208 NativeArguments args(thread, 1, FP, FP + 1); | 1208 NativeArguments args(thread, 1, FP, FP + 1); |
1209 INVOKE_RUNTIME(DRT_OptimizeInvokedFunction, args); | 1209 INVOKE_RUNTIME(DRT_OptimizeInvokedFunction, args); |
1210 { | 1210 { |
1211 // DRT_OptimizeInvokedFunction returns the code object to execute. | 1211 // DRT_OptimizeInvokedFunction returns the code object to execute. |
1212 ASSERT(FP[1]->GetClassId() == kCodeCid); | 1212 ASSERT(FP[1]->GetClassId() == kFunctionCid); |
1213 RawCode* code = static_cast<RawCode*>(FP[1]); | 1213 RawFunction* function = static_cast<RawFunction*>(FP[1]); |
| 1214 RawCode* code = function->ptr()->code_; |
1214 SimulatorHelpers::SetFrameCode(FP, code); | 1215 SimulatorHelpers::SetFrameCode(FP, code); |
1215 pp = code->ptr()->object_pool_->ptr(); | 1216 pp = code->ptr()->object_pool_->ptr(); |
1216 pc = reinterpret_cast<uint32_t*>(code->ptr()->entry_point_); | 1217 pc = reinterpret_cast<uint32_t*>(function->ptr()->entry_point_); |
1217 pc_ = reinterpret_cast<uword>(pc); // For the profiler. | 1218 pc_ = reinterpret_cast<uword>(pc); // For the profiler. |
1218 } | 1219 } |
1219 } | 1220 } |
1220 DISPATCH(); | 1221 DISPATCH(); |
1221 } | 1222 } |
1222 | 1223 |
1223 { | 1224 { |
1224 BYTECODE(CheckStack, A); | 1225 BYTECODE(CheckStack, A); |
1225 { | 1226 { |
1226 if (reinterpret_cast<uword>(SP) >= thread->stack_limit()) { | 1227 if (reinterpret_cast<uword>(SP) >= thread->stack_limit()) { |
(...skipping 2266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3493 pc_ = pc; | 3494 pc_ = pc; |
3494 special_[kExceptionSpecialIndex] = raw_exception; | 3495 special_[kExceptionSpecialIndex] = raw_exception; |
3495 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 3496 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
3496 buf->Longjmp(); | 3497 buf->Longjmp(); |
3497 UNREACHABLE(); | 3498 UNREACHABLE(); |
3498 } | 3499 } |
3499 | 3500 |
3500 } // namespace dart | 3501 } // namespace dart |
3501 | 3502 |
3502 #endif // defined TARGET_ARCH_DBC | 3503 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |