OLD | NEW |
---|---|
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 RUNTIME_VM_KERNEL_H_ | 5 #ifndef RUNTIME_VM_KERNEL_H_ |
6 #define RUNTIME_VM_KERNEL_H_ | 6 #define RUNTIME_VM_KERNEL_H_ |
7 | 7 |
8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
696 virtual void VisitChildren(Visitor* visitor); | 696 virtual void VisitChildren(Visitor* visitor); |
697 | 697 |
698 bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; } | 698 bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; } |
699 bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; } | 699 bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; } |
700 bool IsStatic() { return (flags_ & kFlagStatic) == kFlagStatic; } | 700 bool IsStatic() { return (flags_ & kFlagStatic) == kFlagStatic; } |
701 intptr_t source_uri_index() { return source_uri_index_; } | 701 intptr_t source_uri_index() { return source_uri_index_; } |
702 | 702 |
703 DartType* type() { return type_; } | 703 DartType* type() { return type_; } |
704 InferredValue* inferred_value() { return inferred_value_; } | 704 InferredValue* inferred_value() { return inferred_value_; } |
705 Expression* initializer() { return initializer_; } | 705 Expression* initializer() { return initializer_; } |
706 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
706 | 707 |
707 private: | 708 private: |
708 Field() {} | 709 Field() : kernelFileOffset_(-1) {} |
709 | 710 |
710 template <typename T> | 711 template <typename T> |
711 friend class List; | 712 friend class List; |
712 | 713 |
713 word flags_; | 714 word flags_; |
714 intptr_t source_uri_index_; | 715 intptr_t source_uri_index_; |
715 Child<DartType> type_; | 716 Child<DartType> type_; |
716 Child<InferredValue> inferred_value_; | 717 Child<InferredValue> inferred_value_; |
717 Child<Expression> initializer_; | 718 Child<Expression> initializer_; |
719 int64_t kernelFileOffset_; | |
Kevin Millikin (Google)
2017/03/28 06:42:22
I wonder why this is int64_t.
Call the field kern
jensj
2017/03/28 08:56:28
Done.
| |
718 | 720 |
719 DISALLOW_COPY_AND_ASSIGN(Field); | 721 DISALLOW_COPY_AND_ASSIGN(Field); |
720 }; | 722 }; |
721 | 723 |
722 | 724 |
723 class Constructor : public Member { | 725 class Constructor : public Member { |
724 public: | 726 public: |
725 enum Flags { | 727 enum Flags { |
726 kFlagConst = 1 << 0, | 728 kFlagConst = 1 << 0, |
727 kFlagExternal = 1 << 1, | 729 kFlagExternal = 1 << 1, |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
966 int required_parameter_count() { return required_parameter_count_; } | 968 int required_parameter_count() { return required_parameter_count_; } |
967 List<VariableDeclaration>& positional_parameters() { | 969 List<VariableDeclaration>& positional_parameters() { |
968 return positional_parameters_; | 970 return positional_parameters_; |
969 } | 971 } |
970 List<VariableDeclaration>& named_parameters() { return named_parameters_; } | 972 List<VariableDeclaration>& named_parameters() { return named_parameters_; } |
971 DartType* return_type() { return return_type_; } | 973 DartType* return_type() { return return_type_; } |
972 InferredValue* inferred_return_value() { return inferred_return_value_; } | 974 InferredValue* inferred_return_value() { return inferred_return_value_; } |
973 Statement* body() { return body_; } | 975 Statement* body() { return body_; } |
974 TokenPosition position() { return position_; } | 976 TokenPosition position() { return position_; } |
975 TokenPosition end_position() { return end_position_; } | 977 TokenPosition end_position() { return end_position_; } |
978 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
976 | 979 |
977 private: | 980 private: |
978 FunctionNode() | 981 explicit FunctionNode(int64_t kernelFileOffset) |
979 : position_(TokenPosition::kNoSource), | 982 : position_(TokenPosition::kNoSource), |
980 end_position_(TokenPosition::kNoSource) {} | 983 end_position_(TokenPosition::kNoSource), |
984 kernelFileOffset_(kernelFileOffset) {} | |
981 | 985 |
982 AsyncMarker async_marker_; | 986 AsyncMarker async_marker_; |
983 AsyncMarker dart_async_marker_; | 987 AsyncMarker dart_async_marker_; |
984 TypeParameterList type_parameters_; | 988 TypeParameterList type_parameters_; |
985 int required_parameter_count_; | 989 int required_parameter_count_; |
986 List<VariableDeclaration> positional_parameters_; | 990 List<VariableDeclaration> positional_parameters_; |
987 List<VariableDeclaration> named_parameters_; | 991 List<VariableDeclaration> named_parameters_; |
988 Child<DartType> return_type_; | 992 Child<DartType> return_type_; |
989 Child<InferredValue> inferred_return_value_; | 993 Child<InferredValue> inferred_return_value_; |
990 Child<Statement> body_; | 994 Child<Statement> body_; |
991 TokenPosition position_; | 995 TokenPosition position_; |
992 TokenPosition end_position_; | 996 TokenPosition end_position_; |
997 int64_t kernelFileOffset_; | |
993 | 998 |
994 DISALLOW_COPY_AND_ASSIGN(FunctionNode); | 999 DISALLOW_COPY_AND_ASSIGN(FunctionNode); |
995 }; | 1000 }; |
996 | 1001 |
997 | 1002 |
998 class Expression : public TreeNode { | 1003 class Expression : public TreeNode { |
999 public: | 1004 public: |
1000 static Expression* ReadFrom(Reader* reader); | 1005 static Expression* ReadFrom(Reader* reader); |
1001 | 1006 |
1002 virtual ~Expression(); | 1007 virtual ~Expression(); |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1875 static FunctionExpression* ReadFrom(Reader* reader); | 1880 static FunctionExpression* ReadFrom(Reader* reader); |
1876 | 1881 |
1877 virtual ~FunctionExpression(); | 1882 virtual ~FunctionExpression(); |
1878 | 1883 |
1879 DEFINE_CASTING_OPERATIONS(FunctionExpression); | 1884 DEFINE_CASTING_OPERATIONS(FunctionExpression); |
1880 | 1885 |
1881 virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor); | 1886 virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor); |
1882 virtual void VisitChildren(Visitor* visitor); | 1887 virtual void VisitChildren(Visitor* visitor); |
1883 | 1888 |
1884 FunctionNode* function() { return function_; } | 1889 FunctionNode* function() { return function_; } |
1890 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
1885 | 1891 |
1886 private: | 1892 private: |
1887 FunctionExpression() {} | 1893 explicit FunctionExpression(int64_t kernelFileOffset) |
1894 : kernelFileOffset_(kernelFileOffset) {} | |
1888 | 1895 |
1889 Child<FunctionNode> function_; | 1896 Child<FunctionNode> function_; |
1897 int64_t kernelFileOffset_; | |
1890 | 1898 |
1891 DISALLOW_COPY_AND_ASSIGN(FunctionExpression); | 1899 DISALLOW_COPY_AND_ASSIGN(FunctionExpression); |
1892 }; | 1900 }; |
1893 | 1901 |
1894 | 1902 |
1895 class Let : public Expression { | 1903 class Let : public Expression { |
1896 public: | 1904 public: |
1897 static Let* ReadFrom(Reader* reader); | 1905 static Let* ReadFrom(Reader* reader); |
1898 | 1906 |
1899 virtual ~Let(); | 1907 virtual ~Let(); |
1900 | 1908 |
1901 DEFINE_CASTING_OPERATIONS(Let); | 1909 DEFINE_CASTING_OPERATIONS(Let); |
1902 | 1910 |
1903 virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor); | 1911 virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor); |
1904 virtual void VisitChildren(Visitor* visitor); | 1912 virtual void VisitChildren(Visitor* visitor); |
1905 | 1913 |
1906 VariableDeclaration* variable() { return variable_; } | 1914 VariableDeclaration* variable() { return variable_; } |
1907 Expression* body() { return body_; } | 1915 Expression* body() { return body_; } |
1908 TokenPosition position() { return position_; } | 1916 TokenPosition position() { return position_; } |
1909 TokenPosition end_position() { return end_position_; } | 1917 TokenPosition end_position() { return end_position_; } |
1918 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
1910 | 1919 |
1911 private: | 1920 private: |
1912 Let() | 1921 explicit Let(int64_t kernelFileOffset) |
1913 : position_(TokenPosition::kNoSource), | 1922 : position_(TokenPosition::kNoSource), |
1914 end_position_(TokenPosition::kNoSource) {} | 1923 end_position_(TokenPosition::kNoSource), |
1924 kernelFileOffset_(kernelFileOffset) {} | |
1915 | 1925 |
1916 Child<VariableDeclaration> variable_; | 1926 Child<VariableDeclaration> variable_; |
1917 Child<Expression> body_; | 1927 Child<Expression> body_; |
1918 TokenPosition position_; | 1928 TokenPosition position_; |
1919 TokenPosition end_position_; | 1929 TokenPosition end_position_; |
1930 int64_t kernelFileOffset_; | |
1920 | 1931 |
1921 DISALLOW_COPY_AND_ASSIGN(Let); | 1932 DISALLOW_COPY_AND_ASSIGN(Let); |
1922 }; | 1933 }; |
1923 | 1934 |
1924 | 1935 |
1925 class Statement : public TreeNode { | 1936 class Statement : public TreeNode { |
1926 public: | 1937 public: |
1927 static Statement* ReadFrom(Reader* reader); | 1938 static Statement* ReadFrom(Reader* reader); |
1928 | 1939 |
1929 virtual ~Statement(); | 1940 virtual ~Statement(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1990 | 2001 |
1991 virtual ~Block(); | 2002 virtual ~Block(); |
1992 | 2003 |
1993 DEFINE_CASTING_OPERATIONS(Block); | 2004 DEFINE_CASTING_OPERATIONS(Block); |
1994 | 2005 |
1995 virtual void AcceptStatementVisitor(StatementVisitor* visitor); | 2006 virtual void AcceptStatementVisitor(StatementVisitor* visitor); |
1996 virtual void VisitChildren(Visitor* visitor); | 2007 virtual void VisitChildren(Visitor* visitor); |
1997 | 2008 |
1998 List<Statement>& statements() { return statements_; } | 2009 List<Statement>& statements() { return statements_; } |
1999 TokenPosition end_position() { return end_position_; } | 2010 TokenPosition end_position() { return end_position_; } |
2011 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
2000 | 2012 |
2001 private: | 2013 private: |
2002 Block() : end_position_(TokenPosition::kNoSource) {} | 2014 explicit Block(int64_t kernelFileOffset) |
2015 : end_position_(TokenPosition::kNoSource), | |
2016 kernelFileOffset_(kernelFileOffset) {} | |
2003 | 2017 |
2004 List<Statement> statements_; | 2018 List<Statement> statements_; |
2005 TokenPosition end_position_; | 2019 TokenPosition end_position_; |
2020 int64_t kernelFileOffset_; | |
2006 | 2021 |
2007 DISALLOW_COPY_AND_ASSIGN(Block); | 2022 DISALLOW_COPY_AND_ASSIGN(Block); |
2008 }; | 2023 }; |
2009 | 2024 |
2010 | 2025 |
2011 class EmptyStatement : public Statement { | 2026 class EmptyStatement : public Statement { |
2012 public: | 2027 public: |
2013 static EmptyStatement* ReadFrom(Reader* reader); | 2028 static EmptyStatement* ReadFrom(Reader* reader); |
2014 | 2029 |
2015 virtual ~EmptyStatement(); | 2030 virtual ~EmptyStatement(); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2152 | 2167 |
2153 virtual void AcceptStatementVisitor(StatementVisitor* visitor); | 2168 virtual void AcceptStatementVisitor(StatementVisitor* visitor); |
2154 virtual void VisitChildren(Visitor* visitor); | 2169 virtual void VisitChildren(Visitor* visitor); |
2155 | 2170 |
2156 List<VariableDeclaration>& variables() { return variables_; } | 2171 List<VariableDeclaration>& variables() { return variables_; } |
2157 Expression* condition() { return condition_; } | 2172 Expression* condition() { return condition_; } |
2158 List<Expression>& updates() { return updates_; } | 2173 List<Expression>& updates() { return updates_; } |
2159 Statement* body() { return body_; } | 2174 Statement* body() { return body_; } |
2160 TokenPosition position() { return position_; } | 2175 TokenPosition position() { return position_; } |
2161 TokenPosition end_position() { return end_position_; } | 2176 TokenPosition end_position() { return end_position_; } |
2177 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
2162 | 2178 |
2163 private: | 2179 private: |
2164 ForStatement() | 2180 explicit ForStatement(int64_t kernelFileOffset) |
2165 : position_(TokenPosition::kNoSource), | 2181 : position_(TokenPosition::kNoSource), |
2166 end_position_(TokenPosition::kNoSource) {} | 2182 end_position_(TokenPosition::kNoSource), |
2183 kernelFileOffset_(kernelFileOffset) {} | |
2167 | 2184 |
2168 List<VariableDeclaration> variables_; | 2185 List<VariableDeclaration> variables_; |
2169 Child<Expression> condition_; | 2186 Child<Expression> condition_; |
2170 List<Expression> updates_; | 2187 List<Expression> updates_; |
2171 Child<Statement> body_; | 2188 Child<Statement> body_; |
2172 TokenPosition position_; | 2189 TokenPosition position_; |
2173 TokenPosition end_position_; | 2190 TokenPosition end_position_; |
2191 int64_t kernelFileOffset_; | |
2174 | 2192 |
2175 DISALLOW_COPY_AND_ASSIGN(ForStatement); | 2193 DISALLOW_COPY_AND_ASSIGN(ForStatement); |
2176 }; | 2194 }; |
2177 | 2195 |
2178 | 2196 |
2179 class ForInStatement : public Statement { | 2197 class ForInStatement : public Statement { |
2180 public: | 2198 public: |
2181 static ForInStatement* ReadFrom(Reader* reader, bool is_async); | 2199 static ForInStatement* ReadFrom(Reader* reader, bool is_async); |
2182 | 2200 |
2183 virtual ~ForInStatement(); | 2201 virtual ~ForInStatement(); |
2184 | 2202 |
2185 DEFINE_CASTING_OPERATIONS(ForInStatement); | 2203 DEFINE_CASTING_OPERATIONS(ForInStatement); |
2186 | 2204 |
2187 virtual void AcceptStatementVisitor(StatementVisitor* visitor); | 2205 virtual void AcceptStatementVisitor(StatementVisitor* visitor); |
2188 virtual void VisitChildren(Visitor* visitor); | 2206 virtual void VisitChildren(Visitor* visitor); |
2189 | 2207 |
2190 VariableDeclaration* variable() { return variable_; } | 2208 VariableDeclaration* variable() { return variable_; } |
2191 Expression* iterable() { return iterable_; } | 2209 Expression* iterable() { return iterable_; } |
2192 Statement* body() { return body_; } | 2210 Statement* body() { return body_; } |
2193 bool is_async() { return is_async_; } | 2211 bool is_async() { return is_async_; } |
2194 TokenPosition position() { return position_; } | 2212 TokenPosition position() { return position_; } |
2195 TokenPosition end_position() { return end_position_; } | 2213 TokenPosition end_position() { return end_position_; } |
2214 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
2196 | 2215 |
2197 private: | 2216 private: |
2198 ForInStatement() | 2217 explicit ForInStatement(int64_t kernelFileOffset) |
2199 : position_(TokenPosition::kNoSource), | 2218 : position_(TokenPosition::kNoSource), |
2200 end_position_(TokenPosition::kNoSource) {} | 2219 end_position_(TokenPosition::kNoSource), |
2220 kernelFileOffset_(kernelFileOffset) {} | |
2201 | 2221 |
2202 Child<VariableDeclaration> variable_; | 2222 Child<VariableDeclaration> variable_; |
2203 Child<Expression> iterable_; | 2223 Child<Expression> iterable_; |
2204 Child<Statement> body_; | 2224 Child<Statement> body_; |
2205 bool is_async_; | 2225 bool is_async_; |
2206 TokenPosition position_; | 2226 TokenPosition position_; |
2207 TokenPosition end_position_; | 2227 TokenPosition end_position_; |
2228 int64_t kernelFileOffset_; | |
2208 | 2229 |
2209 DISALLOW_COPY_AND_ASSIGN(ForInStatement); | 2230 DISALLOW_COPY_AND_ASSIGN(ForInStatement); |
2210 }; | 2231 }; |
2211 | 2232 |
2212 | 2233 |
2213 class SwitchStatement : public Statement { | 2234 class SwitchStatement : public Statement { |
2214 public: | 2235 public: |
2215 static SwitchStatement* ReadFrom(Reader* reader); | 2236 static SwitchStatement* ReadFrom(Reader* reader); |
2216 | 2237 |
2217 virtual ~SwitchStatement(); | 2238 virtual ~SwitchStatement(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2367 | 2388 |
2368 virtual void AcceptTreeVisitor(TreeVisitor* visitor); | 2389 virtual void AcceptTreeVisitor(TreeVisitor* visitor); |
2369 virtual void VisitChildren(Visitor* visitor); | 2390 virtual void VisitChildren(Visitor* visitor); |
2370 | 2391 |
2371 DartType* guard() { return guard_; } | 2392 DartType* guard() { return guard_; } |
2372 VariableDeclaration* exception() { return exception_; } | 2393 VariableDeclaration* exception() { return exception_; } |
2373 VariableDeclaration* stack_trace() { return stack_trace_; } | 2394 VariableDeclaration* stack_trace() { return stack_trace_; } |
2374 Statement* body() { return body_; } | 2395 Statement* body() { return body_; } |
2375 TokenPosition position() { return position_; } | 2396 TokenPosition position() { return position_; } |
2376 TokenPosition end_position() { return end_position_; } | 2397 TokenPosition end_position() { return end_position_; } |
2398 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
2377 | 2399 |
2378 private: | 2400 private: |
2379 Catch() | 2401 explicit Catch(int64_t kernelFileOffset) |
2380 : position_(TokenPosition::kNoSource), | 2402 : position_(TokenPosition::kNoSource), |
2381 end_position_(TokenPosition::kNoSource) {} | 2403 end_position_(TokenPosition::kNoSource), |
2404 kernelFileOffset_(kernelFileOffset) {} | |
2382 | 2405 |
2383 template <typename T> | 2406 template <typename T> |
2384 friend class List; | 2407 friend class List; |
2385 | 2408 |
2386 Child<DartType> guard_; | 2409 Child<DartType> guard_; |
2387 Child<VariableDeclaration> exception_; | 2410 Child<VariableDeclaration> exception_; |
2388 Child<VariableDeclaration> stack_trace_; | 2411 Child<VariableDeclaration> stack_trace_; |
2389 Child<Statement> body_; | 2412 Child<Statement> body_; |
2390 TokenPosition position_; | 2413 TokenPosition position_; |
2391 TokenPosition end_position_; | 2414 TokenPosition end_position_; |
2415 int64_t kernelFileOffset_; | |
2392 | 2416 |
2393 DISALLOW_COPY_AND_ASSIGN(Catch); | 2417 DISALLOW_COPY_AND_ASSIGN(Catch); |
2394 }; | 2418 }; |
2395 | 2419 |
2396 | 2420 |
2397 class TryFinally : public Statement { | 2421 class TryFinally : public Statement { |
2398 public: | 2422 public: |
2399 static TryFinally* ReadFrom(Reader* reader); | 2423 static TryFinally* ReadFrom(Reader* reader); |
2400 | 2424 |
2401 virtual ~TryFinally(); | 2425 virtual ~TryFinally(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2467 bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; } | 2491 bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; } |
2468 bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; } | 2492 bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; } |
2469 | 2493 |
2470 String* name() { return name_; } | 2494 String* name() { return name_; } |
2471 DartType* type() { return type_; } | 2495 DartType* type() { return type_; } |
2472 InferredValue* inferred_value() { return inferred_value_; } | 2496 InferredValue* inferred_value() { return inferred_value_; } |
2473 Expression* initializer() { return initializer_; } | 2497 Expression* initializer() { return initializer_; } |
2474 TokenPosition equals_position() { return equals_position_; } | 2498 TokenPosition equals_position() { return equals_position_; } |
2475 TokenPosition end_position() { return end_position_; } | 2499 TokenPosition end_position() { return end_position_; } |
2476 void set_end_position(TokenPosition position) { end_position_ = position; } | 2500 void set_end_position(TokenPosition position) { end_position_ = position; } |
2501 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
2477 | 2502 |
2478 private: | 2503 private: |
2479 VariableDeclaration() | 2504 explicit VariableDeclaration(int64_t kernelFileOffset) |
2480 : equals_position_(TokenPosition::kNoSourcePos), | 2505 : equals_position_(TokenPosition::kNoSourcePos), |
2481 end_position_(TokenPosition::kNoSource) {} | 2506 end_position_(TokenPosition::kNoSource), |
2507 kernelFileOffset_(kernelFileOffset) {} | |
2482 | 2508 |
2483 template <typename T> | 2509 template <typename T> |
2484 friend class List; | 2510 friend class List; |
2485 | 2511 |
2486 word flags_; | 2512 word flags_; |
2487 Ref<String> name_; | 2513 Ref<String> name_; |
2488 Child<DartType> type_; | 2514 Child<DartType> type_; |
2489 Child<InferredValue> inferred_value_; | 2515 Child<InferredValue> inferred_value_; |
2490 Child<Expression> initializer_; | 2516 Child<Expression> initializer_; |
2491 TokenPosition equals_position_; | 2517 TokenPosition equals_position_; |
2492 TokenPosition end_position_; | 2518 TokenPosition end_position_; |
2519 int64_t kernelFileOffset_; | |
2493 | 2520 |
2494 DISALLOW_COPY_AND_ASSIGN(VariableDeclaration); | 2521 DISALLOW_COPY_AND_ASSIGN(VariableDeclaration); |
2495 }; | 2522 }; |
2496 | 2523 |
2497 | 2524 |
2498 class FunctionDeclaration : public Statement { | 2525 class FunctionDeclaration : public Statement { |
2499 public: | 2526 public: |
2500 static FunctionDeclaration* ReadFrom(Reader* reader); | 2527 static FunctionDeclaration* ReadFrom(Reader* reader); |
2501 | 2528 |
2502 virtual ~FunctionDeclaration(); | 2529 virtual ~FunctionDeclaration(); |
2503 | 2530 |
2504 DEFINE_CASTING_OPERATIONS(FunctionDeclaration); | 2531 DEFINE_CASTING_OPERATIONS(FunctionDeclaration); |
2505 | 2532 |
2506 virtual void AcceptStatementVisitor(StatementVisitor* visitor); | 2533 virtual void AcceptStatementVisitor(StatementVisitor* visitor); |
2507 virtual void VisitChildren(Visitor* visitor); | 2534 virtual void VisitChildren(Visitor* visitor); |
2508 | 2535 |
2509 VariableDeclaration* variable() { return variable_; } | 2536 VariableDeclaration* variable() { return variable_; } |
2510 FunctionNode* function() { return function_; } | 2537 FunctionNode* function() { return function_; } |
2538 int64_t kernel_file_offset() { return kernelFileOffset_; } | |
2511 | 2539 |
2512 private: | 2540 private: |
2513 FunctionDeclaration() {} | 2541 explicit FunctionDeclaration(int64_t kernelFileOffset) |
2542 : kernelFileOffset_(kernelFileOffset) {} | |
2514 | 2543 |
2515 Child<VariableDeclaration> variable_; | 2544 Child<VariableDeclaration> variable_; |
2516 Child<FunctionNode> function_; | 2545 Child<FunctionNode> function_; |
2546 int64_t kernelFileOffset_; | |
2517 | 2547 |
2518 DISALLOW_COPY_AND_ASSIGN(FunctionDeclaration); | 2548 DISALLOW_COPY_AND_ASSIGN(FunctionDeclaration); |
2519 }; | 2549 }; |
2520 | 2550 |
2521 | 2551 |
2522 class Name : public Node { | 2552 class Name : public Node { |
2523 public: | 2553 public: |
2524 static Name* ReadFrom(Reader* reader); | 2554 static Name* ReadFrom(Reader* reader); |
2525 | 2555 |
2526 virtual ~Name(); | 2556 virtual ~Name(); |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3243 | 3273 |
3244 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 3274 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
3245 intptr_t buffer_length); | 3275 intptr_t buffer_length); |
3246 | 3276 |
3247 | 3277 |
3248 | 3278 |
3249 } // namespace dart | 3279 } // namespace dart |
3250 | 3280 |
3251 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3281 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
3252 #endif // RUNTIME_VM_KERNEL_H_ | 3282 #endif // RUNTIME_VM_KERNEL_H_ |
OLD | NEW |