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

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

Issue 569010: Use the virtual-frame based optimizing compiler for split-compilation... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/codegen.cc ('k') | src/ia32/codegen-ia32.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 12 matching lines...) Expand all
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "codegen-inl.h" 30 #include "codegen-inl.h"
31 #include "data-flow.h" 31 #include "data-flow.h"
32 #include "fast-codegen.h" 32 #include "fast-codegen.h"
33 #include "full-codegen.h"
34 #include "scopes.h" 33 #include "scopes.h"
35 34
36 namespace v8 { 35 namespace v8 {
37 namespace internal { 36 namespace internal {
38 37
39 #define BAILOUT(reason) \ 38 #define BAILOUT(reason) \
40 do { \ 39 do { \
41 if (FLAG_trace_bailout) { \ 40 if (FLAG_trace_bailout) { \
42 PrintF("%s\n", reason); \ 41 PrintF("%s\n", reason); \
43 } \ 42 } \
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // Generate the fast-path code. 350 // Generate the fast-path code.
352 FastCodeGenerator fast_cgen(&masm, script, is_eval); 351 FastCodeGenerator fast_cgen(&masm, script, is_eval);
353 fast_cgen.Generate(fun, info); 352 fast_cgen.Generate(fun, info);
354 if (fast_cgen.HasStackOverflow()) { 353 if (fast_cgen.HasStackOverflow()) {
355 ASSERT(!Top::has_pending_exception()); 354 ASSERT(!Top::has_pending_exception());
356 return Handle<Code>::null(); 355 return Handle<Code>::null();
357 } 356 }
358 357
359 // Generate the full code for the function in bailout mode, using the same 358 // Generate the full code for the function in bailout mode, using the same
360 // macro assembler. 359 // macro assembler.
361 FullCodeGenerator full_cgen(&masm, script, is_eval); 360 CodeGenerator cgen(&masm, script, is_eval);
362 full_cgen.Generate(fun, FullCodeGenerator::SECONDARY); 361 CodeGeneratorScope scope(&cgen);
363 if (full_cgen.HasStackOverflow()) { 362 cgen.Generate(fun, CodeGenerator::SECONDARY, info);
363 if (cgen.HasStackOverflow()) {
364 ASSERT(!Top::has_pending_exception()); 364 ASSERT(!Top::has_pending_exception());
365 return Handle<Code>::null(); 365 return Handle<Code>::null();
366 } 366 }
367 367
368 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP); 368 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP);
369 return CodeGenerator::MakeCodeEpilogue(fun, &masm, flags, script); 369 return CodeGenerator::MakeCodeEpilogue(fun, &masm, flags, script);
370 } 370 }
371 371
372 372
373 void FastCodeGenerator::VisitDeclaration(Declaration* decl) { 373 void FastCodeGenerator::VisitDeclaration(Declaration* decl) {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 586
587 587
588 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) { 588 void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) {
589 UNREACHABLE(); 589 UNREACHABLE();
590 } 590 }
591 591
592 #undef __ 592 #undef __
593 593
594 594
595 } } // namespace v8::internal 595 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698