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

Side by Side Diff: src/codegen.cc

Issue 7491052: Static state cleanup: add more consts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/assembler.cc ('k') | src/deoptimizer.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 PrintF("--- Optimized code ---\n"); 163 PrintF("--- Optimized code ---\n");
164 } else { 164 } else {
165 PrintF("--- Code ---\n"); 165 PrintF("--- Code ---\n");
166 } 166 }
167 code->Disassemble(*function->debug_name()->ToCString()); 167 code->Disassemble(*function->debug_name()->ToCString());
168 } 168 }
169 #endif // ENABLE_DISASSEMBLER 169 #endif // ENABLE_DISASSEMBLER
170 } 170 }
171 171
172 static Vector<const char> kRegexp = CStrVector("regexp");
173 172
174 bool CodeGenerator::ShouldGenerateLog(Expression* type) { 173 bool CodeGenerator::ShouldGenerateLog(Expression* type) {
175 ASSERT(type != NULL); 174 ASSERT(type != NULL);
176 Isolate* isolate = Isolate::Current(); 175 Isolate* isolate = Isolate::Current();
177 if (!isolate->logger()->is_logging() && !CpuProfiler::is_profiling(isolate)) { 176 if (!isolate->logger()->is_logging() && !CpuProfiler::is_profiling(isolate)) {
178 return false; 177 return false;
179 } 178 }
180 Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle()); 179 Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle());
181 if (FLAG_log_regexp) { 180 if (FLAG_log_regexp) {
182 if (name->IsEqualTo(kRegexp)) 181 if (name->IsEqualTo(CStrVector("regexp")))
183 return true; 182 return true;
184 } 183 }
185 return false; 184 return false;
186 } 185 }
187 186
188 187
189 bool CodeGenerator::RecordPositions(MacroAssembler* masm, 188 bool CodeGenerator::RecordPositions(MacroAssembler* masm,
190 int pos, 189 int pos,
191 bool right_here) { 190 bool right_here) {
192 if (pos != RelocInfo::kNoPosition) { 191 if (pos != RelocInfo::kNoPosition) {
(...skipping 30 matching lines...) Expand all
223 int result = save_doubles_ ? 1 : 0; 222 int result = save_doubles_ ? 1 : 0;
224 #ifdef _WIN64 223 #ifdef _WIN64
225 return result | ((result_size_ == 1) ? 0 : 2); 224 return result | ((result_size_ == 1) ? 0 : 2);
226 #else 225 #else
227 return result; 226 return result;
228 #endif 227 #endif
229 } 228 }
230 229
231 230
232 } } // namespace v8::internal 231 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698