Chromium Code Reviews| 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 if (!info.shared_info().is_null()) { | |
|
Michael Starzinger
2014/08/14 08:48:07
Likewise.
sigurds
2014/08/14 09:53:33
Done.
| |
| 65 Handle<ScopeInfo> scope_info = | |
| 66 ScopeInfo::Create(info.scope(), info.zone()); | |
| 67 info.shared_info()->set_scope_info(*scope_info); | |
| 68 } | |
| 64 Pipeline pipeline(&info); | 69 Pipeline pipeline(&info); |
| 65 Linkage linkage(&info); | 70 Linkage linkage(&info); |
| 66 Handle<Code> code = | 71 Handle<Code> code = |
| 67 pipeline.GenerateCodeForMachineGraph(&linkage, this->graph()); | 72 pipeline.GenerateCodeForMachineGraph(&linkage, this->graph()); |
| 68 CHECK(!code.is_null()); | 73 CHECK(!code.is_null()); |
| 69 function->ReplaceCode(*code); | 74 function->ReplaceCode(*code); |
| 70 } | 75 } |
| 71 Handle<Object>* args = NULL; | 76 Handle<Object>* args = NULL; |
| 72 MaybeHandle<Object> result = | 77 MaybeHandle<Object> result = |
| 73 Execution::Call(this->isolate(), function, factory()->undefined_value(), | 78 Execution::Call(this->isolate(), function, factory()->undefined_value(), |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 388 | 393 |
| 389 if (TODO_FLOAT64_TO_TAGGED && Pipeline::SupportedTarget()) { | 394 if (TODO_FLOAT64_TO_TAGGED && Pipeline::SupportedTarget()) { |
| 390 FOR_FLOAT64_INPUTS(i) { | 395 FOR_FLOAT64_INPUTS(i) { |
| 391 input = *i; | 396 input = *i; |
| 392 SimulateFullSpace(CcTest::heap()->new_space()); | 397 SimulateFullSpace(CcTest::heap()->new_space()); |
| 393 Object* result = t.CallWithPotentialGC<Object>(); | 398 Object* result = t.CallWithPotentialGC<Object>(); |
| 394 t.CheckNumber(input, result); | 399 t.CheckNumber(input, result); |
| 395 } | 400 } |
| 396 } | 401 } |
| 397 } | 402 } |
| OLD | NEW |