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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 800833002: LoadCodeUnitsInstr can be passed both tagged and untagged string input. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « no previous file | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 3692 matching lines...) Expand 10 before | Expand all | Expand 10 after
3703 ASSERT(RawObject::IsStringClassId(class_id)); 3703 ASSERT(RawObject::IsStringClassId(class_id));
3704 SetInputAt(0, str); 3704 SetInputAt(0, str);
3705 SetInputAt(1, index); 3705 SetInputAt(1, index);
3706 } 3706 }
3707 3707
3708 intptr_t token_pos() const { return token_pos_; } 3708 intptr_t token_pos() const { return token_pos_; }
3709 3709
3710 DECLARE_INSTRUCTION(LoadCodeUnits) 3710 DECLARE_INSTRUCTION(LoadCodeUnits)
3711 virtual CompileType ComputeType() const; 3711 virtual CompileType ComputeType() const;
3712 3712
3713 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
3714 if (idx == 0) {
3715 // The string may be tagged or untagged (for external strings).
3716 return kNoRepresentation;
3717 }
3718 ASSERT(idx == 1);
3719 return kTagged;
3720 }
3721
3713 bool IsExternal() const { 3722 bool IsExternal() const {
3714 return array()->definition()->representation() == kUntagged; 3723 return array()->definition()->representation() == kUntagged;
3715 } 3724 }
3716 3725
3717 Value* array() const { return inputs_[0]; } 3726 Value* array() const { return inputs_[0]; }
3718 Value* index() const { return inputs_[1]; } 3727 Value* index() const { return inputs_[1]; }
3719 intptr_t index_scale() const { return Instance::ElementSizeFor(class_id_); } 3728 intptr_t index_scale() const { return Instance::ElementSizeFor(class_id_); }
3720 intptr_t class_id() const { return class_id_; } 3729 intptr_t class_id() const { return class_id_; }
3721 intptr_t element_count() const { return element_count_; } 3730 intptr_t element_count() const { return element_count_; }
3722 3731
(...skipping 4270 matching lines...) Expand 10 before | Expand all | Expand 10 after
7993 Isolate* isolate, bool opt) const { \ 8002 Isolate* isolate, bool opt) const { \
7994 UNIMPLEMENTED(); \ 8003 UNIMPLEMENTED(); \
7995 return NULL; \ 8004 return NULL; \
7996 } \ 8005 } \
7997 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8006 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
7998 8007
7999 8008
8000 } // namespace dart 8009 } // namespace dart
8001 8010
8002 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8011 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698