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/x64/assembler-x64.cc

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: bool -> enum Created 7 years, 1 month 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/serialize.cc ('k') | src/x64/assembler-x64-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 // 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 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after
2997 void Assembler::dd(uint32_t data) { 2997 void Assembler::dd(uint32_t data) {
2998 EnsureSpace ensure_space(this); 2998 EnsureSpace ensure_space(this);
2999 emitl(data); 2999 emitl(data);
3000 } 3000 }
3001 3001
3002 3002
3003 // Relocation information implementations. 3003 // Relocation information implementations.
3004 3004
3005 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { 3005 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
3006 ASSERT(!RelocInfo::IsNone(rmode)); 3006 ASSERT(!RelocInfo::IsNone(rmode));
3007 // Don't record external references unless the heap will be serialized.
3008 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { 3007 if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
3008 // Don't record external references unless the heap will be serialized.
3009 #ifdef DEBUG 3009 #ifdef DEBUG
3010 if (!Serializer::enabled()) { 3010 if (!Serializer::enabled()) {
3011 Serializer::TooLateToEnableNow(); 3011 Serializer::TooLateToEnableNow();
3012 } 3012 }
3013 #endif 3013 #endif
3014 if (!Serializer::enabled() && !emit_debug_code()) { 3014 if (!Serializer::enabled() && !emit_debug_code()) {
3015 return; 3015 return;
3016 } 3016 }
3017 } else if (rmode == RelocInfo::CODE_AGE_SEQUENCE) {
3018 // Don't record psuedo relocation info for code age sequence mode.
3019 return;
3017 } 3020 }
3018 RelocInfo rinfo(pc_, rmode, data, NULL); 3021 RelocInfo rinfo(pc_, rmode, data, NULL);
3019 reloc_info_writer.Write(&rinfo); 3022 reloc_info_writer.Write(&rinfo);
3020 } 3023 }
3021 3024
3022 3025
3023 void Assembler::RecordJSReturn() { 3026 void Assembler::RecordJSReturn() {
3024 positions_recorder()->WriteRecordedPositions(); 3027 positions_recorder()->WriteRecordedPositions();
3025 EnsureSpace ensure_space(this); 3028 EnsureSpace ensure_space(this);
3026 RecordRelocInfo(RelocInfo::JS_RETURN); 3029 RecordRelocInfo(RelocInfo::JS_RETURN);
(...skipping 24 matching lines...) Expand all
3051 bool RelocInfo::IsCodedSpecially() { 3054 bool RelocInfo::IsCodedSpecially() {
3052 // The deserializer needs to know whether a pointer is specially coded. Being 3055 // The deserializer needs to know whether a pointer is specially coded. Being
3053 // specially coded on x64 means that it is a relative 32 bit address, as used 3056 // specially coded on x64 means that it is a relative 32 bit address, as used
3054 // by branch instructions. 3057 // by branch instructions.
3055 return (1 << rmode_) & kApplyMask; 3058 return (1 << rmode_) & kApplyMask;
3056 } 3059 }
3057 3060
3058 } } // namespace v8::internal 3061 } } // namespace v8::internal
3059 3062
3060 #endif // V8_TARGET_ARCH_X64 3063 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | src/x64/assembler-x64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698