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

Side by Side Diff: src/objects-debug.cc

Issue 2933283002: [objects] Relax JSBoundFunction verification. (Closed)
Patch Set: Address comments. Created 3 years, 6 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/objects.h ('k') | src/objects-inl.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/assembler-inl.h" 7 #include "src/assembler-inl.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/disasm.h" 9 #include "src/disasm.h"
10 #include "src/disassembler.h" 10 #include "src/disassembler.h"
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 CHECK(this->length() >= SlicedString::kMinLength); 680 CHECK(this->length() >= SlicedString::kMinLength);
681 } 681 }
682 682
683 683
684 void JSBoundFunction::JSBoundFunctionVerify() { 684 void JSBoundFunction::JSBoundFunctionVerify() {
685 CHECK(IsJSBoundFunction()); 685 CHECK(IsJSBoundFunction());
686 JSObjectVerify(); 686 JSObjectVerify();
687 VerifyObjectField(kBoundThisOffset); 687 VerifyObjectField(kBoundThisOffset);
688 VerifyObjectField(kBoundTargetFunctionOffset); 688 VerifyObjectField(kBoundTargetFunctionOffset);
689 VerifyObjectField(kBoundArgumentsOffset); 689 VerifyObjectField(kBoundArgumentsOffset);
690 CHECK(bound_target_function()->IsCallable());
691 CHECK(IsCallable()); 690 CHECK(IsCallable());
692 CHECK_EQ(IsConstructor(), bound_target_function()->IsConstructor()); 691
692 Isolate* const isolate = GetIsolate();
693 if (!raw_bound_target_function()->IsUndefined(isolate)) {
694 CHECK(bound_target_function()->IsCallable());
695 CHECK_EQ(IsConstructor(), bound_target_function()->IsConstructor());
696 }
693 } 697 }
694 698
695
696 void JSFunction::JSFunctionVerify() { 699 void JSFunction::JSFunctionVerify() {
697 CHECK(IsJSFunction()); 700 CHECK(IsJSFunction());
698 VerifyObjectField(kPrototypeOrInitialMapOffset); 701 VerifyObjectField(kPrototypeOrInitialMapOffset);
699 VerifyObjectField(kNextFunctionLinkOffset); 702 VerifyObjectField(kNextFunctionLinkOffset);
700 CHECK(code()->IsCode()); 703 CHECK(code()->IsCode());
701 CHECK(next_function_link() == NULL || 704 CHECK(next_function_link() == NULL ||
702 next_function_link()->IsUndefined(GetIsolate()) || 705 next_function_link()->IsUndefined(GetIsolate()) ||
703 next_function_link()->IsJSFunction()); 706 next_function_link()->IsJSFunction());
704 CHECK(map()->is_callable()); 707 CHECK(map()->is_callable());
705 } 708 }
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 1695
1693 // Both are done at the same time. 1696 // Both are done at the same time.
1694 CHECK_EQ(new_it.done(), old_it.done()); 1697 CHECK_EQ(new_it.done(), old_it.done());
1695 } 1698 }
1696 1699
1697 1700
1698 #endif // DEBUG 1701 #endif // DEBUG
1699 1702
1700 } // namespace internal 1703 } // namespace internal
1701 } // namespace v8 1704 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698