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

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

Issue 2818273002: Remove parent_level field of function type parameters. (Closed)
Patch Set: 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
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 #if !defined(DART_PRECOMPILED_RUNTIME) 9 #if !defined(DART_PRECOMPILED_RUNTIME)
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // instances. This allows us to just finalize function types without going 47 // instances. This allows us to just finalize function types without going
48 // through the hoops of trying to compile their scope class. 48 // through the hoops of trying to compile their scope class.
49 ObjectStore* object_store = thread->isolate()->object_store(); 49 ObjectStore* object_store = thread->isolate()->object_store();
50 Zone* zone = thread->zone(); 50 Zone* zone = thread->zone();
51 Class& cls = Class::Handle(zone, object_store->closure_class()); 51 Class& cls = Class::Handle(zone, object_store->closure_class());
52 Compiler::CompileClass(cls); 52 Compiler::CompileClass(cls);
53 53
54 #if defined(DEBUG) 54 #if defined(DEBUG)
55 // Verify that closure field offsets are identical in Dart and C++. 55 // Verify that closure field offsets are identical in Dart and C++.
56 const Array& fields = Array::Handle(zone, cls.fields()); 56 const Array& fields = Array::Handle(zone, cls.fields());
57 ASSERT(fields.Length() == 3); 57 ASSERT(fields.Length() == 4);
58 Field& field = Field::Handle(zone); 58 Field& field = Field::Handle(zone);
59 field ^= fields.At(0); 59 field ^= fields.At(0);
60 ASSERT(field.Offset() == Closure::instantiator_offset()); 60 ASSERT(field.Offset() == Closure::instantiator_type_arguments_offset());
61 field ^= fields.At(1); 61 field ^= fields.At(1);
62 ASSERT(field.Offset() == Closure::function_type_arguments_offset());
63 field ^= fields.At(2);
62 ASSERT(field.Offset() == Closure::function_offset()); 64 ASSERT(field.Offset() == Closure::function_offset());
63 field ^= fields.At(2); 65 field ^= fields.At(3);
64 ASSERT(field.Offset() == Closure::context_offset()); 66 ASSERT(field.Offset() == Closure::context_offset());
65 #endif // defined(DEBUG) 67 #endif // defined(DEBUG)
66 68
67 // Eagerly compile Bool class, bool constants are used from within compiler. 69 // Eagerly compile Bool class, bool constants are used from within compiler.
68 cls = object_store->bool_class(); 70 cls = object_store->bool_class();
69 Compiler::CompileClass(cls); 71 Compiler::CompileClass(cls);
70 } 72 }
71 73
72 74
73 RawError* BootstrapFromKernel(Thread* thread, kernel::Program* program) { 75 RawError* BootstrapFromKernel(Thread* thread, kernel::Program* program) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return BootstrapFromKernel(thread, program); 136 return BootstrapFromKernel(thread, program);
135 } 137 }
136 #else 138 #else
137 RawError* Bootstrap::DoBootstrapping(kernel::Program* program) { 139 RawError* Bootstrap::DoBootstrapping(kernel::Program* program) {
138 UNREACHABLE(); 140 UNREACHABLE();
139 return Error::null(); 141 return Error::null();
140 } 142 }
141 #endif // !defined(DART_PRECOMPILED_RUNTIME) 143 #endif // !defined(DART_PRECOMPILED_RUNTIME)
142 144
143 } // namespace dart 145 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698