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

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

Issue 1358423002: [es6] Introduce spec compliant IsConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix stupid fuzzer failure (constructor bit set on sloppy/strict arguments). Fix MIPS/MIPS64 typos, … Created 5 years, 2 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.cc ('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/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/disassembler.h" 9 #include "src/disassembler.h"
10 #include "src/macro-assembler.h" 10 #include "src/macro-assembler.h"
11 #include "src/ostreams.h" 11 #include "src/ostreams.h"
12 #include "src/regexp/jsregexp.h" 12 #include "src/regexp/jsregexp.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 #ifdef VERIFY_HEAP 17 #ifdef VERIFY_HEAP
18 18
19 void Object::ObjectVerify() { 19 void Object::ObjectVerify() {
20 if (IsSmi()) { 20 if (IsSmi()) {
21 Smi::cast(this)->SmiVerify(); 21 Smi::cast(this)->SmiVerify();
22 } else { 22 } else {
23 HeapObject::cast(this)->HeapObjectVerify(); 23 HeapObject::cast(this)->HeapObjectVerify();
24 } 24 }
25 CHECK(!IsConstructor() || IsCallable());
25 } 26 }
26 27
27 28
28 void Object::VerifyPointer(Object* p) { 29 void Object::VerifyPointer(Object* p) {
29 if (p->IsHeapObject()) { 30 if (p->IsHeapObject()) {
30 HeapObject::VerifyHeapPointer(p); 31 HeapObject::VerifyHeapPointer(p);
31 } else { 32 } else {
32 CHECK(p->IsSmi()); 33 CHECK(p->IsSmi());
33 } 34 }
34 } 35 }
35 36
36 37
37 void Smi::SmiVerify() { 38 void Smi::SmiVerify() {
38 CHECK(IsSmi()); 39 CHECK(IsSmi());
39 CHECK(!IsCallable()); 40 CHECK(!IsCallable());
41 CHECK(!IsConstructor());
40 } 42 }
41 43
42 44
43 void HeapObject::HeapObjectVerify() { 45 void HeapObject::HeapObjectVerify() {
44 InstanceType instance_type = map()->instance_type(); 46 InstanceType instance_type = map()->instance_type();
45 47
46 if (instance_type < FIRST_NONSTRING_TYPE) { 48 if (instance_type < FIRST_NONSTRING_TYPE) {
47 String::cast(this)->StringVerify(); 49 String::cast(this)->StringVerify();
48 return; 50 return;
49 } 51 }
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 1331
1330 // Both are done at the same time. 1332 // Both are done at the same time.
1331 CHECK_EQ(new_it.done(), old_it.done()); 1333 CHECK_EQ(new_it.done(), old_it.done());
1332 } 1334 }
1333 1335
1334 1336
1335 #endif // DEBUG 1337 #endif // DEBUG
1336 1338
1337 } // namespace internal 1339 } // namespace internal
1338 } // namespace v8 1340 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698