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

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

Issue 3010543002: Rename the class "KernelReader" to "KernelLoader". (Closed)
Patch Set: Fix names in few places Created 3 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
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 "vm/kernel.h" 5 #include "vm/kernel.h"
6 #include "vm/kernel_binary_flowgraph.h"
6 7
7 #if !defined(DART_PRECOMPILED_RUNTIME) 8 #if !defined(DART_PRECOMPILED_RUNTIME)
8 namespace dart { 9 namespace dart {
9 10
10 namespace kernel {} // namespace kernel 11 namespace kernel {
12
13 bool FieldHasFunctionLiteralInitializer(const Field& field,
14 TokenPosition* start,
15 TokenPosition* end) {
16 Zone* zone = Thread::Current()->zone();
17 const Script& script = Script::Handle(zone, field.Script());
18
19 TranslationHelper translation_helper(
20 Thread::Current(), script.kernel_string_offsets(),
21 script.kernel_string_data(), script.kernel_canonical_names());
22
23 StreamingFlowGraphBuilder builder(
24 &translation_helper, zone, field.kernel_offset(),
25 TypedData::Handle(zone, field.kernel_data()));
26 kernel::FieldHelper field_helper(&builder);
27 field_helper.ReadUntilExcluding(kernel::FieldHelper::kEnd, true);
28 return field_helper.FieldHasFunctionLiteralInitializer(start, end);
29 }
30
31 } // namespace kernel
11 32
12 } // namespace dart 33 } // namespace dart
13 #endif // !defined(DART_PRECOMPILED_RUNTIME) 34 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698