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

Side by Side Diff: src/objects.h

Issue 2606093002: [promises] Refactor debug code (Closed)
Patch Set: fix stuff Created 3 years, 11 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 | « src/js/promise.js ('k') | src/objects-debug.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 6542 matching lines...) Expand 10 before | Expand all | Expand 10 after
6553 DECLARE_CAST(Struct) 6553 DECLARE_CAST(Struct)
6554 }; 6554 };
6555 6555
6556 // A container struct to hold state required for PromiseResolveThenableJob. 6556 // A container struct to hold state required for PromiseResolveThenableJob.
6557 class PromiseResolveThenableJobInfo : public Struct { 6557 class PromiseResolveThenableJobInfo : public Struct {
6558 public: 6558 public:
6559 DECL_ACCESSORS(thenable, JSReceiver) 6559 DECL_ACCESSORS(thenable, JSReceiver)
6560 DECL_ACCESSORS(then, JSReceiver) 6560 DECL_ACCESSORS(then, JSReceiver)
6561 DECL_ACCESSORS(resolve, JSFunction) 6561 DECL_ACCESSORS(resolve, JSFunction)
6562 DECL_ACCESSORS(reject, JSFunction) 6562 DECL_ACCESSORS(reject, JSFunction)
6563 DECL_ACCESSORS(debug_id, Object) 6563
6564 DECL_ACCESSORS(debug_name, Object) 6564 DECL_INT_ACCESSORS(debug_id)
6565 DECL_INT_ACCESSORS(debug_name)
6566
6565 DECL_ACCESSORS(context, Context) 6567 DECL_ACCESSORS(context, Context)
6566 6568
6567 static const int kThenableOffset = Struct::kHeaderSize; 6569 static const int kThenableOffset = Struct::kHeaderSize;
6568 static const int kThenOffset = kThenableOffset + kPointerSize; 6570 static const int kThenOffset = kThenableOffset + kPointerSize;
6569 static const int kResolveOffset = kThenOffset + kPointerSize; 6571 static const int kResolveOffset = kThenOffset + kPointerSize;
6570 static const int kRejectOffset = kResolveOffset + kPointerSize; 6572 static const int kRejectOffset = kResolveOffset + kPointerSize;
6571 static const int kDebugIdOffset = kRejectOffset + kPointerSize; 6573 static const int kDebugIdOffset = kRejectOffset + kPointerSize;
6572 static const int kDebugNameOffset = kDebugIdOffset + kPointerSize; 6574 static const int kDebugNameOffset = kDebugIdOffset + kPointerSize;
6573 static const int kContextOffset = kDebugNameOffset + kPointerSize; 6575 static const int kContextOffset = kDebugNameOffset + kPointerSize;
6574 static const int kSize = kContextOffset + kPointerSize; 6576 static const int kSize = kContextOffset + kPointerSize;
(...skipping 13 matching lines...) Expand all
6588 public: 6590 public:
6589 DECL_ACCESSORS(promise, JSPromise) 6591 DECL_ACCESSORS(promise, JSPromise)
6590 DECL_ACCESSORS(value, Object) 6592 DECL_ACCESSORS(value, Object)
6591 DECL_ACCESSORS(tasks, Object) 6593 DECL_ACCESSORS(tasks, Object)
6592 6594
6593 // Check comment in JSPromise for information on what state these 6595 // Check comment in JSPromise for information on what state these
6594 // deferred fields could be in. 6596 // deferred fields could be in.
6595 DECL_ACCESSORS(deferred_promise, Object) 6597 DECL_ACCESSORS(deferred_promise, Object)
6596 DECL_ACCESSORS(deferred_on_resolve, Object) 6598 DECL_ACCESSORS(deferred_on_resolve, Object)
6597 DECL_ACCESSORS(deferred_on_reject, Object) 6599 DECL_ACCESSORS(deferred_on_reject, Object)
6598 DECL_ACCESSORS(debug_id, Object) 6600
6599 DECL_ACCESSORS(debug_name, Object) 6601 DECL_INT_ACCESSORS(debug_id)
6602 DECL_INT_ACCESSORS(debug_name)
6603
6600 DECL_ACCESSORS(context, Context) 6604 DECL_ACCESSORS(context, Context)
6601 6605
6602 static const int kPromiseOffset = Struct::kHeaderSize; 6606 static const int kPromiseOffset = Struct::kHeaderSize;
6603 static const int kValueOffset = kPromiseOffset + kPointerSize; 6607 static const int kValueOffset = kPromiseOffset + kPointerSize;
6604 static const int kTasksOffset = kValueOffset + kPointerSize; 6608 static const int kTasksOffset = kValueOffset + kPointerSize;
6605 static const int kDeferredPromiseOffset = kTasksOffset + kPointerSize; 6609 static const int kDeferredPromiseOffset = kTasksOffset + kPointerSize;
6606 static const int kDeferredOnResolveOffset = 6610 static const int kDeferredOnResolveOffset =
6607 kDeferredPromiseOffset + kPointerSize; 6611 kDeferredPromiseOffset + kPointerSize;
6608 static const int kDeferredOnRejectOffset = 6612 static const int kDeferredOnRejectOffset =
6609 kDeferredOnResolveOffset + kPointerSize; 6613 kDeferredOnResolveOffset + kPointerSize;
(...skipping 5139 matching lines...) Expand 10 before | Expand all | Expand 10 after
11749 } 11753 }
11750 }; 11754 };
11751 11755
11752 11756
11753 } // NOLINT, false-positive due to second-order macros. 11757 } // NOLINT, false-positive due to second-order macros.
11754 } // NOLINT, false-positive due to second-order macros. 11758 } // NOLINT, false-positive due to second-order macros.
11755 11759
11756 #include "src/objects/object-macros-undef.h" 11760 #include "src/objects/object-macros-undef.h"
11757 11761
11758 #endif // V8_OBJECTS_H_ 11762 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/js/promise.js ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698