OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/field-index.h" | 8 #include "src/field-index.h" |
9 #include "src/hydrogen.h" | 9 #include "src/hydrogen.h" |
10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1660 HValue* js_function, | 1660 HValue* js_function, |
1661 HValue* native_context, | 1661 HValue* native_context, |
1662 IfBuilder* builder, | 1662 IfBuilder* builder, |
1663 HValue* optimized_map, | 1663 HValue* optimized_map, |
1664 HValue* map_index) { | 1664 HValue* map_index) { |
1665 HValue* osr_ast_id_none = Add<HConstant>(BailoutId::None().ToInt()); | 1665 HValue* osr_ast_id_none = Add<HConstant>(BailoutId::None().ToInt()); |
1666 HValue* context_slot = LoadFromOptimizedCodeMap( | 1666 HValue* context_slot = LoadFromOptimizedCodeMap( |
1667 optimized_map, map_index, SharedFunctionInfo::kContextOffset); | 1667 optimized_map, map_index, SharedFunctionInfo::kContextOffset); |
1668 HValue* osr_ast_slot = LoadFromOptimizedCodeMap( | 1668 HValue* osr_ast_slot = LoadFromOptimizedCodeMap( |
1669 optimized_map, map_index, SharedFunctionInfo::kOsrAstIdOffset); | 1669 optimized_map, map_index, SharedFunctionInfo::kOsrAstIdOffset); |
1670 HValue* code_object = LoadFromOptimizedCodeMap( | |
1671 optimized_map, map_index, SharedFunctionInfo::kCachedCodeOffset); | |
1670 builder->If<HCompareObjectEqAndBranch>(native_context, | 1672 builder->If<HCompareObjectEqAndBranch>(native_context, |
1671 context_slot); | 1673 context_slot); |
1672 builder->AndIf<HCompareObjectEqAndBranch>(osr_ast_slot, osr_ast_id_none); | 1674 builder->AndIf<HCompareObjectEqAndBranch>(osr_ast_slot, osr_ast_id_none); |
1675 builder->And(); | |
1676 builder->IfNot<HCompareObjectEqAndBranch>(code_object, | |
1677 graph()->GetConstant0()); | |
1673 builder->Then(); | 1678 builder->Then(); |
1674 HValue* code_object = LoadFromOptimizedCodeMap(optimized_map, | |
1675 map_index, SharedFunctionInfo::kCachedCodeOffset); | |
1676 // and the literals | 1679 // and the literals |
Michael Starzinger
2015/09/22 10:44:39
nit: This comment doesn't provide any value anymor
Igor Sheludko
2015/09/22 12:58:10
Done.
| |
1677 HValue* literals = LoadFromOptimizedCodeMap(optimized_map, | 1680 HValue* literals = LoadFromOptimizedCodeMap(optimized_map, |
1678 map_index, SharedFunctionInfo::kLiteralsOffset); | 1681 map_index, SharedFunctionInfo::kLiteralsOffset); |
1679 | 1682 |
1680 BuildInstallOptimizedCode(js_function, native_context, code_object, literals); | 1683 BuildInstallOptimizedCode(js_function, native_context, code_object, literals); |
1681 | 1684 |
1682 // The builder continues in the "then" after this function. | 1685 // The builder continues in the "then" after this function. |
1683 } | 1686 } |
1684 | 1687 |
1685 | 1688 |
1686 void CodeStubGraphBuilderBase::BuildInstallOptimizedCode(HValue* js_function, | 1689 void CodeStubGraphBuilderBase::BuildInstallOptimizedCode(HValue* js_function, |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2209 return Pop(); | 2212 return Pop(); |
2210 } | 2213 } |
2211 | 2214 |
2212 | 2215 |
2213 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2216 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2214 return DoGenerateCode(this); | 2217 return DoGenerateCode(this); |
2215 } | 2218 } |
2216 | 2219 |
2217 } // namespace internal | 2220 } // namespace internal |
2218 } // namespace v8 | 2221 } // namespace v8 |
OLD | NEW |