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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Fix a couple of typos Created 7 years, 2 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
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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 1010
1011 1011
1012 void MacroAssembler::AssertNotSmi(Register object) { 1012 void MacroAssembler::AssertNotSmi(Register object) {
1013 if (emit_debug_code()) { 1013 if (emit_debug_code()) {
1014 test(object, Immediate(kSmiTagMask)); 1014 test(object, Immediate(kSmiTagMask));
1015 Check(not_equal, kOperandIsASmi); 1015 Check(not_equal, kOperandIsASmi);
1016 } 1016 }
1017 } 1017 }
1018 1018
1019 1019
1020 void MacroAssembler::Prologue(bool is_stub) {
1021 if (is_stub) {
1022 push(ebp); // Caller's frame pointer.
1023 mov(ebp, esp);
1024 push(esi); // Callee's context.
1025 push(Immediate(Smi::FromInt(StackFrame::STUB)));
1026 } else {
1027 PredictableCodeSizeScope predictible_code_size_scope(this,
1028 kNoCodeAgeSequenceLength);
1029 if (FLAG_optimize_for_size && FLAG_age_code) {
1030 // Pre-age the code.
1031 call(isolate()->builtins()->MarkCodeAsExecutedOnce(),
1032 RelocInfo::CODE_AGE_SEQUENCE);
1033 Nop(kNoCodeAgeSequenceLength - Assembler::kCallInstructionLength);
1034 } else {
1035 push(ebp); // Caller's frame pointer.
1036 mov(ebp, esp);
1037 push(esi); // Callee's context.
1038 push(edi); // Callee's JS function.
1039 }
1040 }
1041 }
1042
1043
1020 void MacroAssembler::EnterFrame(StackFrame::Type type) { 1044 void MacroAssembler::EnterFrame(StackFrame::Type type) {
1021 push(ebp); 1045 push(ebp);
1022 mov(ebp, esp); 1046 mov(ebp, esp);
1023 push(esi); 1047 push(esi);
1024 push(Immediate(Smi::FromInt(type))); 1048 push(Immediate(Smi::FromInt(type)));
1025 push(Immediate(CodeObject())); 1049 push(Immediate(CodeObject()));
1026 if (emit_debug_code()) { 1050 if (emit_debug_code()) {
1027 cmp(Operand(esp, 0), Immediate(isolate()->factory()->undefined_value())); 1051 cmp(Operand(esp, 0), Immediate(isolate()->factory()->undefined_value()));
1028 Check(not_equal, kCodeObjectNotProperlyPatched); 1052 Check(not_equal, kCodeObjectNotProperlyPatched);
1029 } 1053 }
(...skipping 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after
3528 j(greater, &no_memento_available); 3552 j(greater, &no_memento_available);
3529 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), 3553 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize),
3530 Immediate(isolate()->factory()->allocation_memento_map())); 3554 Immediate(isolate()->factory()->allocation_memento_map()));
3531 bind(&no_memento_available); 3555 bind(&no_memento_available);
3532 } 3556 }
3533 3557
3534 3558
3535 } } // namespace v8::internal 3559 } } // namespace v8::internal
3536 3560
3537 #endif // V8_TARGET_ARCH_IA32 3561 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698