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

Side by Side Diff: src/serialize.h

Issue 1638006: One less dependent load in InvokeBuiltin. (Closed)
Patch Set: . Created 10 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
« no previous file with comments | « src/objects-inl.h ('k') | src/x64/macro-assembler-x64.cc » ('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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 496
497 protected: 497 protected:
498 virtual int RootIndex(HeapObject* o); 498 virtual int RootIndex(HeapObject* o);
499 virtual int PartialSnapshotCacheIndex(HeapObject* o); 499 virtual int PartialSnapshotCacheIndex(HeapObject* o);
500 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { 500 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
501 // Scripts should be referred only through shared function infos. We can't 501 // Scripts should be referred only through shared function infos. We can't
502 // allow them to be part of the partial snapshot because they contain a 502 // allow them to be part of the partial snapshot because they contain a
503 // unique ID, and deserializing several partial snapshots containing script 503 // unique ID, and deserializing several partial snapshots containing script
504 // would cause dupes. 504 // would cause dupes.
505 ASSERT(!o->IsScript()); 505 ASSERT(!o->IsScript());
506 return o->IsString() || o->IsSharedFunctionInfo() || o->IsHeapNumber(); 506 return o->IsString() || o->IsSharedFunctionInfo() ||
507 o->IsHeapNumber() || o->IsCode();
507 } 508 }
508 509
509 private: 510 private:
510 Serializer* startup_serializer_; 511 Serializer* startup_serializer_;
511 DISALLOW_COPY_AND_ASSIGN(PartialSerializer); 512 DISALLOW_COPY_AND_ASSIGN(PartialSerializer);
512 }; 513 };
513 514
514 515
515 class StartupSerializer : public Serializer { 516 class StartupSerializer : public Serializer {
516 public: 517 public:
(...skipping 21 matching lines...) Expand all
538 virtual int RootIndex(HeapObject* o) { return kInvalidRootIndex; } 539 virtual int RootIndex(HeapObject* o) { return kInvalidRootIndex; }
539 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { 540 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
540 return false; 541 return false;
541 } 542 }
542 }; 543 };
543 544
544 545
545 } } // namespace v8::internal 546 } } // namespace v8::internal
546 547
547 #endif // V8_SERIALIZE_H_ 548 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698