| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
| 7 | 7 |
| 8 #include "src/compiler/code-generator.h" | 8 #include "src/compiler/code-generator.h" |
| 9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 InstructionSelector selector(scope_->main_zone(), linkage, code, schedule, | 71 InstructionSelector selector(scope_->main_zone(), linkage, code, schedule, |
| 72 &source_positions); | 72 &source_positions); |
| 73 selector.SelectInstructions(); | 73 selector.SelectInstructions(); |
| 74 | 74 |
| 75 if (FLAG_trace_turbo) { | 75 if (FLAG_trace_turbo) { |
| 76 os << "----- Instruction sequence before register allocation -----\n" | 76 os << "----- Instruction sequence before register allocation -----\n" |
| 77 << *code; | 77 << *code; |
| 78 } | 78 } |
| 79 | 79 |
| 80 Frame frame; | 80 Frame frame; |
| 81 RegisterAllocator allocator(scope_->main_zone(), &frame, &info, code); | 81 RegisterAllocator allocator(scope_->main_zone(), &frame, code); |
| 82 CHECK(allocator.Allocate()); | 82 CHECK(allocator.Allocate()); |
| 83 | 83 |
| 84 if (FLAG_trace_turbo) { | 84 if (FLAG_trace_turbo) { |
| 85 os << "----- Instruction sequence after register allocation -----\n" | 85 os << "----- Instruction sequence after register allocation -----\n" |
| 86 << *code; | 86 << *code; |
| 87 } | 87 } |
| 88 | 88 |
| 89 compiler::CodeGenerator generator(&frame, linkage, code, &info); | 89 compiler::CodeGenerator generator(&frame, linkage, code, &info); |
| 90 result_code = generator.GenerateCode(); | 90 result_code = generator.GenerateCode(); |
| 91 | 91 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 Handle<Object> result; | 308 Handle<Object> result; |
| 309 bool has_pending_exception = | 309 bool has_pending_exception = |
| 310 !Execution::Call(isolate, t.function, | 310 !Execution::Call(isolate, t.function, |
| 311 isolate->factory()->undefined_value(), 0, NULL, | 311 isolate->factory()->undefined_value(), 0, NULL, |
| 312 false).ToHandle(&result); | 312 false).ToHandle(&result); |
| 313 CHECK(!has_pending_exception); | 313 CHECK(!has_pending_exception); |
| 314 CHECK(result->SameValue(Smi::FromInt(42))); | 314 CHECK(result->SameValue(Smi::FromInt(42))); |
| 315 } | 315 } |
| 316 | 316 |
| 317 #endif | 317 #endif |
| OLD | NEW |