OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 case CODE_TYPE: | 128 case CODE_TYPE: |
129 Code::cast(this)->CodeVerify(); | 129 Code::cast(this)->CodeVerify(); |
130 break; | 130 break; |
131 case ODDBALL_TYPE: | 131 case ODDBALL_TYPE: |
132 Oddball::cast(this)->OddballVerify(); | 132 Oddball::cast(this)->OddballVerify(); |
133 break; | 133 break; |
134 case JS_OBJECT_TYPE: | 134 case JS_OBJECT_TYPE: |
135 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: | 135 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
136 JSObject::cast(this)->JSObjectVerify(); | 136 JSObject::cast(this)->JSObjectVerify(); |
137 break; | 137 break; |
| 138 case JS_MODULE_TYPE: |
| 139 JSModule::cast(this)->JSModuleVerify(); |
| 140 break; |
138 case JS_VALUE_TYPE: | 141 case JS_VALUE_TYPE: |
139 JSValue::cast(this)->JSValueVerify(); | 142 JSValue::cast(this)->JSValueVerify(); |
140 break; | 143 break; |
141 case JS_DATE_TYPE: | 144 case JS_DATE_TYPE: |
142 JSDate::cast(this)->JSDateVerify(); | 145 JSDate::cast(this)->JSDateVerify(); |
143 break; | 146 break; |
144 case JS_FUNCTION_TYPE: | 147 case JS_FUNCTION_TYPE: |
145 JSFunction::cast(this)->JSFunctionVerify(); | 148 JSFunction::cast(this)->JSFunctionVerify(); |
146 break; | 149 break; |
147 case JS_GLOBAL_PROXY_TYPE: | 150 case JS_GLOBAL_PROXY_TYPE: |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 double value = get_scalar(i); | 362 double value = get_scalar(i); |
360 ASSERT(!isnan(value) || | 363 ASSERT(!isnan(value) || |
361 (BitCast<uint64_t>(value) == | 364 (BitCast<uint64_t>(value) == |
362 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || | 365 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || |
363 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); | 366 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); |
364 } | 367 } |
365 } | 368 } |
366 } | 369 } |
367 | 370 |
368 | 371 |
| 372 void JSModule::JSModuleVerify() { |
| 373 Object* v = context(); |
| 374 if (v->IsHeapObject()) { |
| 375 VerifyHeapPointer(v); |
| 376 } |
| 377 CHECK(v->IsUndefined() || v->IsModuleContext()); |
| 378 } |
| 379 |
| 380 |
369 void JSValue::JSValueVerify() { | 381 void JSValue::JSValueVerify() { |
370 Object* v = value(); | 382 Object* v = value(); |
371 if (v->IsHeapObject()) { | 383 if (v->IsHeapObject()) { |
372 VerifyHeapPointer(v); | 384 VerifyHeapPointer(v); |
373 } | 385 } |
374 } | 386 } |
375 | 387 |
376 | 388 |
377 void JSDate::JSDateVerify() { | 389 void JSDate::JSDateVerify() { |
378 if (value()->IsHeapObject()) { | 390 if (value()->IsHeapObject()) { |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 ASSERT(e->IsUndefined()); | 930 ASSERT(e->IsUndefined()); |
919 } | 931 } |
920 } | 932 } |
921 } | 933 } |
922 } | 934 } |
923 | 935 |
924 | 936 |
925 #endif // DEBUG | 937 #endif // DEBUG |
926 | 938 |
927 } } // namespace v8::internal | 939 } } // namespace v8::internal |
OLD | NEW |