| 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 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2463 virtual void AcceptStatementVisitor(StatementVisitor* visitor); | 2463 virtual void AcceptStatementVisitor(StatementVisitor* visitor); |
| 2464 virtual void VisitChildren(Visitor* visitor); | 2464 virtual void VisitChildren(Visitor* visitor); |
| 2465 | 2465 |
| 2466 bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; } | 2466 bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; } |
| 2467 bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; } | 2467 bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; } |
| 2468 | 2468 |
| 2469 String* name() { return name_; } | 2469 String* name() { return name_; } |
| 2470 DartType* type() { return type_; } | 2470 DartType* type() { return type_; } |
| 2471 InferredValue* inferred_value() { return inferred_value_; } | 2471 InferredValue* inferred_value() { return inferred_value_; } |
| 2472 Expression* initializer() { return initializer_; } | 2472 Expression* initializer() { return initializer_; } |
| 2473 TokenPosition equals_position() { return equals_position_; } |
| 2473 TokenPosition end_position() { return end_position_; } | 2474 TokenPosition end_position() { return end_position_; } |
| 2474 | 2475 |
| 2475 private: | 2476 private: |
| 2476 VariableDeclaration() : end_position_(TokenPosition::kNoSource) {} | 2477 VariableDeclaration() |
| 2478 : equals_position_(TokenPosition::kNoSourcePos), |
| 2479 end_position_(TokenPosition::kNoSource) {} |
| 2477 | 2480 |
| 2478 template <typename T> | 2481 template <typename T> |
| 2479 friend class List; | 2482 friend class List; |
| 2480 | 2483 |
| 2481 word flags_; | 2484 word flags_; |
| 2482 Ref<String> name_; | 2485 Ref<String> name_; |
| 2483 Child<DartType> type_; | 2486 Child<DartType> type_; |
| 2484 Child<InferredValue> inferred_value_; | 2487 Child<InferredValue> inferred_value_; |
| 2485 Child<Expression> initializer_; | 2488 Child<Expression> initializer_; |
| 2489 TokenPosition equals_position_; |
| 2486 TokenPosition end_position_; | 2490 TokenPosition end_position_; |
| 2487 | 2491 |
| 2488 DISALLOW_COPY_AND_ASSIGN(VariableDeclaration); | 2492 DISALLOW_COPY_AND_ASSIGN(VariableDeclaration); |
| 2489 }; | 2493 }; |
| 2490 | 2494 |
| 2491 | 2495 |
| 2492 class FunctionDeclaration : public Statement { | 2496 class FunctionDeclaration : public Statement { |
| 2493 public: | 2497 public: |
| 2494 static FunctionDeclaration* ReadFrom(Reader* reader); | 2498 static FunctionDeclaration* ReadFrom(Reader* reader); |
| 2495 | 2499 |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3237 | 3241 |
| 3238 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, | 3242 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, |
| 3239 intptr_t buffer_length); | 3243 intptr_t buffer_length); |
| 3240 | 3244 |
| 3241 | 3245 |
| 3242 | 3246 |
| 3243 } // namespace dart | 3247 } // namespace dart |
| 3244 | 3248 |
| 3245 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 3249 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 3246 #endif // RUNTIME_VM_KERNEL_H_ | 3250 #endif // RUNTIME_VM_KERNEL_H_ |
| OLD | NEW |