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

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

Issue 197873005: Recognize _TypedListBase._cid native. Use Lists.copy instead of native _setRange if list is small. … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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/lib/typed_data.dart ('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 2999 matching lines...) Expand 10 before | Expand all | Expand 10 after
3010 (kind != MethodRecognizer::kGrowableArrayLength); 3010 (kind != MethodRecognizer::kGrowableArrayLength);
3011 LoadFieldInstr* load = new LoadFieldInstr( 3011 LoadFieldInstr* load = new LoadFieldInstr(
3012 receiver, 3012 receiver,
3013 OffsetForLengthGetter(kind), 3013 OffsetForLengthGetter(kind),
3014 Type::ZoneHandle(Type::SmiType()), 3014 Type::ZoneHandle(Type::SmiType()),
3015 is_immutable); 3015 is_immutable);
3016 load->set_result_cid(kSmiCid); 3016 load->set_result_cid(kSmiCid);
3017 load->set_recognized_kind(kind); 3017 load->set_recognized_kind(kind);
3018 return ReturnDefinition(load); 3018 return ReturnDefinition(load);
3019 } 3019 }
3020 case MethodRecognizer::kObjectCid: { 3020 case MethodRecognizer::kObjectCid:
3021 case MethodRecognizer::kTypedListBaseCid: {
3021 Value* receiver = Bind(BuildLoadThisVar(node->scope())); 3022 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3022 LoadClassIdInstr* load = new LoadClassIdInstr(receiver); 3023 LoadClassIdInstr* load = new LoadClassIdInstr(receiver);
3023 return ReturnDefinition(load); 3024 return ReturnDefinition(load);
3024 } 3025 }
3025 case MethodRecognizer::kGrowableArrayCapacity: { 3026 case MethodRecognizer::kGrowableArrayCapacity: {
3026 Value* receiver = Bind(BuildLoadThisVar(node->scope())); 3027 Value* receiver = Bind(BuildLoadThisVar(node->scope()));
3027 LoadFieldInstr* data_load = new LoadFieldInstr( 3028 LoadFieldInstr* data_load = new LoadFieldInstr(
3028 receiver, 3029 receiver,
3029 Array::data_offset(), 3030 Array::data_offset(),
3030 Type::ZoneHandle(Type::DynamicType())); 3031 Type::ZoneHandle(Type::DynamicType()));
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
3902 LanguageError::kError, 3903 LanguageError::kError,
3903 Heap::kNew, 3904 Heap::kNew,
3904 "FlowGraphBuilder Bailout: %s %s", 3905 "FlowGraphBuilder Bailout: %s %s",
3905 String::Handle(function.name()).ToCString(), 3906 String::Handle(function.name()).ToCString(),
3906 reason)); 3907 reason));
3907 Isolate::Current()->long_jump_base()->Jump(1, error); 3908 Isolate::Current()->long_jump_base()->Jump(1, error);
3908 } 3909 }
3909 3910
3910 3911
3911 } // namespace dart 3912 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/typed_data.dart ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698