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

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

Issue 11412137: Reenable function source fingerprint checks. Added checks to MethodRecognizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | runtime/vm/intermediate_language.cc » ('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 #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 11 matching lines...) Expand all
22 class Definition; 22 class Definition;
23 class Environment; 23 class Environment;
24 class FlowGraphCompiler; 24 class FlowGraphCompiler;
25 class FlowGraphVisitor; 25 class FlowGraphVisitor;
26 class Instruction; 26 class Instruction;
27 class LocalVariable; 27 class LocalVariable;
28 class Range; 28 class Range;
29 29
30 30
31 // TODO(srdjan): Add _ByteArrayBase, get:length. 31 // TODO(srdjan): Add _ByteArrayBase, get:length.
32 32 // TODO(srdjan): Unify with INTRINSIC_LIST.
33 // (class-name, function-name, recognized enum, fingerprint).
34 // See intrinsifier for fingerprint computation.
33 #define RECOGNIZED_LIST(V) \ 35 #define RECOGNIZED_LIST(V) \
34 V(_ObjectArray, get:length, ObjectArrayLength) \ 36 V(_ObjectArray, get:length, ObjectArrayLength, 405297088) \
35 V(_ImmutableArray, get:length, ImmutableArrayLength) \ 37 V(_ImmutableArray, get:length, ImmutableArrayLength, 433698233) \
36 V(_GrowableObjectArray, get:length, GrowableArrayLength) \ 38 V(_GrowableObjectArray, get:length, GrowableArrayLength, 725548050) \
37 V(_GrowableObjectArray, get:capacity, GrowableArrayCapacity) \ 39 V(_GrowableObjectArray, get:capacity, GrowableArrayCapacity, 725548050) \
38 V(_StringBase, get:length, StringBaseLength) \ 40 V(_StringBase, get:length, StringBaseLength, 320803993) \
39 V(_StringBase, get:isEmpty, StringBaseIsEmpty) \ 41 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 1065961093) \
40 V(_StringBase, charCodeAt, StringBaseCharCodeAt) \ 42 V(_StringBase, charCodeAt, StringBaseCharCodeAt, 984449525) \
41 V(_IntegerImplementation, toDouble, IntegerToDouble) \ 43 V(_IntegerImplementation, toDouble, IntegerToDouble, 1396338041) \
42 V(_Double, toInt, DoubleToInteger) \ 44 V(_Double, toInt, DoubleToInteger, 362666636) \
43 V(::, sqrt, MathSqrt) \ 45 V(::, sqrt, MathSqrt, 2232519) \
44 46
45 // Class that recognizes the name and owner of a function and returns the 47 // Class that recognizes the name and owner of a function and returns the
46 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 48 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
47 // functions. 49 // functions.
48 class MethodRecognizer : public AllStatic { 50 class MethodRecognizer : public AllStatic {
49 public: 51 public:
50 enum Kind { 52 enum Kind {
51 kUnknown, 53 kUnknown,
52 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name) k##enum_name, 54 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name,
53 RECOGNIZED_LIST(DEFINE_ENUM_LIST) 55 RECOGNIZED_LIST(DEFINE_ENUM_LIST)
54 #undef DEFINE_ENUM_LIST 56 #undef DEFINE_ENUM_LIST
55 }; 57 };
56 58
57 static Kind RecognizeKind(const Function& function); 59 static Kind RecognizeKind(const Function& function);
58 static const char* KindToCString(Kind kind); 60 static const char* KindToCString(Kind kind);
59 }; 61 };
60 62
61 63
62 class Value : public ZoneAllocated { 64 class Value : public ZoneAllocated {
(...skipping 4178 matching lines...) Expand 10 before | Expand all | Expand 10 after
4241 ForwardInstructionIterator* current_iterator_; 4243 ForwardInstructionIterator* current_iterator_;
4242 4244
4243 private: 4245 private:
4244 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4246 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4245 }; 4247 };
4246 4248
4247 4249
4248 } // namespace dart 4250 } // namespace dart
4249 4251
4250 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4252 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698