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

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

Issue 2693863006: VM: Restore old implementation of ClassID.cid* fields (Closed)
Patch Set: Done Created 3 years, 10 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/kernel_reader.cc ('k') | runtime/vm/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) 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 8
9 #include "vm/kernel_to_il.h" 9 #include "vm/kernel_to_il.h"
10 10
(...skipping 4478 matching lines...) Expand 10 before | Expand all | Expand 10 after
4489 fragment_ = instructions; 4489 fragment_ = instructions;
4490 } 4490 }
4491 4491
4492 4492
4493 void FlowGraphBuilder::VisitStaticGet(StaticGet* node) { 4493 void FlowGraphBuilder::VisitStaticGet(StaticGet* node) {
4494 Member* target = node->target(); 4494 Member* target = node->target();
4495 if (target->IsField()) { 4495 if (target->IsField()) {
4496 Field* kernel_field = Field::Cast(target); 4496 Field* kernel_field = Field::Cast(target);
4497 const dart::Field& field = 4497 const dart::Field& field =
4498 dart::Field::ZoneHandle(Z, H.LookupFieldByKernelField(kernel_field)); 4498 dart::Field::ZoneHandle(Z, H.LookupFieldByKernelField(kernel_field));
4499 if (kernel_field->IsConst()) { 4499 if (field.is_const()) {
4500 fragment_ = Constant(constant_evaluator_.EvaluateExpression(node)); 4500 fragment_ = Constant(constant_evaluator_.EvaluateExpression(node));
4501 } else { 4501 } else {
4502 const dart::Class& owner = dart::Class::Handle(Z, field.Owner()); 4502 const dart::Class& owner = dart::Class::Handle(Z, field.Owner());
4503 const dart::String& getter_name = H.DartGetterName(kernel_field->name()); 4503 const dart::String& getter_name = H.DartGetterName(kernel_field->name());
4504 const Function& getter = 4504 const Function& getter =
4505 Function::ZoneHandle(Z, owner.LookupStaticFunction(getter_name)); 4505 Function::ZoneHandle(Z, owner.LookupStaticFunction(getter_name));
4506 if (getter.IsNull() || !field.has_initializer()) { 4506 if (getter.IsNull() || !field.has_initializer()) {
4507 Fragment instructions = Constant(field); 4507 Fragment instructions = Constant(field);
4508 fragment_ = instructions + LoadStaticField(); 4508 fragment_ = instructions + LoadStaticField();
4509 } else { 4509 } else {
(...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after
6280 thread->clear_sticky_error(); 6280 thread->clear_sticky_error();
6281 return error.raw(); 6281 return error.raw();
6282 } 6282 }
6283 } 6283 }
6284 6284
6285 6285
6286 } // namespace kernel 6286 } // namespace kernel
6287 } // namespace dart 6287 } // namespace dart
6288 6288
6289 #endif // !defined(DART_PRECOMPILED_RUNTIME) 6289 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/vm/kernel_reader.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698