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

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

Issue 2624393002: Remove dart_noopt and related parts from the VM. (Closed)
Patch Set: Merge branch 'master' of github.com:dart-lang/sdk into remove-noopt Created 3 years, 11 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/tests/vm/vm.status ('k') | runtime/vm/flow_graph_compiler.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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 6548 matching lines...) Expand 10 before | Expand all | Expand 10 after
6559 } 6559 }
6560 6560
6561 js_stream.Steal(reinterpret_cast<char**>(buffer), buffer_length); 6561 js_stream.Steal(reinterpret_cast<char**>(buffer), buffer_length);
6562 return Api::Success(); 6562 return Api::Success();
6563 #endif 6563 #endif
6564 } 6564 }
6565 6565
6566 6566
6567 DART_EXPORT Dart_Handle 6567 DART_EXPORT Dart_Handle
6568 Dart_Precompile(Dart_QualifiedFunctionName entry_points[], 6568 Dart_Precompile(Dart_QualifiedFunctionName entry_points[],
6569 bool reset_fields,
6570 uint8_t* jit_feedback, 6569 uint8_t* jit_feedback,
6571 intptr_t jit_feedback_length) { 6570 intptr_t jit_feedback_length) {
6572 #if defined(TARGET_ARCH_IA32) 6571 #if defined(TARGET_ARCH_IA32)
6573 return Api::NewError("AOT compilation is not supported on IA32."); 6572 return Api::NewError("AOT compilation is not supported on IA32.");
6574 #elif defined(TARGET_ARCH_DBC) 6573 #elif defined(TARGET_ARCH_DBC)
6575 return Api::NewError("AOT compilation is not supported on DBC."); 6574 return Api::NewError("AOT compilation is not supported on DBC.");
6576 #elif !defined(DART_PRECOMPILER) 6575 #elif !defined(DART_PRECOMPILER)
6577 return Api::NewError( 6576 return Api::NewError(
6578 "This VM was built without support for AOT compilation."); 6577 "This VM was built without support for AOT compilation.");
6579 #else 6578 #else
6580 API_TIMELINE_BEGIN_END; 6579 API_TIMELINE_BEGIN_END;
6581 DARTSCOPE(Thread::Current()); 6580 DARTSCOPE(Thread::Current());
6582 if (!FLAG_precompiled_mode) { 6581 if (!FLAG_precompiled_mode) {
6583 return Api::NewError("Flag --precompilation was not specified."); 6582 return Api::NewError("Flag --precompilation was not specified.");
6584 } 6583 }
6585 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T); 6584 Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
6586 if (::Dart_IsError(result)) { 6585 if (::Dart_IsError(result)) {
6587 return result; 6586 return result;
6588 } 6587 }
6589 CHECK_CALLBACK_STATE(T); 6588 CHECK_CALLBACK_STATE(T);
6590 const Error& error = Error::Handle(Precompiler::CompileAll( 6589 const Error& error = Error::Handle(
6591 entry_points, reset_fields, jit_feedback, jit_feedback_length)); 6590 Precompiler::CompileAll(entry_points, jit_feedback, jit_feedback_length));
6592 if (!error.IsNull()) { 6591 if (!error.IsNull()) {
6593 return Api::NewHandle(T, error.raw()); 6592 return Api::NewHandle(T, error.raw());
6594 } 6593 }
6595 return Api::Success(); 6594 return Api::Success();
6596 #endif 6595 #endif
6597 } 6596 }
6598 6597
6599 6598
6600 DART_EXPORT Dart_Handle 6599 DART_EXPORT Dart_Handle
6601 Dart_CreatePrecompiledSnapshotAssembly(uint8_t** assembly_buffer, 6600 Dart_CreatePrecompiledSnapshotAssembly(uint8_t** assembly_buffer,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
6815 } 6814 }
6816 6815
6817 6816
6818 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6817 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6819 #ifndef PRODUCT 6818 #ifndef PRODUCT
6820 Profiler::DumpStackTrace(context); 6819 Profiler::DumpStackTrace(context);
6821 #endif 6820 #endif
6822 } 6821 }
6823 6822
6824 } // namespace dart 6823 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698