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

Side by Side Diff: src/objects.h

Issue 2606093002: [promises] Refactor debug code (Closed)
Patch Set: make debug_name a smi 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
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 6539 matching lines...) Expand 10 before | Expand all | Expand 10 after
6550 DECLARE_CAST(Struct) 6550 DECLARE_CAST(Struct)
6551 }; 6551 };
6552 6552
6553 // A container struct to hold state required for PromiseResolveThenableJob. 6553 // A container struct to hold state required for PromiseResolveThenableJob.
6554 class PromiseResolveThenableJobInfo : public Struct { 6554 class PromiseResolveThenableJobInfo : public Struct {
6555 public: 6555 public:
6556 DECL_ACCESSORS(thenable, JSReceiver) 6556 DECL_ACCESSORS(thenable, JSReceiver)
6557 DECL_ACCESSORS(then, JSReceiver) 6557 DECL_ACCESSORS(then, JSReceiver)
6558 DECL_ACCESSORS(resolve, JSFunction) 6558 DECL_ACCESSORS(resolve, JSFunction)
6559 DECL_ACCESSORS(reject, JSFunction) 6559 DECL_ACCESSORS(reject, JSFunction)
6560 DECL_ACCESSORS(debug_id, Object) 6560
6561 DECL_ACCESSORS(debug_name, Object) 6561 DECL_INT_ACCESSORS(debug_id)
6562 DECL_INT_ACCESSORS(debug_name)
6563
6562 DECL_ACCESSORS(context, Context) 6564 DECL_ACCESSORS(context, Context)
6563 6565
6564 static const int kThenableOffset = Struct::kHeaderSize; 6566 static const int kThenableOffset = Struct::kHeaderSize;
6565 static const int kThenOffset = kThenableOffset + kPointerSize; 6567 static const int kThenOffset = kThenableOffset + kPointerSize;
6566 static const int kResolveOffset = kThenOffset + kPointerSize; 6568 static const int kResolveOffset = kThenOffset + kPointerSize;
6567 static const int kRejectOffset = kResolveOffset + kPointerSize; 6569 static const int kRejectOffset = kResolveOffset + kPointerSize;
6568 static const int kDebugIdOffset = kRejectOffset + kPointerSize; 6570 static const int kDebugIdOffset = kRejectOffset + kPointerSize;
6569 static const int kDebugNameOffset = kDebugIdOffset + kPointerSize; 6571 static const int kDebugNameOffset = kDebugIdOffset + kPointerSize;
6570 static const int kContextOffset = kDebugNameOffset + kPointerSize; 6572 static const int kContextOffset = kDebugNameOffset + kPointerSize;
6571 static const int kSize = kContextOffset + kPointerSize; 6573 static const int kSize = kContextOffset + kPointerSize;
(...skipping 13 matching lines...) Expand all
6585 public: 6587 public:
6586 DECL_ACCESSORS(promise, JSPromise) 6588 DECL_ACCESSORS(promise, JSPromise)
6587 DECL_ACCESSORS(value, Object) 6589 DECL_ACCESSORS(value, Object)
6588 DECL_ACCESSORS(tasks, Object) 6590 DECL_ACCESSORS(tasks, Object)
6589 6591
6590 // Check comment in JSPromise for information on what state these 6592 // Check comment in JSPromise for information on what state these
6591 // deferred fields could be in. 6593 // deferred fields could be in.
6592 DECL_ACCESSORS(deferred_promise, Object) 6594 DECL_ACCESSORS(deferred_promise, Object)
6593 DECL_ACCESSORS(deferred_on_resolve, Object) 6595 DECL_ACCESSORS(deferred_on_resolve, Object)
6594 DECL_ACCESSORS(deferred_on_reject, Object) 6596 DECL_ACCESSORS(deferred_on_reject, Object)
6595 DECL_ACCESSORS(debug_id, Object) 6597
6596 DECL_ACCESSORS(debug_name, Object) 6598 DECL_INT_ACCESSORS(debug_id)
6599 DECL_INT_ACCESSORS(debug_name)
6600
6597 DECL_ACCESSORS(context, Context) 6601 DECL_ACCESSORS(context, Context)
6598 6602
6599 static const int kPromiseOffset = Struct::kHeaderSize; 6603 static const int kPromiseOffset = Struct::kHeaderSize;
6600 static const int kValueOffset = kPromiseOffset + kPointerSize; 6604 static const int kValueOffset = kPromiseOffset + kPointerSize;
6601 static const int kTasksOffset = kValueOffset + kPointerSize; 6605 static const int kTasksOffset = kValueOffset + kPointerSize;
6602 static const int kDeferredPromiseOffset = kTasksOffset + kPointerSize; 6606 static const int kDeferredPromiseOffset = kTasksOffset + kPointerSize;
6603 static const int kDeferredOnResolveOffset = 6607 static const int kDeferredOnResolveOffset =
6604 kDeferredPromiseOffset + kPointerSize; 6608 kDeferredPromiseOffset + kPointerSize;
6605 static const int kDeferredOnRejectOffset = 6609 static const int kDeferredOnRejectOffset =
6606 kDeferredOnResolveOffset + kPointerSize; 6610 kDeferredOnResolveOffset + kPointerSize;
(...skipping 5113 matching lines...) Expand 10 before | Expand all | Expand 10 after
11720 } 11724 }
11721 }; 11725 };
11722 11726
11723 11727
11724 } // NOLINT, false-positive due to second-order macros. 11728 } // NOLINT, false-positive due to second-order macros.
11725 } // NOLINT, false-positive due to second-order macros. 11729 } // NOLINT, false-positive due to second-order macros.
11726 11730
11727 #include "src/objects/object-macros-undef.h" 11731 #include "src/objects/object-macros-undef.h"
11728 11732
11729 #endif // V8_OBJECTS_H_ 11733 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698