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

Side by Side Diff: src/serialize.h

Issue 7549008: Preliminary code for block scopes and block contexts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Small fix: set harmony flag properly Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/scopes.cc ('k') | src/variables.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 virtual int RootIndex(HeapObject* o); 537 virtual int RootIndex(HeapObject* o);
538 virtual int PartialSnapshotCacheIndex(HeapObject* o); 538 virtual int PartialSnapshotCacheIndex(HeapObject* o);
539 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { 539 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
540 // Scripts should be referred only through shared function infos. We can't 540 // Scripts should be referred only through shared function infos. We can't
541 // allow them to be part of the partial snapshot because they contain a 541 // allow them to be part of the partial snapshot because they contain a
542 // unique ID, and deserializing several partial snapshots containing script 542 // unique ID, and deserializing several partial snapshots containing script
543 // would cause dupes. 543 // would cause dupes.
544 ASSERT(!o->IsScript()); 544 ASSERT(!o->IsScript());
545 return o->IsString() || o->IsSharedFunctionInfo() || 545 return o->IsString() || o->IsSharedFunctionInfo() ||
546 o->IsHeapNumber() || o->IsCode() || 546 o->IsHeapNumber() || o->IsCode() ||
547 o->IsSerializedScopeInfo() ||
547 o->map() == HEAP->fixed_cow_array_map(); 548 o->map() == HEAP->fixed_cow_array_map();
548 } 549 }
549 550
550 private: 551 private:
551 Serializer* startup_serializer_; 552 Serializer* startup_serializer_;
552 DISALLOW_COPY_AND_ASSIGN(PartialSerializer); 553 DISALLOW_COPY_AND_ASSIGN(PartialSerializer);
553 }; 554 };
554 555
555 556
556 class StartupSerializer : public Serializer { 557 class StartupSerializer : public Serializer {
(...skipping 23 matching lines...) Expand all
580 virtual int RootIndex(HeapObject* o) { return kInvalidRootIndex; } 581 virtual int RootIndex(HeapObject* o) { return kInvalidRootIndex; }
581 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { 582 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
582 return false; 583 return false;
583 } 584 }
584 }; 585 };
585 586
586 587
587 } } // namespace v8::internal 588 } } // namespace v8::internal
588 589
589 #endif // V8_SERIALIZE_H_ 590 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/scopes.cc ('k') | src/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698