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

Side by Side Diff: src/compiler.cc

Issue 392001: Fix inline constructor code bailout.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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/ast.h ('k') | src/objects.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 458
459 // Update the shared function info with the compiled code. 459 // Update the shared function info with the compiled code.
460 shared->set_code(*code); 460 shared->set_code(*code);
461 461
462 // Set the expected number of properties for instances. 462 // Set the expected number of properties for instances.
463 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); 463 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
464 464
465 // Set the optimication hints after performing lazy compilation, as these are 465 // Set the optimication hints after performing lazy compilation, as these are
466 // not set when the function is set up as a lazily compiled function. 466 // not set when the function is set up as a lazily compiled function.
467 shared->SetThisPropertyAssignmentsInfo( 467 shared->SetThisPropertyAssignmentsInfo(
468 lit->has_only_this_property_assignments(),
469 lit->has_only_simple_this_property_assignments(), 468 lit->has_only_simple_this_property_assignments(),
470 *lit->this_property_assignments()); 469 *lit->this_property_assignments());
471 470
472 // Check the function has compiled code. 471 // Check the function has compiled code.
473 ASSERT(shared->is_compiled()); 472 ASSERT(shared->is_compiled());
474 return true; 473 return true;
475 } 474 }
476 475
477 476
478 Handle<JSFunction> Compiler::BuildBoilerplate(FunctionLiteral* literal, 477 Handle<JSFunction> Compiler::BuildBoilerplate(FunctionLiteral* literal,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 fun->shared()->set_length(lit->num_parameters()); 568 fun->shared()->set_length(lit->num_parameters());
570 fun->shared()->set_formal_parameter_count(lit->num_parameters()); 569 fun->shared()->set_formal_parameter_count(lit->num_parameters());
571 fun->shared()->set_script(*script); 570 fun->shared()->set_script(*script);
572 fun->shared()->set_function_token_position(lit->function_token_position()); 571 fun->shared()->set_function_token_position(lit->function_token_position());
573 fun->shared()->set_start_position(lit->start_position()); 572 fun->shared()->set_start_position(lit->start_position());
574 fun->shared()->set_end_position(lit->end_position()); 573 fun->shared()->set_end_position(lit->end_position());
575 fun->shared()->set_is_expression(lit->is_expression()); 574 fun->shared()->set_is_expression(lit->is_expression());
576 fun->shared()->set_is_toplevel(is_toplevel); 575 fun->shared()->set_is_toplevel(is_toplevel);
577 fun->shared()->set_inferred_name(*lit->inferred_name()); 576 fun->shared()->set_inferred_name(*lit->inferred_name());
578 fun->shared()->SetThisPropertyAssignmentsInfo( 577 fun->shared()->SetThisPropertyAssignmentsInfo(
579 lit->has_only_this_property_assignments(),
580 lit->has_only_simple_this_property_assignments(), 578 lit->has_only_simple_this_property_assignments(),
581 *lit->this_property_assignments()); 579 *lit->this_property_assignments());
582 fun->shared()->set_try_fast_codegen(lit->try_fast_codegen()); 580 fun->shared()->set_try_fast_codegen(lit->try_fast_codegen());
583 } 581 }
584 582
585 583
586 CodeGenSelector::CodeGenTag CodeGenSelector::Select(FunctionLiteral* fun) { 584 CodeGenSelector::CodeGenTag CodeGenSelector::Select(FunctionLiteral* fun) {
587 Scope* scope = fun->scope(); 585 Scope* scope = fun->scope();
588 586
589 if (scope->num_heap_slots() > 0) { 587 if (scope->num_heap_slots() > 0) {
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1106
1109 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) { 1107 void CodeGenSelector::VisitThisFunction(ThisFunction* expr) {
1110 BAILOUT("ThisFunction"); 1108 BAILOUT("ThisFunction");
1111 } 1109 }
1112 1110
1113 #undef BAILOUT 1111 #undef BAILOUT
1114 #undef CHECK_BAILOUT 1112 #undef CHECK_BAILOUT
1115 1113
1116 1114
1117 } } // namespace v8::internal 1115 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698