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

Side by Side Diff: src/codegen.cc

Issue 11316218: Simplify and fix code aging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed comment and rebased. Created 8 years 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/arm/lithium-codegen-arm.cc ('k') | src/compiler.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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 // Allocate and install the code. 101 // Allocate and install the code.
102 CodeDesc desc; 102 CodeDesc desc;
103 masm->GetCode(&desc); 103 masm->GetCode(&desc);
104 Handle<Code> code = 104 Handle<Code> code =
105 isolate->factory()->NewCode(desc, flags, masm->CodeObject()); 105 isolate->factory()->NewCode(desc, flags, masm->CodeObject());
106 106
107 if (!code.is_null()) { 107 if (!code.is_null()) {
108 isolate->counters()->total_compiled_code_size()->Increment( 108 isolate->counters()->total_compiled_code_size()->Increment(
109 code->instruction_size()); 109 code->instruction_size());
110 code->set_prologue_offset(info->prologue_offset());
110 } 111 }
111 return code; 112 return code;
112 } 113 }
113 114
114 115
115 void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { 116 void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
116 #ifdef ENABLE_DISASSEMBLER 117 #ifdef ENABLE_DISASSEMBLER
117 bool print_code = Isolate::Current()->bootstrapper()->IsActive() 118 bool print_code = Isolate::Current()->bootstrapper()->IsActive()
118 ? FLAG_print_builtin_code 119 ? FLAG_print_builtin_code
119 : (FLAG_print_code || (info->IsOptimizing() && FLAG_print_opt_code)); 120 : (FLAG_print_code || (info->IsOptimizing() && FLAG_print_opt_code));
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 ASSERT(result_size_ == 1 || result_size_ == 2); 203 ASSERT(result_size_ == 1 || result_size_ == 2);
203 #ifdef _WIN64 204 #ifdef _WIN64
204 return result | ((result_size_ == 1) ? 0 : 2); 205 return result | ((result_size_ == 1) ? 0 : 2);
205 #else 206 #else
206 return result; 207 return result;
207 #endif 208 #endif
208 } 209 }
209 210
210 211
211 } } // namespace v8::internal 212 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698