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

Side by Side Diff: src/fast-codegen.cc

Issue 2866008: [Isolates] Move contents of Top into Isolate.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: ensure we're synced Created 10 years, 6 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/factory.cc ('k') | src/frames.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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 438
439 CodeGenerator::MakeCodePrologue(info); 439 CodeGenerator::MakeCodePrologue(info);
440 440
441 const int kInitialBufferSize = 4 * KB; 441 const int kInitialBufferSize = 4 * KB;
442 MacroAssembler masm(NULL, kInitialBufferSize); 442 MacroAssembler masm(NULL, kInitialBufferSize);
443 443
444 // Generate the fast-path code. 444 // Generate the fast-path code.
445 FastCodeGenerator fast_cgen(&masm); 445 FastCodeGenerator fast_cgen(&masm);
446 fast_cgen.Generate(info); 446 fast_cgen.Generate(info);
447 if (fast_cgen.HasStackOverflow()) { 447 if (fast_cgen.HasStackOverflow()) {
448 ASSERT(!Top::has_pending_exception()); 448 ASSERT(!Isolate::Current()->has_pending_exception());
449 return Handle<Code>::null(); 449 return Handle<Code>::null();
450 } 450 }
451 451
452 // Generate the full code for the function in bailout mode, using the same 452 // Generate the full code for the function in bailout mode, using the same
453 // macro assembler. 453 // macro assembler.
454 CodeGenerator cgen(&masm); 454 CodeGenerator cgen(&masm);
455 CodeGeneratorScope scope(&cgen); 455 CodeGeneratorScope scope(&cgen);
456 info->set_mode(CompilationInfo::SECONDARY); 456 info->set_mode(CompilationInfo::SECONDARY);
457 cgen.Generate(info); 457 cgen.Generate(info);
458 if (cgen.HasStackOverflow()) { 458 if (cgen.HasStackOverflow()) {
459 ASSERT(!Top::has_pending_exception()); 459 ASSERT(!Isolate::Current()->has_pending_exception());
460 return Handle<Code>::null(); 460 return Handle<Code>::null();
461 } 461 }
462 462
463 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP); 463 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP);
464 return CodeGenerator::MakeCodeEpilogue(&masm, flags, info); 464 return CodeGenerator::MakeCodeEpilogue(&masm, flags, info);
465 } 465 }
466 466
467 467
468 void FastCodeGenerator::VisitDeclaration(Declaration* decl) { 468 void FastCodeGenerator::VisitDeclaration(Declaration* decl) {
469 UNREACHABLE(); 469 UNREACHABLE();
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 737
738 738
739 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) { 739 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) {
740 UNREACHABLE(); 740 UNREACHABLE();
741 } 741 }
742 742
743 #undef __ 743 #undef __
744 744
745 745
746 } } // namespace v8::internal 746 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698