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

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

Issue 2778423002: Revert "[kernel] Don't use kernel ast nodes as keys" (Closed)
Patch Set: Created 3 years, 8 months 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
« no previous file with comments | « no previous file | runtime/vm/kernel_binary.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) 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 428
429 class TreeNode : public Node { 429 class TreeNode : public Node {
430 public: 430 public:
431 virtual ~TreeNode(); 431 virtual ~TreeNode();
432 432
433 DEFINE_CASTING_OPERATIONS(TreeNode); 433 DEFINE_CASTING_OPERATIONS(TreeNode);
434 434
435 virtual void AcceptVisitor(Visitor* visitor); 435 virtual void AcceptVisitor(Visitor* visitor);
436 virtual void AcceptTreeVisitor(TreeVisitor* visitor) = 0; 436 virtual void AcceptTreeVisitor(TreeVisitor* visitor) = 0;
437 intptr_t kernel_offset() { return kernel_offset_; }
438 437
439 protected: 438 protected:
440 TreeNode() : kernel_offset_(-1) {} 439 TreeNode() {}
441
442 // Offset for this node in the kernel-binary. If this node has a tag the
443 // offset includes the tag. Can be -1 to indicate "unknown" or invalid offset.
444 intptr_t kernel_offset_;
445 440
446 private: 441 private:
447 DISALLOW_COPY_AND_ASSIGN(TreeNode); 442 DISALLOW_COPY_AND_ASSIGN(TreeNode);
448 }; 443 };
449 444
450 445
451 class LinkedNode : public TreeNode { 446 class LinkedNode : public TreeNode {
452 public: 447 public:
453 virtual ~LinkedNode(); 448 virtual ~LinkedNode();
454 449
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 2443
2449 2444
2450 class VariableDeclaration : public Statement { 2445 class VariableDeclaration : public Statement {
2451 public: 2446 public:
2452 enum Flags { 2447 enum Flags {
2453 kFlagFinal = 1 << 0, 2448 kFlagFinal = 1 << 0,
2454 kFlagConst = 1 << 1, 2449 kFlagConst = 1 << 1,
2455 }; 2450 };
2456 2451
2457 static VariableDeclaration* ReadFrom(Reader* reader); 2452 static VariableDeclaration* ReadFrom(Reader* reader);
2458 static VariableDeclaration* ReadFromImpl(Reader* reader, bool read_tag); 2453 static VariableDeclaration* ReadFromImpl(Reader* reader);
2459 2454
2460 virtual ~VariableDeclaration(); 2455 virtual ~VariableDeclaration();
2461 2456
2462 DEFINE_CASTING_OPERATIONS(VariableDeclaration); 2457 DEFINE_CASTING_OPERATIONS(VariableDeclaration);
2463 2458
2464 virtual void AcceptStatementVisitor(StatementVisitor* visitor); 2459 virtual void AcceptStatementVisitor(StatementVisitor* visitor);
2465 virtual void VisitChildren(Visitor* visitor); 2460 virtual void VisitChildren(Visitor* visitor);
2466 2461
2467 bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; } 2462 bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; }
2468 bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; } 2463 bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; }
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 3182
3188 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer, 3183 kernel::Program* ReadPrecompiledKernelFromBuffer(const uint8_t* buffer,
3189 intptr_t buffer_length); 3184 intptr_t buffer_length);
3190 3185
3191 3186
3192 3187
3193 } // namespace dart 3188 } // namespace dart
3194 3189
3195 #endif // !defined(DART_PRECOMPILED_RUNTIME) 3190 #endif // !defined(DART_PRECOMPILED_RUNTIME)
3196 #endif // RUNTIME_VM_KERNEL_H_ 3191 #endif // RUNTIME_VM_KERNEL_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/kernel_binary.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698