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

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

Issue 14066016: Generators can resume (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: ia32 fixups Created 7 years, 8 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 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 412
413 void JSGeneratorObject::JSGeneratorObjectVerify() { 413 void JSGeneratorObject::JSGeneratorObjectVerify() {
414 // In an expression like "new g()", there can be a point where a generator 414 // In an expression like "new g()", there can be a point where a generator
415 // object is allocated but its fields are all undefined, as it hasn't yet been 415 // object is allocated but its fields are all undefined, as it hasn't yet been
416 // initialized by the generator. Hence these weak checks. 416 // initialized by the generator. Hence these weak checks.
417 VerifyObjectField(kFunctionOffset); 417 VerifyObjectField(kFunctionOffset);
418 VerifyObjectField(kContextOffset); 418 VerifyObjectField(kContextOffset);
419 VerifyObjectField(kOperandStackOffset); 419 VerifyObjectField(kOperandStackOffset);
420 VerifyObjectField(kContinuationOffset); 420 VerifyObjectField(kContinuationOffset);
421
422 // Verify that the sentinel values are not positive, and thus that they do not
423 // indicate a suspended continuation.
424 STATIC_ASSERT(JSGeneratorObject::kGeneratorExecuting <= 0);
Michael Starzinger 2013/04/21 22:45:21 Move these static asserts into the runtime functio
425 STATIC_ASSERT(JSGeneratorObject::kGeneratorClosed <= 0);
421 } 426 }
422 427
423 428
424 void JSModule::JSModuleVerify() { 429 void JSModule::JSModuleVerify() {
425 VerifyObjectField(kContextOffset); 430 VerifyObjectField(kContextOffset);
426 VerifyObjectField(kScopeInfoOffset); 431 VerifyObjectField(kScopeInfoOffset);
427 CHECK(context()->IsUndefined() || 432 CHECK(context()->IsUndefined() ||
428 Context::cast(context())->IsModuleContext()); 433 Context::cast(context())->IsModuleContext());
429 } 434 }
430 435
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 for (int i = 0; i < number_of_transitions(); ++i) { 1115 for (int i = 0; i < number_of_transitions(); ++i) {
1111 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1116 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1112 } 1117 }
1113 return true; 1118 return true;
1114 } 1119 }
1115 1120
1116 1121
1117 #endif // DEBUG 1122 #endif // DEBUG
1118 1123
1119 } } // namespace v8::internal 1124 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698