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

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

Issue 2818273002: Remove parent_level field of function type parameters. (Closed)
Patch Set: address comments Created 3 years, 8 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/lib/mirrors.cc ('k') | runtime/vm/bootstrap_nocore.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) 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/bootstrap.h" 5 #include "vm/bootstrap.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/bootstrap_natives.h" 9 #include "vm/bootstrap_natives.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // instances. This allows us to just finalize function types without going 267 // instances. This allows us to just finalize function types without going
268 // through the hoops of trying to compile their scope class. 268 // through the hoops of trying to compile their scope class.
269 ObjectStore* object_store = thread->isolate()->object_store(); 269 ObjectStore* object_store = thread->isolate()->object_store();
270 Zone* zone = thread->zone(); 270 Zone* zone = thread->zone();
271 Class& cls = Class::Handle(zone, object_store->closure_class()); 271 Class& cls = Class::Handle(zone, object_store->closure_class());
272 Compiler::CompileClass(cls); 272 Compiler::CompileClass(cls);
273 273
274 #if defined(DEBUG) 274 #if defined(DEBUG)
275 // Verify that closure field offsets are identical in Dart and C++. 275 // Verify that closure field offsets are identical in Dart and C++.
276 const Array& fields = Array::Handle(zone, cls.fields()); 276 const Array& fields = Array::Handle(zone, cls.fields());
277 ASSERT(fields.Length() == 3); 277 ASSERT(fields.Length() == 4);
278 Field& field = Field::Handle(zone); 278 Field& field = Field::Handle(zone);
279 field ^= fields.At(0); 279 field ^= fields.At(0);
280 ASSERT(field.Offset() == Closure::instantiator_offset()); 280 ASSERT(field.Offset() == Closure::instantiator_type_arguments_offset());
281 field ^= fields.At(1); 281 field ^= fields.At(1);
282 ASSERT(field.Offset() == Closure::function_type_arguments_offset());
283 field ^= fields.At(2);
282 ASSERT(field.Offset() == Closure::function_offset()); 284 ASSERT(field.Offset() == Closure::function_offset());
283 field ^= fields.At(2); 285 field ^= fields.At(3);
284 ASSERT(field.Offset() == Closure::context_offset()); 286 ASSERT(field.Offset() == Closure::context_offset());
285 #endif // defined(DEBUG) 287 #endif // defined(DEBUG)
286 288
287 // Eagerly compile Bool class, bool constants are used from within compiler. 289 // Eagerly compile Bool class, bool constants are used from within compiler.
288 cls = object_store->bool_class(); 290 cls = object_store->bool_class();
289 Compiler::CompileClass(cls); 291 Compiler::CompileClass(cls);
290 } 292 }
291 293
292 294
293 static RawError* BootstrapFromSource(Thread* thread) { 295 static RawError* BootstrapFromSource(Thread* thread) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 lib.Register(thread); 409 lib.Register(thread);
408 isolate->object_store()->set_bootstrap_library(id, lib); 410 isolate->object_store()->set_bootstrap_library(id, lib);
409 } 411 }
410 } 412 }
411 413
412 return (kernel_program == NULL) ? BootstrapFromSource(thread) 414 return (kernel_program == NULL) ? BootstrapFromSource(thread)
413 : BootstrapFromKernel(thread, kernel_program); 415 : BootstrapFromKernel(thread, kernel_program);
414 } 416 }
415 417
416 } // namespace dart 418 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_nocore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698