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

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

Issue 2972343002: [kernel] Insert kernel bodies into VM heap (Closed)
Patch Set: Review comments Created 3 years, 4 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/vm/object.cc ('k') | runtime/vm/raw_object.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/parser.h" 5 #include "vm/parser.h"
6 #include "vm/flags.h" 6 #include "vm/flags.h"
7 7
8 #ifndef DART_PRECOMPILED_RUNTIME 8 #ifndef DART_PRECOMPILED_RUNTIME
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void ParsedFunction::Bailout(const char* origin, const char* reason) const { 220 void ParsedFunction::Bailout(const char* origin, const char* reason) const {
221 Report::MessageF(Report::kBailout, Script::Handle(function_.script()), 221 Report::MessageF(Report::kBailout, Script::Handle(function_.script()),
222 function_.token_pos(), Report::AtLocation, 222 function_.token_pos(), Report::AtLocation,
223 "%s Bailout in %s: %s", origin, 223 "%s Bailout in %s: %s", origin,
224 String::Handle(function_.name()).ToCString(), reason); 224 String::Handle(function_.name()).ToCString(), reason);
225 UNREACHABLE(); 225 UNREACHABLE();
226 } 226 }
227 227
228 kernel::ScopeBuildingResult* ParsedFunction::EnsureKernelScopes() { 228 kernel::ScopeBuildingResult* ParsedFunction::EnsureKernelScopes() {
229 if (kernel_scopes_ == NULL) { 229 if (kernel_scopes_ == NULL) {
230 intptr_t kernel_offset = function().kernel_offset();
231 Script& script = Script::Handle(Z, function().script());
232 kernel::StreamingScopeBuilder builder( 230 kernel::StreamingScopeBuilder builder(
233 this, kernel_offset, script.kernel_data(), script.kernel_data_size()); 231 this, function().kernel_offset(),
232 TypedData::Handle(Z, function().kernel_data()));
234 kernel_scopes_ = builder.BuildScopes(); 233 kernel_scopes_ = builder.BuildScopes();
235 } 234 }
236 return kernel_scopes_; 235 return kernel_scopes_;
237 } 236 }
238 237
239 LocalVariable* ParsedFunction::EnsureExpressionTemp() { 238 LocalVariable* ParsedFunction::EnsureExpressionTemp() {
240 if (!has_expression_temp_var()) { 239 if (!has_expression_temp_var()) {
241 LocalVariable* temp = 240 LocalVariable* temp =
242 new (Z) LocalVariable(function_.token_pos(), function_.token_pos(), 241 new (Z) LocalVariable(function_.token_pos(), function_.token_pos(),
243 Symbols::ExprTemp(), Object::dynamic_type()); 242 Symbols::ExprTemp(), Object::dynamic_type());
(...skipping 14863 matching lines...) Expand 10 before | Expand all | Expand 10 after
15107 bool Parser::FieldHasFunctionLiteralInitializer(const Field& field, 15106 bool Parser::FieldHasFunctionLiteralInitializer(const Field& field,
15108 TokenPosition* start, 15107 TokenPosition* start,
15109 TokenPosition* end) { 15108 TokenPosition* end) {
15110 UNREACHABLE(); 15109 UNREACHABLE();
15111 return false; 15110 return false;
15112 } 15111 }
15113 15112
15114 } // namespace dart 15113 } // namespace dart
15115 15114
15116 #endif // DART_PRECOMPILED_RUNTIME 15115 #endif // DART_PRECOMPILED_RUNTIME
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698