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

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

Issue 345223003: Add VM internal Dart class 'ClassID' used to manage class-ids of known classes. Next CL: add consta… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/intermediate_language.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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 3029 matching lines...) Expand 10 before | Expand all | Expand 10 after
3040 LoadFieldInstr* load = new LoadFieldInstr( 3040 LoadFieldInstr* load = new LoadFieldInstr(
3041 receiver, 3041 receiver,
3042 OffsetForLengthGetter(kind), 3042 OffsetForLengthGetter(kind),
3043 Type::ZoneHandle(I, Type::SmiType()), 3043 Type::ZoneHandle(I, Type::SmiType()),
3044 node->token_pos()); 3044 node->token_pos());
3045 load->set_is_immutable(kind != MethodRecognizer::kGrowableArrayLength); 3045 load->set_is_immutable(kind != MethodRecognizer::kGrowableArrayLength);
3046 load->set_result_cid(kSmiCid); 3046 load->set_result_cid(kSmiCid);
3047 load->set_recognized_kind(kind); 3047 load->set_recognized_kind(kind);
3048 return ReturnDefinition(load); 3048 return ReturnDefinition(load);
3049 } 3049 }
3050 case MethodRecognizer::kObjectCid: 3050 case MethodRecognizer::kClassIDgetID: {
3051 case MethodRecognizer::kTypedListBaseCid: { 3051 LocalVariable* value_var =
3052 Value* receiver = Bind(BuildLoadThisVar(node->scope())); 3052 node->scope()->LookupVariable(Symbols::Value(), true);
3053 LoadClassIdInstr* load = new LoadClassIdInstr(receiver); 3053 Value* value = Bind(new LoadLocalInstr(*value_var));
3054 LoadClassIdInstr* load = new LoadClassIdInstr(value);
3054 return ReturnDefinition(load); 3055 return ReturnDefinition(load);
3055 } 3056 }
3056 case MethodRecognizer::kGrowableArrayCapacity: { 3057 case MethodRecognizer::kGrowableArrayCapacity: {
3057 Value* receiver = Bind(BuildLoadThisVar(node->scope())); 3058 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3058 LoadFieldInstr* data_load = new LoadFieldInstr( 3059 LoadFieldInstr* data_load = new LoadFieldInstr(
3059 receiver, 3060 receiver,
3060 Array::data_offset(), 3061 Array::data_offset(),
3061 Type::ZoneHandle(I, Type::DynamicType()), 3062 Type::ZoneHandle(I, Type::DynamicType()),
3062 node->token_pos()); 3063 node->token_pos());
3063 data_load->set_result_cid(kArrayCid); 3064 data_load->set_result_cid(kArrayCid);
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
3948 Report::MessageF(Report::kBailout, 3949 Report::MessageF(Report::kBailout,
3949 Script::Handle(function.script()), 3950 Script::Handle(function.script()),
3950 function.token_pos(), 3951 function.token_pos(),
3951 "FlowGraphBuilder Bailout: %s %s", 3952 "FlowGraphBuilder Bailout: %s %s",
3952 String::Handle(function.name()).ToCString(), 3953 String::Handle(function.name()).ToCString(),
3953 reason); 3954 reason);
3954 UNREACHABLE(); 3955 UNREACHABLE();
3955 } 3956 }
3956 3957
3957 } // namespace dart 3958 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698