OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 4203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4214 } | 4214 } |
4215 } | 4215 } |
4216 | 4216 |
4217 | 4217 |
4218 bool HOptimizedGraphBuilder::BuildGraph() { | 4218 bool HOptimizedGraphBuilder::BuildGraph() { |
4219 if (IsSubclassConstructor(current_info()->function()->kind())) { | 4219 if (IsSubclassConstructor(current_info()->function()->kind())) { |
4220 Bailout(kSuperReference); | 4220 Bailout(kSuperReference); |
4221 return false; | 4221 return false; |
4222 } | 4222 } |
4223 | 4223 |
4224 if (current_info()->scope()->is_script_scope()) { | |
4225 Bailout(kScriptContext); | |
4226 return false; | |
Toon Verwaest
2015/04/07 20:55:05
Doesn't this entirely disable top-level OSR?
If I
Michael Starzinger
2015/04/07 23:01:03
It might be that this needs to be guarded by an ad
Michael Starzinger
2015/04/08 12:29:18
For the record, addressed by: https://codereview.c
| |
4227 } | |
4228 | |
4224 Scope* scope = current_info()->scope(); | 4229 Scope* scope = current_info()->scope(); |
4225 SetUpScope(scope); | 4230 SetUpScope(scope); |
4226 | 4231 |
4227 // Add an edge to the body entry. This is warty: the graph's start | 4232 // Add an edge to the body entry. This is warty: the graph's start |
4228 // environment will be used by the Lithium translation as the initial | 4233 // environment will be used by the Lithium translation as the initial |
4229 // environment on graph entry, but it has now been mutated by the | 4234 // environment on graph entry, but it has now been mutated by the |
4230 // Hydrogen translation of the instructions in the start block. This | 4235 // Hydrogen translation of the instructions in the start block. This |
4231 // environment uses values which have not been defined yet. These | 4236 // environment uses values which have not been defined yet. These |
4232 // Hydrogen instructions will then be replayed by the Lithium | 4237 // Hydrogen instructions will then be replayed by the Lithium |
4233 // translation, so they cannot have an environment effect. The edge to | 4238 // translation, so they cannot have an environment effect. The edge to |
(...skipping 7195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11429 break; | 11434 break; |
11430 } | 11435 } |
11431 case Variable::LOOKUP: | 11436 case Variable::LOOKUP: |
11432 return Bailout(kUnsupportedLookupSlotInDeclaration); | 11437 return Bailout(kUnsupportedLookupSlotInDeclaration); |
11433 } | 11438 } |
11434 } | 11439 } |
11435 | 11440 |
11436 | 11441 |
11437 void HOptimizedGraphBuilder::VisitModuleDeclaration( | 11442 void HOptimizedGraphBuilder::VisitModuleDeclaration( |
11438 ModuleDeclaration* declaration) { | 11443 ModuleDeclaration* declaration) { |
11439 UNREACHABLE(); | 11444 return Bailout(kModuleDeclaration); |
11440 } | 11445 } |
11441 | 11446 |
11442 | 11447 |
11443 void HOptimizedGraphBuilder::VisitImportDeclaration( | 11448 void HOptimizedGraphBuilder::VisitImportDeclaration( |
11444 ImportDeclaration* declaration) { | 11449 ImportDeclaration* declaration) { |
11445 UNREACHABLE(); | 11450 UNREACHABLE(); |
11446 } | 11451 } |
11447 | 11452 |
11448 | 11453 |
11449 void HOptimizedGraphBuilder::VisitExportDeclaration( | 11454 void HOptimizedGraphBuilder::VisitExportDeclaration( |
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13411 if (ShouldProduceTraceOutput()) { | 13416 if (ShouldProduceTraceOutput()) { |
13412 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13417 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13413 } | 13418 } |
13414 | 13419 |
13415 #ifdef DEBUG | 13420 #ifdef DEBUG |
13416 graph_->Verify(false); // No full verify. | 13421 graph_->Verify(false); // No full verify. |
13417 #endif | 13422 #endif |
13418 } | 13423 } |
13419 | 13424 |
13420 } } // namespace v8::internal | 13425 } } // namespace v8::internal |
OLD | NEW |