| 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 21 matching lines...) Expand all Loading... |
| 32 #include "lithium.h" | 32 #include "lithium.h" |
| 33 | 33 |
| 34 namespace v8 { | 34 namespace v8 { |
| 35 namespace internal { | 35 namespace internal { |
| 36 | 36 |
| 37 | 37 |
| 38 static LChunk* OptimizeGraph(HGraph* graph) { | 38 static LChunk* OptimizeGraph(HGraph* graph) { |
| 39 Isolate* isolate = graph->isolate(); | 39 Isolate* isolate = graph->isolate(); |
| 40 AssertNoAllocation no_gc; | 40 AssertNoAllocation no_gc; |
| 41 NoHandleAllocation no_handles(isolate); | 41 NoHandleAllocation no_handles(isolate); |
| 42 NoHandleDereference no_deref(isolate); | 42 HandleDereferenceGuard no_deref(isolate, HandleDereferenceGuard::DISALLOW); |
| 43 | 43 |
| 44 ASSERT(graph != NULL); | 44 ASSERT(graph != NULL); |
| 45 SmartArrayPointer<char> bailout_reason; | 45 SmartArrayPointer<char> bailout_reason; |
| 46 if (!graph->Optimize(&bailout_reason)) { | 46 if (!graph->Optimize(&bailout_reason)) { |
| 47 FATAL(bailout_reason.is_empty() ? "unknown" : *bailout_reason); | 47 FATAL(bailout_reason.is_empty() ? "unknown" : *bailout_reason); |
| 48 } | 48 } |
| 49 LChunk* chunk = LChunk::NewChunk(graph); | 49 LChunk* chunk = LChunk::NewChunk(graph); |
| 50 if (chunk == NULL) { | 50 if (chunk == NULL) { |
| 51 FATAL(graph->info()->bailout_reason()); | 51 FATAL(graph->info()->bailout_reason()); |
| 52 } | 52 } |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 } | 375 } |
| 376 | 376 |
| 377 | 377 |
| 378 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { | 378 Handle<Code> ArrayNArgumentsConstructorStub::GenerateCode() { |
| 379 CodeStubGraphBuilder<ArrayNArgumentsConstructorStub> builder(this); | 379 CodeStubGraphBuilder<ArrayNArgumentsConstructorStub> builder(this); |
| 380 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 380 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 381 return chunk->Codegen(Code::COMPILED_STUB); | 381 return chunk->Codegen(Code::COMPILED_STUB); |
| 382 } | 382 } |
| 383 | 383 |
| 384 } } // namespace v8::internal | 384 } } // namespace v8::internal |
| OLD | NEW |