adf04d0ac6
This reverts commit cd4e5ee866.
Reason for revert: This broke the 32bit Linux SDK build.
Original change's description:
> Keep the line starts delta encoded in the VM heap as well.
>
> The line starts in the kernel binary are delta encoded. By decoding and
> storing them as int32 values, we are unneccesarily bloating the VM heap.
> This change keeps the line starts delta encoded in the VM heap as well.
> This brings down the core snapshot size by 275KB (but will of course
> affect the debug performance.)
>
> Bug:
> Change-Id: I77769efe7339484096d04c37180367adf96e51f4
> Reviewed-on: https://dart-review.googlesource.com/22304
> Commit-Queue: Siva Chandra <sivachandra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
TBR=sivachandra@google.com,asiva@google.com
Change-Id: I6e78bd510de7033d8583c089c00b5b261fdf69c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/24800
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
35 lines
1.3 KiB
C++
35 lines
1.3 KiB
C++
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "vm/kernel.h"
|
|
#include "vm/compiler/frontend/kernel_binary_flowgraph.h"
|
|
|
|
#if !defined(DART_PRECOMPILED_RUNTIME)
|
|
namespace dart {
|
|
|
|
namespace kernel {
|
|
|
|
bool FieldHasFunctionLiteralInitializer(const Field& field,
|
|
TokenPosition* start,
|
|
TokenPosition* end) {
|
|
Zone* zone = Thread::Current()->zone();
|
|
const Script& script = Script::Handle(zone, field.Script());
|
|
|
|
TranslationHelper translation_helper(Thread::Current());
|
|
translation_helper.InitFromScript(script);
|
|
|
|
StreamingFlowGraphBuilder builder(&translation_helper, field.Script(), zone,
|
|
TypedData::Handle(zone, field.KernelData()),
|
|
field.KernelDataProgramOffset());
|
|
builder.SetOffset(field.kernel_offset());
|
|
kernel::FieldHelper field_helper(&builder);
|
|
field_helper.ReadUntilExcluding(kernel::FieldHelper::kEnd, true);
|
|
return field_helper.FieldHasFunctionLiteralInitializer(start, end);
|
|
}
|
|
|
|
} // namespace kernel
|
|
|
|
} // namespace dart
|
|
#endif // !defined(DART_PRECOMPILED_RUNTIME)
|