OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 315 matching lines...) Loading... |
326 cgen.Generate(); | 326 cgen.Generate(); |
327 if (cgen.HasStackOverflow()) { | 327 if (cgen.HasStackOverflow()) { |
328 ASSERT(!isolate->has_pending_exception()); | 328 ASSERT(!isolate->has_pending_exception()); |
329 return false; | 329 return false; |
330 } | 330 } |
331 unsigned table_offset = cgen.EmitBackEdgeTable(); | 331 unsigned table_offset = cgen.EmitBackEdgeTable(); |
332 | 332 |
333 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); | 333 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); |
334 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info); | 334 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info); |
335 code->set_optimizable(info->IsOptimizable() && | 335 code->set_optimizable(info->IsOptimizable() && |
336 !info->function()->flags()->Contains(kDontOptimize) && | 336 !info->function()->dont_optimize() && |
337 info->function()->scope()->AllowsLazyCompilation()); | 337 info->function()->scope()->AllowsLazyCompilation()); |
338 cgen.PopulateDeoptimizationData(code); | 338 cgen.PopulateDeoptimizationData(code); |
339 cgen.PopulateTypeFeedbackInfo(code); | 339 cgen.PopulateTypeFeedbackInfo(code); |
340 cgen.PopulateTypeFeedbackCells(code); | 340 cgen.PopulateTypeFeedbackCells(code); |
341 code->set_has_deoptimization_support(info->HasDeoptimizationSupport()); | 341 code->set_has_deoptimization_support(info->HasDeoptimizationSupport()); |
342 code->set_handler_table(*cgen.handler_table()); | 342 code->set_handler_table(*cgen.handler_table()); |
343 #ifdef ENABLE_DEBUGGER_SUPPORT | 343 #ifdef ENABLE_DEBUGGER_SUPPORT |
344 code->set_has_debug_break_slots( | 344 code->set_has_debug_break_slots( |
345 info->isolate()->debugger()->IsDebuggerActive()); | 345 info->isolate()->debugger()->IsDebuggerActive()); |
346 code->set_compiled_optimizable(info->IsOptimizable()); | 346 code->set_compiled_optimizable(info->IsOptimizable()); |
(...skipping 1265 matching lines...) Loading... |
1612 } | 1612 } |
1613 | 1613 |
1614 return false; | 1614 return false; |
1615 } | 1615 } |
1616 | 1616 |
1617 | 1617 |
1618 #undef __ | 1618 #undef __ |
1619 | 1619 |
1620 | 1620 |
1621 } } // namespace v8::internal | 1621 } } // namespace v8::internal |
OLD | NEW |