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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 TypeFeedbackOracle oracle(code, global_context, info->isolate()); | 297 TypeFeedbackOracle oracle(code, global_context, info->isolate()); |
298 HGraphBuilder builder(info, &oracle); | 298 HGraphBuilder builder(info, &oracle); |
299 HPhase phase(HPhase::kTotal); | 299 HPhase phase(HPhase::kTotal); |
300 HGraph* graph = builder.CreateGraph(); | 300 HGraph* graph = builder.CreateGraph(); |
301 if (info->isolate()->has_pending_exception()) { | 301 if (info->isolate()->has_pending_exception()) { |
302 info->SetCode(Handle<Code>::null()); | 302 info->SetCode(Handle<Code>::null()); |
303 return false; | 303 return false; |
304 } | 304 } |
305 | 305 |
306 if (graph != NULL) { | 306 if (graph != NULL) { |
307 Handle<Code> optimized_code = graph->Compile(info); | 307 Handle<Code> optimized_code = graph->Compile(info, graph->zone()); |
308 if (!optimized_code.is_null()) { | 308 if (!optimized_code.is_null()) { |
309 info->SetCode(optimized_code); | 309 info->SetCode(optimized_code); |
310 FinishOptimization(info->closure(), start); | 310 FinishOptimization(info->closure(), start); |
311 return true; | 311 return true; |
312 } | 312 } |
313 } | 313 } |
314 | 314 |
315 // Keep using the shared code. | 315 // Keep using the shared code. |
316 info->AbortOptimization(); | 316 info->AbortOptimization(); |
317 if (!builder.inline_bailout()) { | 317 if (!builder.inline_bailout()) { |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 } | 817 } |
818 } | 818 } |
819 | 819 |
820 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 820 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
821 Handle<Script>(info->script()), | 821 Handle<Script>(info->script()), |
822 Handle<Code>(info->code()), | 822 Handle<Code>(info->code()), |
823 info)); | 823 info)); |
824 } | 824 } |
825 | 825 |
826 } } // namespace v8::internal | 826 } } // namespace v8::internal |
OLD | NEW |