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

Side by Side Diff: src/codegen.cc

Issue 6597029: [Isolates] Merge r 6300:6500 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 9 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/code-stubs.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 int len = String::cast(script->source())->length(); 238 int len = String::cast(script->source())->length();
239 COUNTERS->total_old_codegen_source_size()->Increment(len); 239 COUNTERS->total_old_codegen_source_size()->Increment(len);
240 } 240 }
241 if (FLAG_trace_codegen) { 241 if (FLAG_trace_codegen) {
242 PrintF("Classic Compiler - "); 242 PrintF("Classic Compiler - ");
243 } 243 }
244 MakeCodePrologue(info); 244 MakeCodePrologue(info);
245 // Generate code. 245 // Generate code.
246 const int kInitialBufferSize = 4 * KB; 246 const int kInitialBufferSize = 4 * KB;
247 MacroAssembler masm(NULL, kInitialBufferSize); 247 MacroAssembler masm(NULL, kInitialBufferSize);
248 #ifdef ENABLE_GDB_JIT_INTERFACE
249 masm.positions_recorder()->StartGDBJITLineInfoRecording();
250 #endif
248 CodeGenerator cgen(&masm); 251 CodeGenerator cgen(&masm);
249 CodeGeneratorScope scope(Isolate::Current(), &cgen); 252 CodeGeneratorScope scope(Isolate::Current(), &cgen);
250 cgen.Generate(info); 253 cgen.Generate(info);
251 if (cgen.HasStackOverflow()) { 254 if (cgen.HasStackOverflow()) {
252 ASSERT(!Isolate::Current()->has_pending_exception()); 255 ASSERT(!Isolate::Current()->has_pending_exception());
253 return false; 256 return false;
254 } 257 }
255 258
256 InLoopFlag in_loop = info->is_in_loop() ? IN_LOOP : NOT_IN_LOOP; 259 InLoopFlag in_loop = info->is_in_loop() ? IN_LOOP : NOT_IN_LOOP;
257 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop); 260 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop);
258 Handle<Code> code = MakeCodeEpilogue(cgen.masm(), flags, info); 261 Handle<Code> code = MakeCodeEpilogue(cgen.masm(), flags, info);
259 // There is no stack check table in code generated by the classic backend. 262 // There is no stack check table in code generated by the classic backend.
260 code->SetNoStackCheckTable(); 263 code->SetNoStackCheckTable();
261 CodeGenerator::PrintCode(code, info); 264 CodeGenerator::PrintCode(code, info);
262 info->SetCode(code); // May be an empty handle. 265 info->SetCode(code); // May be an empty handle.
266 #ifdef ENABLE_GDB_JIT_INTERFACE
267 if (FLAG_gdbjit && !code.is_null()) {
268 GDBJITLineInfo* lineinfo =
269 masm.positions_recorder()->DetachGDBJITLineInfo();
270
271 GDBJIT(RegisterDetailedLineInfo(*code, lineinfo));
272 }
273 #endif
263 return !code.is_null(); 274 return !code.is_null();
264 } 275 }
265 276
266 277
267 #ifdef ENABLE_LOGGING_AND_PROFILING 278 #ifdef ENABLE_LOGGING_AND_PROFILING
268 279
269 280
270 static Vector<const char> kRegexp = CStrVector("regexp"); 281 static Vector<const char> kRegexp = CStrVector("regexp");
271 282
272 283
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 int result = save_doubles_ ? 1 : 0; 487 int result = save_doubles_ ? 1 : 0;
477 #ifdef _WIN64 488 #ifdef _WIN64
478 return result | ((result_size_ == 1) ? 0 : 2); 489 return result | ((result_size_ == 1) ? 0 : 2);
479 #else 490 #else
480 return result; 491 return result;
481 #endif 492 #endif
482 } 493 }
483 494
484 495
485 } } // namespace v8::internal 496 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698