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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "src/compiler/control-builders.h" | 7 #include "src/compiler/control-builders.h" |
8 #include "src/compiler/generic-node-inl.h" | 8 #include "src/compiler/generic-node-inl.h" |
9 #include "src/compiler/node-properties-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 v8::Utils::OpenHandle(*v8::Handle<v8::Function>::Cast(CompileRun( | 54 v8::Utils::OpenHandle(*v8::Handle<v8::Function>::Cast(CompileRun( |
55 "(function() { 'use strict'; return 2.7123; })"))); | 55 "(function() { 'use strict'; return 2.7123; })"))); |
56 CompilationInfoWithZone info(function); | 56 CompilationInfoWithZone info(function); |
57 CHECK(Parser::Parse(&info)); | 57 CHECK(Parser::Parse(&info)); |
58 StrictMode strict_mode = info.function()->strict_mode(); | 58 StrictMode strict_mode = info.function()->strict_mode(); |
59 info.SetStrictMode(strict_mode); | 59 info.SetStrictMode(strict_mode); |
60 info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code())); | 60 info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code())); |
61 CHECK(Rewriter::Rewrite(&info)); | 61 CHECK(Rewriter::Rewrite(&info)); |
62 CHECK(Scope::Analyze(&info)); | 62 CHECK(Scope::Analyze(&info)); |
63 CHECK_NE(NULL, info.scope()); | 63 CHECK_NE(NULL, info.scope()); |
| 64 Handle<ScopeInfo> scope_info = |
| 65 ScopeInfo::Create(info.scope(), info.zone()); |
| 66 info.shared_info()->set_scope_info(*scope_info); |
64 Pipeline pipeline(&info); | 67 Pipeline pipeline(&info); |
65 Linkage linkage(&info); | 68 Linkage linkage(&info); |
66 Handle<Code> code = | 69 Handle<Code> code = |
67 pipeline.GenerateCodeForMachineGraph(&linkage, this->graph()); | 70 pipeline.GenerateCodeForMachineGraph(&linkage, this->graph()); |
68 CHECK(!code.is_null()); | 71 CHECK(!code.is_null()); |
69 function->ReplaceCode(*code); | 72 function->ReplaceCode(*code); |
70 } | 73 } |
71 Handle<Object>* args = NULL; | 74 Handle<Object>* args = NULL; |
72 MaybeHandle<Object> result = | 75 MaybeHandle<Object> result = |
73 Execution::Call(this->isolate(), function, factory()->undefined_value(), | 76 Execution::Call(this->isolate(), function, factory()->undefined_value(), |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 | 391 |
389 if (TODO_FLOAT64_TO_TAGGED && Pipeline::SupportedTarget()) { | 392 if (TODO_FLOAT64_TO_TAGGED && Pipeline::SupportedTarget()) { |
390 FOR_FLOAT64_INPUTS(i) { | 393 FOR_FLOAT64_INPUTS(i) { |
391 input = *i; | 394 input = *i; |
392 SimulateFullSpace(CcTest::heap()->new_space()); | 395 SimulateFullSpace(CcTest::heap()->new_space()); |
393 Object* result = t.CallWithPotentialGC<Object>(); | 396 Object* result = t.CallWithPotentialGC<Object>(); |
394 t.CheckNumber(input, result); | 397 t.CheckNumber(input, result); |
395 } | 398 } |
396 } | 399 } |
397 } | 400 } |
OLD | NEW |