| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler/js-global-object-specialization.h" | 5 #include "src/compiler/js-global-object-specialization.h" |
| 6 | 6 |
| 7 #include "src/compilation-dependencies.h" | 7 #include "src/compilation-dependencies.h" |
| 8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.h" |
| 9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 Handle<ScriptContextTable> script_context_table( | 239 Handle<ScriptContextTable> script_context_table( |
| 240 global_object->native_context()->script_context_table(), isolate()); | 240 global_object->native_context()->script_context_table(), isolate()); |
| 241 ScriptContextTable::LookupResult lookup_result; | 241 ScriptContextTable::LookupResult lookup_result; |
| 242 if (!ScriptContextTable::Lookup(script_context_table, | 242 if (!ScriptContextTable::Lookup(script_context_table, |
| 243 Handle<String>::cast(name), &lookup_result)) { | 243 Handle<String>::cast(name), &lookup_result)) { |
| 244 return false; | 244 return false; |
| 245 } | 245 } |
| 246 Handle<Context> script_context = ScriptContextTable::GetContext( | 246 Handle<Context> script_context = ScriptContextTable::GetContext( |
| 247 script_context_table, lookup_result.context_index); | 247 script_context_table, lookup_result.context_index); |
| 248 result->context = script_context; | 248 result->context = script_context; |
| 249 result->immutable = IsImmutableVariableMode(lookup_result.mode); | 249 result->immutable = lookup_result.mode == CONST; |
| 250 result->index = lookup_result.slot_index; | 250 result->index = lookup_result.slot_index; |
| 251 return true; | 251 return true; |
| 252 } | 252 } |
| 253 | 253 |
| 254 | 254 |
| 255 Graph* JSGlobalObjectSpecialization::graph() const { | 255 Graph* JSGlobalObjectSpecialization::graph() const { |
| 256 return jsgraph()->graph(); | 256 return jsgraph()->graph(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 | 259 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 272 } | 272 } |
| 273 | 273 |
| 274 | 274 |
| 275 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { | 275 SimplifiedOperatorBuilder* JSGlobalObjectSpecialization::simplified() const { |
| 276 return jsgraph()->simplified(); | 276 return jsgraph()->simplified(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace compiler | 279 } // namespace compiler |
| 280 } // namespace internal | 280 } // namespace internal |
| 281 } // namespace v8 | 281 } // namespace v8 |
| OLD | NEW |