| Index: runtime/vm/bootstrap.cc
|
| diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
|
| index 84b528d4c9a7127e1f6f3639adc6bb9c64af06df..113dcd9d3f0dc0a667ec635ce0c0959a53ef382f 100644
|
| --- a/runtime/vm/bootstrap.cc
|
| +++ b/runtime/vm/bootstrap.cc
|
| @@ -317,17 +317,9 @@ static RawError* BootstrapFromSource(Thread* thread) {
|
|
|
|
|
| #if !defined(DART_PRECOMPILED_RUNTIME)
|
| -static RawError* BootstrapFromKernel(Thread* thread,
|
| - const uint8_t* buffer,
|
| - intptr_t buffer_size) {
|
| +static RawError* BootstrapFromKernel(Thread* thread, kernel::Program* program) {
|
| Zone* zone = thread->zone();
|
| - kernel::KernelReader reader(buffer, buffer_size);
|
| - kernel::Program* program = reader.ReadPrecompiledProgram();
|
| - if (program == NULL) {
|
| - const String& message =
|
| - String::Handle(zone, String::New("Failed to read Kernel file"));
|
| - return ApiError::New(message);
|
| - }
|
| + kernel::KernelReader reader(program);
|
|
|
| Isolate* isolate = thread->isolate();
|
| // Mark the already-pending classes. This mark bit will be used to avoid
|
| @@ -363,17 +355,14 @@ static RawError* BootstrapFromKernel(Thread* thread,
|
| return Error::null();
|
| }
|
| #else
|
| -static RawError* BootstrapFromKernel(Thread* thread,
|
| - const uint8_t* buffer,
|
| - intptr_t buffer_size) {
|
| +static RawError* BootstrapFromKernel(Thread* thread, kernel::Program* program) {
|
| UNREACHABLE();
|
| return Error::null();
|
| }
|
| #endif
|
|
|
|
|
| -RawError* Bootstrap::DoBootstrapping(const uint8_t* kernel_buffer,
|
| - intptr_t kernel_buffer_length) {
|
| +RawError* Bootstrap::DoBootstrapping(kernel::Program* kernel_program) {
|
| Thread* thread = Thread::Current();
|
| Isolate* isolate = thread->isolate();
|
| Zone* zone = thread->zone();
|
| @@ -396,9 +385,8 @@ RawError* Bootstrap::DoBootstrapping(const uint8_t* kernel_buffer,
|
| }
|
| }
|
|
|
| - return (kernel_buffer == NULL)
|
| - ? BootstrapFromSource(thread)
|
| - : BootstrapFromKernel(thread, kernel_buffer, kernel_buffer_length);
|
| + return (kernel_program == NULL) ? BootstrapFromSource(thread)
|
| + : BootstrapFromKernel(thread, kernel_program);
|
| }
|
|
|
| } // namespace dart
|
|
|