Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 V(_List, get:length, ObjectArrayLength, 215183186) \ | 175 V(_List, get:length, ObjectArrayLength, 215183186) \ |
| 176 V(_ImmutableList, get:length, ImmutableArrayLength, 578762861) \ | 176 V(_ImmutableList, get:length, ImmutableArrayLength, 578762861) \ |
| 177 V(_TypedList, get:length, TypedDataLength, 26646119) \ | 177 V(_TypedList, get:length, TypedDataLength, 26646119) \ |
| 178 V(_GrowableList, get:length, GrowableArrayLength, 1654255033) \ | 178 V(_GrowableList, get:length, GrowableArrayLength, 1654255033) \ |
| 179 V(_StringBase, get:length, StringBaseLength, 1483549854) \ | 179 V(_StringBase, get:length, StringBaseLength, 1483549854) \ |
| 180 V(ListIterator, moveNext, ListIteratorMoveNext, 2062984847) \ | 180 V(ListIterator, moveNext, ListIteratorMoveNext, 2062984847) \ |
| 181 V(_GrowableList, get:iterator, GrowableArrayIterator, 1155241039) \ | 181 V(_GrowableList, get:iterator, GrowableArrayIterator, 1155241039) \ |
| 182 V(_GrowableList, forEach, GrowableArrayForEach, 195359970) \ | 182 V(_GrowableList, forEach, GrowableArrayForEach, 195359970) \ |
| 183 | 183 |
| 184 // A list of core functions that internally dispatch based on received id. | 184 // A list of core functions that internally dispatch based on received id. |
| 185 #define POLYMORPHIC_TARGET_LIST(V) \ | 185 #define POLYMORPHIC_TARGET_LIST(V) \ |
|
Florian Schneider
2014/02/17 11:56:12
dbc: For now it's ok, but it's kind of tedious to
Cutch
2014/02/18 17:00:30
I'd like to see this removed too. We need to teach
| |
| 186 V(_StringBase, [], StringBaseCharAt, 585372763) \ | |
| 187 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \ | |
| 186 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \ | 188 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \ |
| 187 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \ | 189 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \ |
| 188 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \ | 190 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \ |
| 189 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \ | 191 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \ |
| 190 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \ | 192 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \ |
| 191 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \ | 193 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \ |
| 192 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \ | 194 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \ |
| 193 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \ | 195 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \ |
| 194 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \ | 196 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \ |
| 195 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 163795162) \ | 197 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 163795162) \ |
| (...skipping 3505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3701 const intptr_t class_id_; | 3703 const intptr_t class_id_; |
| 3702 | 3704 |
| 3703 DISALLOW_COPY_AND_ASSIGN(LoadIndexedInstr); | 3705 DISALLOW_COPY_AND_ASSIGN(LoadIndexedInstr); |
| 3704 }; | 3706 }; |
| 3705 | 3707 |
| 3706 | 3708 |
| 3707 class StringFromCharCodeInstr : public TemplateDefinition<1> { | 3709 class StringFromCharCodeInstr : public TemplateDefinition<1> { |
| 3708 public: | 3710 public: |
| 3709 StringFromCharCodeInstr(Value* char_code, intptr_t cid) : cid_(cid) { | 3711 StringFromCharCodeInstr(Value* char_code, intptr_t cid) : cid_(cid) { |
| 3710 ASSERT(char_code != NULL); | 3712 ASSERT(char_code != NULL); |
| 3711 ASSERT(char_code->definition()->IsLoadIndexed() && | 3713 ASSERT(char_code->definition()->IsLoadIndexed()); |
| 3712 (char_code->definition()->AsLoadIndexed()->class_id() == | 3714 ASSERT(char_code->definition()->AsLoadIndexed()->class_id() == |
| 3713 kOneByteStringCid)); | 3715 kOneByteStringCid); |
| 3714 SetInputAt(0, char_code); | 3716 SetInputAt(0, char_code); |
| 3715 } | 3717 } |
| 3716 | 3718 |
| 3717 DECLARE_INSTRUCTION(StringFromCharCode) | 3719 DECLARE_INSTRUCTION(StringFromCharCode) |
| 3718 virtual CompileType ComputeType() const; | 3720 virtual CompileType ComputeType() const; |
| 3719 | 3721 |
| 3720 Value* char_code() const { return inputs_[0]; } | 3722 Value* char_code() const { return inputs_[0]; } |
| 3721 | 3723 |
| 3722 virtual bool CanDeoptimize() const { return false; } | 3724 virtual bool CanDeoptimize() const { return false; } |
| 3723 | 3725 |
| (...skipping 3382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7106 ForwardInstructionIterator* current_iterator_; | 7108 ForwardInstructionIterator* current_iterator_; |
| 7107 | 7109 |
| 7108 private: | 7110 private: |
| 7109 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 7111 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 7110 }; | 7112 }; |
| 7111 | 7113 |
| 7112 | 7114 |
| 7113 } // namespace dart | 7115 } // namespace dart |
| 7114 | 7116 |
| 7115 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 7117 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |